summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>2013-01-08 19:46:48 +0900
committerGleb Natapov <gleb@redhat.com>2013-01-14 11:14:17 +0200
commit9d1beefb71146bbf5f820ab17c450808b0d0b2df (patch)
treed4563459cf9c07b520da4eddc374104c23466db2 /arch/x86/kvm/x86.c
parentb34cb590fb099f7929dd78d9464b70319ee12a98 (diff)
downloadlinux-3.10-9d1beefb71146bbf5f820ab17c450808b0d0b2df.tar.gz
linux-3.10-9d1beefb71146bbf5f820ab17c450808b0d0b2df.tar.bz2
linux-3.10-9d1beefb71146bbf5f820ab17c450808b0d0b2df.zip
KVM: Make kvm_mmu_slot_remove_write_access() take mmu_lock by itself
Better to place mmu_lock handling and TLB flushing code together since this is a self-contained function. Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 080bbdcbf2e..54832280cde 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6899,11 +6899,8 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
* Existing largepage mappings are destroyed here and new ones will
* not be created until the end of the logging.
*/
- if (npages && (mem->flags & KVM_MEM_LOG_DIRTY_PAGES)) {
- spin_lock(&kvm->mmu_lock);
+ if (npages && (mem->flags & KVM_MEM_LOG_DIRTY_PAGES))
kvm_mmu_slot_remove_write_access(kvm, mem->slot);
- spin_unlock(&kvm->mmu_lock);
- }
/*
* If memory slot is created, or moved, we need to clear all
* mmio sptes.