From 071de94dfb88f00558c388e642a39166cd174ead Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sun, 14 Apr 2013 12:12:48 +0200 Subject: [PATCH] --- yaml --- r: 373039 b: refs/heads/master c: e8457c67a4ec1268ec616bd8be1d9f1cc20f1493 h: refs/heads/master i: 373037: 326ea96e3ef3c32ebae60a156851ec04911713a1 373035: 152ebd4254b46b2d5a0c1ad295b8e45925d1c08a 373031: a10f7ac0d4482c5dad6880a74b85cc952fcd0695 373023: 120311570c073df0fc8907faae22e2a6c9a3fc9c v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/vmx.c | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 5676e5405005..d5484e106a50 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f3d5799974b89100268ba813cec8db7bd0693fb +refs/heads/master: e8457c67a4ec1268ec616bd8be1d9f1cc20f1493 diff --git a/trunk/arch/x86/kvm/vmx.c b/trunk/arch/x86/kvm/vmx.c index 4fb72a764dbd..5e6391112275 100644 --- a/trunk/arch/x86/kvm/vmx.c +++ b/trunk/arch/x86/kvm/vmx.c @@ -4325,16 +4325,20 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int vmx_interrupt_allowed(struct kvm_vcpu *vcpu) { - if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu)) { + if (is_guest_mode(vcpu)) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); - if (to_vmx(vcpu)->nested.nested_run_pending || - (vmcs12->idt_vectoring_info_field & - VECTORING_INFO_VALID_MASK)) + + if (to_vmx(vcpu)->nested.nested_run_pending) return 0; - nested_vmx_vmexit(vcpu); - vmcs12->vm_exit_reason = EXIT_REASON_EXTERNAL_INTERRUPT; - vmcs12->vm_exit_intr_info = 0; - /* fall through to normal code, but now in L1, not L2 */ + if (nested_exit_on_intr(vcpu)) { + nested_vmx_vmexit(vcpu); + vmcs12->vm_exit_reason = + EXIT_REASON_EXTERNAL_INTERRUPT; + vmcs12->vm_exit_intr_info = 0; + /* + * fall through to normal code, but now in L1, not L2 + */ + } } return (vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF) &&