diff options
author | Avi Kivity <avi@redhat.com> | 2010-08-01 05:35:10 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:50:33 -0400 |
commit | 1a6440aef6d63252e6c80aff651147b5f8c737e9 (patch) | |
tree | ed2b2534e664f7f98a433f7eaaf657fadcfd8582 /arch/x86/include/asm/kvm_emulate.h | |
parent | 09ee57cdae3156aa3b74f378a0c57ef657c90f38 (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.h | 5 |
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 { | |||
156 | unsigned long orig_val; | 156 | unsigned long orig_val; |
157 | u64 orig_val64; | 157 | u64 orig_val64; |
158 | }; | 158 | }; |
159 | unsigned long *ptr; | 159 | union { |
160 | unsigned long *reg; | ||
161 | unsigned long mem; | ||
162 | } addr; | ||
160 | union { | 163 | union { |
161 | unsigned long val; | 164 | unsigned long val; |
162 | u64 val64; | 165 | u64 val64; |