x86 emulate: Emulate atomic read-modify-write instructions as a
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Nov 2007 16:57:57 +0000 (16:57 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Nov 2007 16:57:57 +0000 (16:57 +0000)
straightforward write. Hopefully multiprocessor synchronisation is not
relied upon in real mode!
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vmx/realmode.c

index 2f31d8fbcdb253261d4c29778e79a2af98389859..d26725ba0068f6257e3ee3b0ca4210a88e9d7b69 100644 (file)
@@ -237,7 +237,8 @@ realmode_emulate_cmpxchg(
     unsigned int bytes,
     struct x86_emulate_ctxt *ctxt)
 {
-    return X86EMUL_UNHANDLEABLE;
+    /* Fix this in case the guest is really relying on r-m-w atomicity. */
+    return realmode_emulate_write(seg, offset, new, bytes, ctxt);
 }
 
 static int