summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorMohammed Gamal2010-08-04 04:44:24 +0200
committerAvi Kivity2010-10-24 10:50:59 +0200
commit160ce1f1a8fe64b3e2686ae73fbf051ccfe7c7ef (patch)
treed77a95e2e7e28a5df2520fd904109fbc996f95f0 /arch/x86/include/asm/kvm_emulate.h
parentKVM: x86 emulator: simplify two-byte opcode check (diff)
downloadkernel-qcow2-linux-160ce1f1a8fe64b3e2686ae73fbf051ccfe7c7ef.tar.gz
kernel-qcow2-linux-160ce1f1a8fe64b3e2686ae73fbf051ccfe7c7ef.tar.xz
kernel-qcow2-linux-160ce1f1a8fe64b3e2686ae73fbf051ccfe7c7ef.zip
KVM: x86 emulator: Allow accessing IDT via emulator ops
The patch adds a new member get_idt() to x86_emulate_ops. It also adds a function to get the idt in order to be used by the emulator. This is needed for real mode interrupt injection and the emulation of int instructions. Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 1e4a72ce301a..1bbf2b6f2a7e 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -139,6 +139,7 @@ struct x86_emulate_ops {
void (*set_segment_selector)(u16 sel, int seg, struct kvm_vcpu *vcpu);
unsigned long (*get_cached_segment_base)(int seg, struct kvm_vcpu *vcpu);
void (*get_gdt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu);
+ void (*get_idt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu);
ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu);
int (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu);
int (*cpl)(struct kvm_vcpu *vcpu);