[xen staging] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value

patchbot
commit 5aa62f06681ae52c8e647194c32dba2b4c903991
Author:     Jan Beulich <[hidden email]>
AuthorDate: Tue Dec 4 14:03:43 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Dec 4 14:03:43 2018 +0100

    x86emul: raise #GP(0) in VME mode for POPF with TF set in new value
   
    This is a check explicitly listed by the instruction page in the SDM.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 5313145b63..6523d65f65 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -4226,6 +4226,7 @@ x86_emulate(
             if ( (cr4 & X86_CR4_VME) &&
                  MASK_EXTR(_regs.eflags, X86_EFLAGS_IOPL) != 3 )
             {
+                generate_exception_if(dst.val & X86_EFLAGS_TF, EXC_GP, 0);
                 if ( dst.val & X86_EFLAGS_IF )
                 {
                     generate_exception_if(_regs.eflags & X86_EFLAGS_VIP,
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog