From bbaa7a06c1f768673d5185661507e1b2a132c9a2 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 14 May 2012 18:07:56 +0300 Subject: [PATCH] --- yaml --- r: 307908 b: refs/heads/master c: d8368af8b46b904def42a0f341d2f4f29001fa77 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 5863c52b74d0..9d58f16fc77a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c142786c6291189b5c85f53d91743e1eefbd8fe0 +refs/heads/master: d8368af8b46b904def42a0f341d2f4f29001fa77 diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index 4de705cdcafd..b78f89d34242 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -5279,10 +5279,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) kvm_deliver_pmi(vcpu); } - r = kvm_mmu_reload(vcpu); - if (unlikely(r)) - goto out; - if (kvm_check_request(KVM_REQ_EVENT, vcpu) || req_int_win) { inject_pending_event(vcpu); @@ -5298,6 +5294,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) } } + r = kvm_mmu_reload(vcpu); + if (unlikely(r)) { + kvm_x86_ops->cancel_injection(vcpu); + goto out; + } + preempt_disable(); kvm_x86_ops->prepare_guest_switch(vcpu);