diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-04-22 14:34:16 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-04-22 14:34:16 +0100 |
commit | dfff66aee9bb5d62eddeaa5fb030852781399689 (patch) | |
tree | ec3ca75558fdf2af8950072d747fa7059bf1a1a2 /xen/arch/x86/hvm/emulate.c | |
parent | a8add4da193a45f0486cbe01f0ab2a48938d9d7a (diff) | |
download | xen-dfff66aee9bb5d62eddeaa5fb030852781399689.tar.gz xen-dfff66aee9bb5d62eddeaa5fb030852781399689.tar.bz2 xen-dfff66aee9bb5d62eddeaa5fb030852781399689.zip |
x86_emulate: Support CMPXCHG16B.
Also clean up cmpxchg() callback handling so we can get rid of teh
specific cmpxchg8b handler.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/emulate.c')
-rw-r--r-- | xen/arch/x86/hvm/emulate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 112e8094ec..adf1b64ffc 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -437,11 +437,15 @@ static int hvmemul_write( static int hvmemul_cmpxchg( enum x86_segment seg, unsigned long offset, - unsigned long old, - unsigned long new, + void *p_old, + void *p_new, unsigned int bytes, struct x86_emulate_ctxt *ctxt) { + unsigned long new = 0; + if ( bytes > sizeof(new) ) + return X86EMUL_UNHANDLEABLE; + memcpy(&new, p_new, bytes); /* Fix this in case the guest is really relying on r-m-w atomicity. */ return hvmemul_write(seg, offset, new, bytes, ctxt); } |