Date: Mon, 2 Dec 2024 22:34:28 +0100 From: Mario Marietto <marietto2008@gmail.com> To: Mark Peek <mp@freebsd.org> Cc: =?UTF-8?Q?Corvin_K=C3=B6hne?= <c.koehne@beckhoff.com>, FreeBSD virtualization <freebsd-virtualization@freebsd.org> Subject: Re: Failed to emulate instruction sequence [ 41f646040874064c017d88eb144c89 ] at 0xbea5fcf9 Message-ID: <CA%2B1FSigZV6GXurd5KmBwVS6LdbOpP1fLK5wEB7-ROAp%2Bz1axsA@mail.gmail.com> In-Reply-To: <CAGGgMJcVC33joaZ%2BdHsCBMHZ-hZPDt-9E8mL6Nvb=AdbVDQPqA@mail.gmail.com> References: <CA%2B1FSijzwf6xHOv7-CfmdFPmxD46vFEdaJ4V6xy29G4BYEetWA@mail.gmail.com> <CAGGgMJemKNkEB87sHABECYrQT37tzPcF74o6dejAz4=nMApCBQ@mail.gmail.com> <CA%2B1FSigkus=xw6Y%2BQzD8hK9Dmkt6LR1hsY-U8V=yQ3yReTSL8g@mail.gmail.com> <CAGGgMJcVC33joaZ%2BdHsCBMHZ-hZPDt-9E8mL6Nvb=AdbVDQPqA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000062799506285052a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes,I have also exchanged the bhyve binary. Now I'm trying to apply your patch and then I will rebuild vmm. I see that your code is : [0xF6] =3D { /* XXX Group 3 extended opcode - not just TEST */ .op_byte =3D 0xF6, .op_type =3D VIE_OP_TYPE_TEST, .op_flags =3D VIE_OP_F_IMM, }, but it seems wrong. Shouldn't be .op_flags =3D VIE_OP_F_IMM8 ? On Mon, Dec 2, 2024 at 10:16=E2=80=AFPM Mark Peek <mp@freebsd.org> wrote: > On Mon, Dec 2, 2024 at 1:05=E2=80=AFPM Mario Marietto <marietto2008@gmail= .com> > wrote: > >> Hello Mark, >> >> I see that your patch is about to modify the code of the vmm.ko module. >> I've just exchanged the vmm.ko module that I'm using on the ZFS system w= ith >> the module that I use on the UFS system (where I don't see the error) bu= t >> this operation didn't solve the problem. I suspect that the wrong code i= s >> not inside the vmm.ko module. Can you offer a quick technical explanatio= n >> of the reason why the exchange of the modules does not work for me ? >> > > I'm assuming you applied the patch and rebuilt the vmm.ko module. Did you > also recompile the bhyve binary per my comments in my last message? The > emulated instructions are detected in vmm.ko but are emulated in the bhyv= e > binary. In other words, vmm_instruction_emul.c is used in both vmm.ko and > bhyve. > > Mark > --=20 Mario. --00000000000062799506285052a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Yes,I have also exchanged the bhyve binary. Now I'= ;m trying to apply your patch and then I will rebuild vmm. <br></div><div>I= see that your code is :<br></div><div><br></div><div>[0xF6] =3D {<br>=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* XXX Group 3 extende= d opcode - not just TEST */<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 .op_byte =3D 0xF6,<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 .op_type =3D VIE_OP_TYPE_TEST,<br>=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .op_flags =3D VIE_OP_F_IMM,<br>=C2=A0 = =C2=A0 =C2=A0 =C2=A0 },</div><div><br></div><div>but it seems wrong. Should= n't be .op_flags =3D VIE_OP_F_IMM8 ?</div></div><br><div class=3D"gmail= _quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon,= Dec 2, 2024 at 10:16=E2=80=AFPM Mark Peek <<a href=3D"mailto:mp@freebsd= .org">mp@freebsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr">On Mon, Dec 2, 2024 a= t 1:05=E2=80=AFPM Mario Marietto <<a href=3D"mailto:marietto2008@gmail.c= om" target=3D"_blank">marietto2008@gmail.com</a>> wrote:</div><div class= =3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir= =3D"ltr"><div>Hello Mark,</div><div><br></div><div>I see that your patch is= about to modify the code of the vmm.ko module. I've just exchanged the= vmm.ko module that I'm using on the ZFS system with the module that I = use on the UFS system (where I don't see the error) but this operation = didn't solve the problem. I suspect that the wrong code is not inside t= he vmm.ko module. Can you offer a quick technical explanation of the reason= why the exchange of the modules does not work for me ?</div></div></blockq= uote><div><br></div><div>I'm assuming you applied the patch and rebuilt= the vmm.ko module. Did you also recompile the bhyve binary per my comments= in my last message? The emulated instructions are detected in vmm.ko but a= re emulated in the bhyve binary. In other words, vmm_instruction_emul.c is = used in both vmm.ko and bhyve.</div><div><br></div><div>Mark=C2=A0</div></d= iv></div> </blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si= gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Ma= rio.<br></div> --00000000000062799506285052a6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigZV6GXurd5KmBwVS6LdbOpP1fLK5wEB7-ROAp%2Bz1axsA>