On Sat, May 21, 2022 at 9:16 PM Lai Jiangshan <jiangshanlai@xxxxxxxxx> wrote: > > From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx> > > Current code uses mmu->pae_root, mmu->pml4_root, and mmu->pml5_root to > setup special roots. The initialization code is complex and the roots > are not associated with struct kvm_mmu_page which causes the code more > complex. > > So add new local shadow pages to simplify it. > > The local shadow pages are associated with struct kvm_mmu_page and > VCPU-local. > > The local shadow pages are created and freed when the roots are > changed (or one-off) which can be optimized but not in the patchset > since the re-creating is light way (in normal case only the struct > kvm_mmu_page needs to be re-allocated and sp->spt doens't, because > it is likely to be mmu->pae_root) > > The patchset also fixes a possible bug described in: > https://lore.kernel.org/lkml/20220415103414.86555-1-jiangshanlai@xxxxxxxxx/ > as patch1. > Ping and please ignore patch1 and patch9. It would not cause any conflict without patch1 and patch9 if both are ignored together. The fix is wrong (see new discussion in the above link). So the possible correct fix will not have any conflict with this patchset of one-off local shadow page. I don't want to add extra stuff in this patchset anymore. Thanks Lai