diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f726ba79fd3a..55906e4c4676 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2787,8 +2787,10 @@ static void vapic_exit(struct kvm_vcpu *vcpu) | |||
2787 | if (!apic || !apic->vapic_addr) | 2787 | if (!apic || !apic->vapic_addr) |
2788 | return; | 2788 | return; |
2789 | 2789 | ||
2790 | down_read(&vcpu->kvm->slots_lock); | ||
2790 | kvm_release_page_dirty(apic->vapic_page); | 2791 | kvm_release_page_dirty(apic->vapic_page); |
2791 | mark_page_dirty(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); | 2792 | mark_page_dirty(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); |
2793 | up_read(&vcpu->kvm->slots_lock); | ||
2792 | } | 2794 | } |
2793 | 2795 | ||
2794 | static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | 2796 | static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) |
@@ -2944,9 +2946,7 @@ out: | |||
2944 | 2946 | ||
2945 | post_kvm_run_save(vcpu, kvm_run); | 2947 | post_kvm_run_save(vcpu, kvm_run); |
2946 | 2948 | ||
2947 | down_read(&vcpu->kvm->slots_lock); | ||
2948 | vapic_exit(vcpu); | 2949 | vapic_exit(vcpu); |
2949 | up_read(&vcpu->kvm->slots_lock); | ||
2950 | 2950 | ||
2951 | return r; | 2951 | return r; |
2952 | } | 2952 | } |