p***@xen.org
2018-11-19 11:44:54 UTC
commit efe9cba66c036c452cc2ed7220984aa11be8dcb5
Author: Jan Beulich <***@suse.com>
AuthorDate: Mon Nov 5 11:13:59 2018 +0100
Commit: Jan Beulich <***@suse.com>
CommitDate: Mon Nov 5 11:13:59 2018 +0100
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 <***@suse.com>
Reviewed-by: Andrew Cooper <***@citrix.com>
---
xen/arch/x86/x86_emulate/x86_emulate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index e717e6ac14..e69dfdd983 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#master
Author: Jan Beulich <***@suse.com>
AuthorDate: Mon Nov 5 11:13:59 2018 +0100
Commit: Jan Beulich <***@suse.com>
CommitDate: Mon Nov 5 11:13:59 2018 +0100
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 <***@suse.com>
Reviewed-by: Andrew Cooper <***@citrix.com>
---
xen/arch/x86/x86_emulate/x86_emulate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index e717e6ac14..e69dfdd983 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#master