summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2013-09-22 16:44:51 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-10-30 18:54:39 +0100
commit1ce19dc16ce9136cccb6087e4a383ec9321980d9 (patch)
treee93153a04096bf907dee183cc4b2260c5752991f /arch/x86/include/asm/kvm_emulate.h
parent9c15bb1d0a8411f9bb3395d21d5309bde7da0c1c (diff)
kvm, emulator: Use opcode length
Add a field to the current emulation context which contains the instruction opcode length. This will streamline handling of opcodes of different length. Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 15f960c06ff7..92a176ad456c 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -279,8 +279,12 @@ struct x86_emulate_ctxt {
bool have_exception;
struct x86_exception exception;
- /* decode cache */
- u8 twobyte;
+ /*
+ * decode cache
+ */
+
+ /* current opcode length in bytes */
+ u8 opcode_len;
u8 b;
u8 intercept;
u8 lock_prefix;