aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-04-28 12:15:26 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:35:30 -0400
commit414e6277fd148f6470261cef50a7fed0d88a2825 (patch)
treec105f8a33e9f744695d0ffd2172f6d2a9e859258 /arch/x86/include
parentb8a98945ea5b735e083eaf92906aa0ff9ece92e8 (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.h6
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 {
143struct operand { 143struct 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
149struct fetch_cache { 153struct fetch_cache {