Hello, assuming that RIP points to just before a MMX instruction (such as ''movdqu [some_address],xmm0''), is it safe to call hvm_emulate_one() in the hypervisor? Are MMX instructions handled in a special manner? Thanks, Razvan Cojocaru
>>> On 17.04.13 at 11:30, Razvan Cojocaru <rzvncj@gmail.com> wrote: > assuming that RIP points to just before a MMX instruction (such as > ''movdqu [some_address],xmm0''), is it safe to call hvm_emulate_one() in > the hypervisor? Are MMX instructions handled in a special manner?So do you mean an MMX instruction, or MOVDQU (which is an XMM one)? In any event, 4.2 and later should be fine with this particular instruction (and a few more move variants), but 4.1.x and earlier won''t be, nor does the emulator support the whole spectrum of MMX, XMM, and AVX instructions. Jan
Razvan Cojocaru
2013-Apr-17 10:40 UTC
Re: Is it safe to hvm_emulate_one() an MMX instruction?
> So do you mean an MMX instruction, or MOVDQU (which is an XMM > one)? In any event, 4.2 and later should be fine with this particular > instruction (and a few more move variants), but 4.1.x and earlier > won''t be, nor does the emulator support the whole spectrum of > MMX, XMM, and AVX instructions.In this particular case, MOVDQ, but I''m interested in all the mentioned types of instructions. What happens when a HVM guest tries to execute such an unsupported instruction, via the hypervisor calling hvm_emulate_one()? Does hvm_emulate_one() not return X86EMUL_OKAY - is testing for that enough? Thanks, Razvan Cojocaru
>>> On 17.04.13 at 12:40, Razvan Cojocaru <rzvncj@gmail.com> wrote: >> So do you mean an MMX instruction, or MOVDQU (which is an XMM >> one)? In any event, 4.2 and later should be fine with this particular >> instruction (and a few more move variants), but 4.1.x and earlier >> won''t be, nor does the emulator support the whole spectrum of >> MMX, XMM, and AVX instructions. > > In this particular case, MOVDQ, but I''m interested in all the mentioned > types of instructions. > > What happens when a HVM guest tries to execute such an unsupported > instruction, via the hypervisor calling hvm_emulate_one()? Does > hvm_emulate_one() not return X86EMUL_OKAY - is testing for that enough?Supposedly yes. Jan