|
@@ -85,6 +85,13 @@ static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu)
|
|
|
return kvm_mmu_load(vcpu);
|
|
|
}
|
|
|
|
|
|
+static inline void kvm_mmu_load_cr3(struct kvm_vcpu *vcpu)
|
|
|
+{
|
|
|
+ /* set_cr3() should ensure TLB has been flushed */
|
|
|
+ if (VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
|
|
+ vcpu->arch.mmu.set_cr3(vcpu, vcpu->arch.mmu.root_hpa);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Currently, we have two sorts of write-protection, a) the first one
|
|
|
* write-protects guest page to sync the guest modification, b) another one is
|