From: Takuya Yoshikawa Date: Thu, 9 May 2013 06:45:12 +0000 (+0900) Subject: KVM: MMU: Use kvm_mmu_sync_roots() in kvm_mmu_load() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e2858b4ab1f8d7ce36ae3cd96ba650664af0db5e;p=openwrt%2Fstaging%2Fblogic.git KVM: MMU: Use kvm_mmu_sync_roots() in kvm_mmu_load() No need to open-code this function. Signed-off-by: Takuya Yoshikawa Reviewed-by: Xiao Guangrong Signed-off-by: Gleb Natapov --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 004cc87b781c..40d7b2ddc6c5 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3764,9 +3764,7 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu) if (r) goto out; r = mmu_alloc_roots(vcpu); - spin_lock(&vcpu->kvm->mmu_lock); - mmu_sync_roots(vcpu); - spin_unlock(&vcpu->kvm->mmu_lock); + kvm_mmu_sync_roots(vcpu); if (r) goto out; /* set_cr3() should ensure TLB has been flushed */