Re: [PATCH] KVM: vmx: VMXOFF emulation in vm86 should cause #UD

2014-08-29 Thread Paolo Bonzini
Il 29/08/2014 11:12, Nadav Amit ha scritto: > I don’t know. I am looking at Intel SDM table A-6 (Opcode Extensions > for One- and Two-byte Opcodes by Group Number). According to the > table, only group 7 needs RMExt, and in this case the “case > GroupDual” makes the required checks, in the iteratio

Re: [PATCH] KVM: vmx: VMXOFF emulation in vm86 should cause #UD

2014-08-29 Thread Nadav Amit
On Aug 29, 2014, at 11:57 AM, Paolo Bonzini wrote: > Il 29/08/2014 10:52, Nadav Amit ha scritto: >>> Patch looks good, but where is the check that MOD == 3 in the "case >>> RMExt"? Am I just not seeing it? >> >> This seems to be part of the “case GroupDual”. > > GroupDual handles it, but the

Re: [PATCH] KVM: vmx: VMXOFF emulation in vm86 should cause #UD

2014-08-29 Thread Paolo Bonzini
Il 29/08/2014 10:52, Nadav Amit ha scritto: > > Patch looks good, but where is the check that MOD == 3 in the "case > > RMExt"? Am I just not seeing it? > > This seems to be part of the “case GroupDual”. GroupDual handles it, but the EXT() macro you're using is exactly what you want: #define R

Re: [PATCH] KVM: vmx: VMXOFF emulation in vm86 should cause #UD

2014-08-29 Thread Nadav Amit
On Aug 29, 2014, at 11:36 AM, Paolo Bonzini wrote: > Il 29/08/2014 10:26, Nadav Amit ha scritto: >> Unlike VMCALL, the instructions VMXOFF, VMLAUNCH and VMRESUME should cause a >> UD >> exception in real-mode or vm86. However, the emulator considers all these >> instructions the same for the m

Re: [PATCH] KVM: vmx: VMXOFF emulation in vm86 should cause #UD

2014-08-29 Thread Paolo Bonzini
Il 29/08/2014 10:26, Nadav Amit ha scritto: > Unlike VMCALL, the instructions VMXOFF, VMLAUNCH and VMRESUME should cause a > UD > exception in real-mode or vm86. However, the emulator considers all these > instructions the same for the matter of mode checks, and emulation upon exit > due to #UD e