summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-01 12:35:10 +0300
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:33 +0200
commit1a6440aef6d63252e6c80aff651147b5f8c737e9 (patch)
treeed2b2534e664f7f98a433f7eaaf657fadcfd8582 /arch/x86/include/asm/kvm_emulate.h
parent09ee57cdae3156aa3b74f378a0c57ef657c90f38 (diff)
KVM: x86 emulator: use correct type for memory address in operands
Currently we use a void pointer for memory addresses. That's wrong since these are guest virtual addresses which are not directly dereferencable by the host. Use the correct type, unsigned long. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index cbdf76722d7d..0c835f7eb308 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -156,7 +156,10 @@ struct operand {
unsigned long orig_val;
u64 orig_val64;
};
- unsigned long *ptr;
+ union {
+ unsigned long *reg;
+ unsigned long mem;
+ } addr;
union {
unsigned long val;
u64 val64;