[PATCH 2/2] KVM: x86 emulator: add XADD instruction emulation

2010-08-12 Thread Wei Yongjun
Add XADD instruction emulation (opcode 0x0f 0xc0~0xc1) Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com --- arch/x86/kvm/emulate.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 8bf80a9..7c47e37 100644 ---

Re: [PATCH 2/2] KVM: x86 emulator: add XADD instruction emulation

2010-08-12 Thread Paolo Bonzini
On 08/12/2010 09:41 AM, Wei Yongjun wrote: + case 0xc0 ... 0xc1: /* xadd */ + /* Write back the register source. */ + write_register_operand(c-src, c-dst.val, c-dst.bytes); + /* Write back the memory destination with implicit LOCK prefix. */ +