diff options
author | Avi Kivity <avi@redhat.com> | 2010-08-26 14:31:30 +0300 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-09-08 14:50:55 -0300 |
commit | 16518d5ada690643453eb0aef3cc7841d3623c2d (patch) | |
tree | 1ecef3f87959e48d34f2815ddd66b49da1adfa3d /arch/x86/include/asm/kvm_emulate.h | |
parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) |
KVM: x86 emulator: fix regression with cmpxchg8b on i386 hosts
operand::val and operand::orig_val are 32-bit on i386, whereas cmpxchg8b
operands are 64-bit.
Fix by adding val64 and orig_val64 union members to struct operand, and
using them where needed.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 51cfd730ac5..1f99ecfc48e 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -152,9 +152,14 @@ struct x86_emulate_ops { struct operand { enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type; unsigned int bytes; - unsigned long orig_val, *ptr; + union { + unsigned long orig_val; + u64 orig_val64; + }; + unsigned long *ptr; union { unsigned long val; + u64 val64; char valptr[sizeof(unsigned long) + 2]; }; }; |