[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86emul: CMPXCHG{8, 16}B are memory writes



commit 045094933dc7ca7a4a35b2ebd582f6ed226684da
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Jan 20 14:36:58 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jan 20 14:36:58 2017 +0100

    x86emul: CMPXCHG{8,16}B are memory writes
    
    This fixes a regression introduced by commit ff913f68c9 ("x86/PV:
    restrict permitted instructions during memory write emulation")
    breaking namely 32-bit PV guests (which commonly use CMPXCHG8B for
    certain page table updates).
    
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index 880d565..520311f 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -6566,6 +6566,9 @@ x86_insn_is_mem_write(const struct x86_emulate_state 
*state,
 
     case X86EMUL_OPC(0x0f, 0xba):
         return (state->modrm_reg & 7) > 4; /* BTS / BTR / BTC */
+
+    case X86EMUL_OPC(0x0f, 0xc7):
+        return (state->modrm_reg & 7) == 1; /* CMPXCHG{8,16}B */
     }
 
     return false;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.