On Sun, Jun 06, 2021, Lai Jiangshan wrote: > From: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx> > > Add a test to verify that KVM correctly handles the case where two or > more non-leaf page table entries point at the same table gfn, but with > different parent access permissions. > > For example, here is a shared pagetable: > pgd[] pud[] pmd[] virtual address pointers > /->pmd1(u--)->pte1(uw-)->page1 <- ptr1 (u--) > /->pud1(uw-)--->pmd2(uw-)->pte2(uw-)->page2 <- ptr2 (uw-) > pgd-| (shared pmd[] as above) > \->pud2(u--)--->pmd1(u--)->pte1(uw-)->page1 <- ptr3 (u--) > \->pmd2(uw-)->pte2(uw-)->page2 <- ptr4 (u--) > pud1 and pud2 point to the same pmd table > > The test is useful when TDP is not enabled. > > Co-Developed-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx> > Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx> > Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx> > --- Awesome, thanks! Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>