Re: [PATCH 2/3] x86/P2M: correct old entry checking in p2m_remove_entry()

2025-03-11 Thread Roger Pau Monné
On Wed, Feb 26, 2025 at 12:52:45PM +0100, Jan Beulich wrote: > Using p2m_is_valid() isn't quite right here. It expanding to RAM+MMIO, > the subsequent p2m_mmio_direct check effectively reduces its use to > RAM+MMIO_DM. Yet MMIO_DM entries, which are never marked present in the > page tables, won't

Re: [PATCH 2/3] x86/P2M: correct old entry checking in p2m_remove_entry()

2025-03-11 Thread Roger Pau Monné
On Mon, Mar 10, 2025 at 04:16:36PM +0100, Roger Pau Monné wrote: > On Wed, Feb 26, 2025 at 12:52:45PM +0100, Jan Beulich wrote: > > Using p2m_is_valid() isn't quite right here. It expanding to RAM+MMIO, > > the subsequent p2m_mmio_direct check effectively reduces its use to > > RAM+MMIO_DM. Yet MMI

[PATCH 2/3] x86/P2M: correct old entry checking in p2m_remove_entry()

2025-02-26 Thread Jan Beulich
Using p2m_is_valid() isn't quite right here. It expanding to RAM+MMIO, the subsequent p2m_mmio_direct check effectively reduces its use to RAM+MMIO_DM. Yet MMIO_DM entries, which are never marked present in the page tables, won't pass the mfn_valid() check. It is, however, quite plausible (and supp