]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86: add movnti emulation
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 21 Oct 2008 11:06:23 +0000 (12:06 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 21 Oct 2008 11:06:23 +0000 (12:06 +0100)
Linux added the use of movnti for copying from user to kernel space in
certain cases, and as per reports we got this may happen with the
destination being in MMIO.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   18657:c4be040bef6faa4a1eae4ce71636cc1ae88a9f35
xen-unstable date:        Mon Oct 20 15:22:58 2008 +0100

xen/arch/x86/x86_emulate.c

index cff508c5b3abf3e69bb04c2daddac64eff480f85..643dcaea7b20085bd9455e5a99856e6d66877f9d 100644 (file)
@@ -244,7 +244,8 @@ static uint8_t twobyte_table[256] = {
     DstReg|SrcMem|ModRM, DstReg|SrcMem|ModRM,
     ByteOp|DstReg|SrcMem|ModRM|Mov, DstReg|SrcMem16|ModRM|Mov,
     /* 0xC0 - 0xC7 */
-    ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, 0,
+    ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM,
+    0, DstMem|SrcReg|ModRM|Mov,
     0, 0, 0, ImplicitOps|ModRM,
     /* 0xC8 - 0xCF */
     ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
@@ -3339,6 +3340,12 @@ x86_emulate(
         src.val = x86_seg_gs;
         goto pop_seg;
 
+    case 0xc3: /* movnti */
+        /* Ignore the non-temporal hint for now. */
+        generate_exception_if(dst.bytes <= 2, EXC_UD);
+        dst.val = src.val;
+        break;
+
     case 0xc7: /* Grp9 (cmpxchg8b) */
 #if defined(__i386__)
     {