[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] x86/P2M: don't include MMIO_DM in p2m_is_valid()
On Wed, Feb 26, 2025 at 12:53:14PM +0100, Jan Beulich wrote: > MMIO_DM specifically marks pages which aren't valid, much like INVALID > does. Dropping the type from the predicate > - (conceptually) corrects _sh_propagate(), where the comment says that > "something valid" is needed (the only call path not passing in RAM_RW > would pass in INVALID_GFN along with MMIO_DM), > - is benign to the use in sh_page_fault(), where the subsequent > mfn_valid() check would otherwise cause the same bail-out code path to > be taken, > - is benign to all three uses in p2m_pt_get_entry(), as MMIO_DM entries > will only ever yield non-present entries, which are being checked for > earlier, > - is benign to sh_unshadow_for_p2m_change(), for the same reason, > - is benign to gnttab_transfer() with EPT not in use, again because > MMIO_DM entries will only ever yield non-present entries, and > INVALID_MFN is returned for those anyway by p2m_pt_get_entry(). > - for gnttab_transfer() with EPT in use (conceptually) corrects the > corner case of a page first being subject to XEN_DMOP_set_mem_type > converting a RAM type to MMIO_DM (which retains the MFN in the entry), > and then being subject to GNTTABOP_transfer, except that steal_page() > would later make the operation fail unconditionally anyway. > > While there also drop the unused (and otherwise now redundant) > p2m_has_emt(). > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> It's tightening an existing check (making it more restrictive), so as long as current users can deal with it. Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |