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>
This commit is contained in:
parent
afc2f792cd
commit
e2858b4ab1
|
@ -3764,9 +3764,7 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu)
|
||||||
if (r)
|
if (r)
|
||||||
goto out;
|
goto out;
|
||||||
r = mmu_alloc_roots(vcpu);
|
r = mmu_alloc_roots(vcpu);
|
||||||
spin_lock(&vcpu->kvm->mmu_lock);
|
kvm_mmu_sync_roots(vcpu);
|
||||||
mmu_sync_roots(vcpu);
|
|
||||||
spin_unlock(&vcpu->kvm->mmu_lock);
|
|
||||||
if (r)
|
if (r)
|
||||||
goto out;
|
goto out;
|
||||||
/* set_cr3() should ensure TLB has been flushed */
|
/* set_cr3() should ensure TLB has been flushed */
|
||||||
|
|
Loading…
Reference in a new issue