diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
2 files changed, 7 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 { | |||
139 | void (*set_segment_selector)(u16 sel, int seg, struct kvm_vcpu *vcpu); | 139 | void (*set_segment_selector)(u16 sel, int seg, struct kvm_vcpu *vcpu); |
140 | unsigned long (*get_cached_segment_base)(int seg, struct kvm_vcpu *vcpu); | 140 | unsigned long (*get_cached_segment_base)(int seg, struct kvm_vcpu *vcpu); |
141 | void (*get_gdt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu); | 141 | void (*get_gdt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu); |
142 | void (*get_idt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu); | ||
142 | ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu); | 143 | ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu); |
143 | int (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu); | 144 | int (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu); |
144 | int (*cpl)(struct kvm_vcpu *vcpu); | 145 | int (*cpl)(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 35c0f4e4a621..768197a34d3e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3790,6 +3790,11 @@ static void emulator_get_gdt(struct desc_ptr *dt, struct kvm_vcpu *vcpu) | |||
3790 | kvm_x86_ops->get_gdt(vcpu, dt); | 3790 | kvm_x86_ops->get_gdt(vcpu, dt); |
3791 | } | 3791 | } |
3792 | 3792 | ||
3793 | static void emulator_get_idt(struct desc_ptr *dt, struct kvm_vcpu *vcpu) | ||
3794 | { | ||
3795 | kvm_x86_ops->get_idt(vcpu, dt); | ||
3796 | } | ||
3797 | |||
3793 | static unsigned long emulator_get_cached_segment_base(int seg, | 3798 | static unsigned long emulator_get_cached_segment_base(int seg, |
3794 | struct kvm_vcpu *vcpu) | 3799 | struct kvm_vcpu *vcpu) |
3795 | { | 3800 | { |
@@ -3883,6 +3888,7 @@ static struct x86_emulate_ops emulate_ops = { | |||
3883 | .set_segment_selector = emulator_set_segment_selector, | 3888 | .set_segment_selector = emulator_set_segment_selector, |
3884 | .get_cached_segment_base = emulator_get_cached_segment_base, | 3889 | .get_cached_segment_base = emulator_get_cached_segment_base, |
3885 | .get_gdt = emulator_get_gdt, | 3890 | .get_gdt = emulator_get_gdt, |
3891 | .get_idt = emulator_get_idt, | ||
3886 | .get_cr = emulator_get_cr, | 3892 | .get_cr = emulator_get_cr, |
3887 | .set_cr = emulator_set_cr, | 3893 | .set_cr = emulator_set_cr, |
3888 | .cpl = emulator_get_cpl, | 3894 | .cpl = emulator_get_cpl, |