aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0dd038e7392b..e8e64927bddc 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2658,6 +2658,10 @@ preempted:
2658 kvm_x86_ops->guest_debug_pre(vcpu); 2658 kvm_x86_ops->guest_debug_pre(vcpu);
2659 2659
2660again: 2660again:
2661 if (vcpu->requests)
2662 if (test_and_clear_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests))
2663 kvm_mmu_unload(vcpu);
2664
2661 r = kvm_mmu_reload(vcpu); 2665 r = kvm_mmu_reload(vcpu);
2662 if (unlikely(r)) 2666 if (unlikely(r))
2663 goto out; 2667 goto out;
@@ -2689,6 +2693,14 @@ again:
2689 goto out; 2693 goto out;
2690 } 2694 }
2691 2695
2696 if (vcpu->requests)
2697 if (test_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests)) {
2698 local_irq_enable();
2699 preempt_enable();
2700 r = 1;
2701 goto out;
2702 }
2703
2692 if (signal_pending(current)) { 2704 if (signal_pending(current)) {
2693 local_irq_enable(); 2705 local_irq_enable();
2694 preempt_enable(); 2706 preempt_enable();