On 4/14/22 11:32, Lai Jiangshan wrote:
kvm_mmu_free_roots() can not free those new types of sp if they are still valid. And different vcpu can use the same pae root sp if the guest cr3 of the vcpus are the same.
Right, but then load_pdptrs only needs to zap the page before (or instead of) calling kvm_mmu_free_roots().
Paolo
And new pae root can be put in prev_root too (not implemented yet) because they are not too special anymore. As long as sp->gfn, sp->pae_off, sp->role are matched, they can be reused.