On 24.06.2022 21:27, George Dunlap wrote: > > >> On 9 Dec 2021, at 11:27, Jan Beulich <jbeul...@suse.com> wrote: >> >> For guests in shadow mode the P2M table gets used only by software. The >> only place where it matters whether superpages in the P2M can be dealt >> with is sh_unshadow_for_p2m_change(). > > It’s easy to verify that this patch is doing what it claims to do; but > whether it’s correct or not depends on the veracity of this claim here. > Rather than me having to duplicate whatever work you did to come to this > conclusion, can you briefly explain why it’s true in a way that I can easily > verify?
Would "The table is never made accessible by hardware for address translation, and the only checks of _PAGE_PSE in P2M entries in shadow code are in this function (all others are against guest page table entries)." look sufficient to you? > e.g., all other accesses to the p2m in the shadow code are via > get_gfn_[something](), which (because it’s in the p2m code) handles p2m > superpages correctly? Well, yes - I don't think I need to reason about generic P2M code being super-page aware? Jan