mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
x86emul: VME and PVI modes require a #GP(0) check first thing
As explicitly spelled out by the SDM, EFLAGS.VIF and EFLAGS.VIP both set at the start of an instruction trigger #GP(0) independent of actual instruction. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
9f7c1e765d
commit
efe9cba66c
1 file changed
+5
@@ -3247,6 +3247,11 @@ x86_emulate(
|
||||
|
||||
ASSERT(ops->read);
|
||||
|
||||
generate_exception_if((mode_vif() &&
|
||||
(_regs.eflags & X86_EFLAGS_VIF) &&
|
||||
(_regs.eflags & X86_EFLAGS_VIP)),
|
||||
EXC_GP, 0);
|
||||
|
||||
rc = x86_decode(&state, ctxt, ops);
|
||||
if ( rc != X86EMUL_OKAY )
|
||||
return rc;
|
||||
|
||||