aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 927d8404505a..541f0d2412b4 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -182,6 +182,7 @@ static int init_rmode(struct kvm *kvm);
182static u64 construct_eptp(unsigned long root_hpa); 182static u64 construct_eptp(unsigned long root_hpa);
183static void kvm_cpu_vmxon(u64 addr); 183static void kvm_cpu_vmxon(u64 addr);
184static void kvm_cpu_vmxoff(void); 184static void kvm_cpu_vmxoff(void);
185static void fixup_rmode_irq(struct vcpu_vmx *vmx);
185 186
186static DEFINE_PER_CPU(struct vmcs *, vmxarea); 187static DEFINE_PER_CPU(struct vmcs *, vmxarea);
187static DEFINE_PER_CPU(struct vmcs *, current_vmcs); 188static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
@@ -3828,11 +3829,15 @@ static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx)
3828 3829
3829static void vmx_complete_interrupts(struct vcpu_vmx *vmx) 3830static void vmx_complete_interrupts(struct vcpu_vmx *vmx)
3830{ 3831{
3831 u32 idt_vectoring_info = vmx->idt_vectoring_info; 3832 u32 idt_vectoring_info;
3832 u8 vector; 3833 u8 vector;
3833 int type; 3834 int type;
3834 bool idtv_info_valid; 3835 bool idtv_info_valid;
3835 3836
3837 if (vmx->rmode.irq.pending)
3838 fixup_rmode_irq(vmx);
3839
3840 idt_vectoring_info = vmx->idt_vectoring_info;
3836 idtv_info_valid = idt_vectoring_info & VECTORING_INFO_VALID_MASK; 3841 idtv_info_valid = idt_vectoring_info & VECTORING_INFO_VALID_MASK;
3837 3842
3838 vmx->vcpu.arch.nmi_injected = false; 3843 vmx->vcpu.arch.nmi_injected = false;
@@ -4040,8 +4045,6 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu)
4040 vcpu->arch.regs_dirty = 0; 4045 vcpu->arch.regs_dirty = 0;
4041 4046
4042 vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD); 4047 vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD);
4043 if (vmx->rmode.irq.pending)
4044 fixup_rmode_irq(vmx);
4045 4048
4046 asm("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); 4049 asm("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS));
4047 vmx->launched = 1; 4050 vmx->launched = 1;