diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-28 12:15:26 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 03:35:30 -0400 |
commit | 414e6277fd148f6470261cef50a7fed0d88a2825 (patch) | |
tree | c105f8a33e9f744695d0ffd2172f6d2a9e859258 /arch/x86/include | |
parent | b8a98945ea5b735e083eaf92906aa0ff9ece92e8 (diff) |
KVM: x86 emulator: handle "far address" source operand
ljmp/lcall instruction operand contains address and segment.
It can be 10 bytes long. Currently we decode it as two different
operands. Fix it by introducing new kind of operand that can hold
entire far address.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 288cbedcab1c..69a64a6a36f4 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -143,7 +143,11 @@ struct x86_emulate_ops { | |||
143 | struct operand { | 143 | struct operand { |
144 | enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type; | 144 | enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type; |
145 | unsigned int bytes; | 145 | unsigned int bytes; |
146 | unsigned long val, orig_val, *ptr; | 146 | unsigned long orig_val, *ptr; |
147 | union { | ||
148 | unsigned long val; | ||
149 | char valptr[sizeof(unsigned long) + 2]; | ||
150 | }; | ||
147 | }; | 151 | }; |
148 | 152 | ||
149 | struct fetch_cache { | 153 | struct fetch_cache { |