[xen staging] x86emul: skip VIF processing in VME mode for 16-bit POPF at IOPL 3

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

[xen staging] x86emul: skip VIF processing in VME mode for 16-bit POPF at IOPL 3

patchbot
commit 6b4600b1425ef8006efcd2cdb4c4c986309264f6
Author:     Jan Beulich <[hidden email]>
AuthorDate: Tue Dec 4 14:02:46 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Dec 4 14:02:46 2018 +0100

    x86emul: skip VIF processing in VME mode for 16-bit POPF at IOPL 3
   
    At IOPL 3 CR4.VME is irrelevant.
   
    Reported-by: Andrew Cooper <[hidden email]>
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 0ae433538e..5313145b63 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -4223,7 +4223,8 @@ x86_emulate(
         if ( op_bytes == 2 )
         {
             dst.val = (uint16_t)dst.val | (_regs.eflags & 0xffff0000u);
-            if ( cr4 & X86_CR4_VME )
+            if ( (cr4 & X86_CR4_VME) &&
+                 MASK_EXTR(_regs.eflags, X86_EFLAGS_IOPL) != 3 )
             {
                 if ( dst.val & X86_EFLAGS_IF )
                 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging

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