ia64/xen-unstable

changeset 18664:c4be040bef6f

x86: add movnti emulation

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>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Oct 20 15:22:58 2008 +0100 (2008-10-20)
parents 2a25fd94c6f2
children 824892134573
files xen/arch/x86/x86_emulate/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/x86_emulate/x86_emulate.c	Mon Oct 20 15:19:39 2008 +0100
     1.2 +++ b/xen/arch/x86/x86_emulate/x86_emulate.c	Mon Oct 20 15:22:58 2008 +0100
     1.3 @@ -236,7 +236,8 @@ static uint8_t twobyte_table[256] = {
     1.4      DstReg|SrcMem|ModRM, DstReg|SrcMem|ModRM,
     1.5      ByteOp|DstReg|SrcMem|ModRM|Mov, DstReg|SrcMem16|ModRM|Mov,
     1.6      /* 0xC0 - 0xC7 */
     1.7 -    ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM, 0, 0,
     1.8 +    ByteOp|DstMem|SrcReg|ModRM, DstMem|SrcReg|ModRM,
     1.9 +    0, DstMem|SrcReg|ModRM|Mov,
    1.10      0, 0, 0, ImplicitOps|ModRM,
    1.11      /* 0xC8 - 0xCF */
    1.12      ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
    1.13 @@ -3910,6 +3911,12 @@ x86_emulate(
    1.14          }
    1.15          goto add;
    1.16  
    1.17 +    case 0xc3: /* movnti */
    1.18 +        /* Ignore the non-temporal hint for now. */
    1.19 +        generate_exception_if(dst.bytes <= 2, EXC_UD, -1);
    1.20 +        dst.val = src.val;
    1.21 +        break;
    1.22 +
    1.23      case 0xc7: /* Grp9 (cmpxchg8b/cmpxchg16b) */ {
    1.24          unsigned long old[2], exp[2], new[2];
    1.25          unsigned int i;