diff options
author | Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> | 2013-05-09 02:45:12 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-05-12 07:52:55 -0400 |
commit | e2858b4ab1f8d7ce36ae3cd96ba650664af0db5e (patch) | |
tree | f751fe50e62d90b43e96d63fec8d2a5142c17e65 /arch/x86/kvm/mmu.c | |
parent | afc2f792cdcb67f4257f0e68d10ee4a7b7eae57a (diff) |
KVM: MMU: Use kvm_mmu_sync_roots() in kvm_mmu_load()
No need to open-code this function.
Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) | |||
3764 | if (r) | 3764 | if (r) |
3765 | goto out; | 3765 | goto out; |
3766 | r = mmu_alloc_roots(vcpu); | 3766 | r = mmu_alloc_roots(vcpu); |
3767 | spin_lock(&vcpu->kvm->mmu_lock); | 3767 | kvm_mmu_sync_roots(vcpu); |
3768 | mmu_sync_roots(vcpu); | ||
3769 | spin_unlock(&vcpu->kvm->mmu_lock); | ||
3770 | if (r) | 3768 | if (r) |
3771 | goto out; | 3769 | goto out; |
3772 | /* set_cr3() should ensure TLB has been flushed */ | 3770 | /* set_cr3() should ensure TLB has been flushed */ |