On 16/08/2021 16:31, Jan Beulich wrote:
> While already the case for PVH, there's no reason to treat PV
> differently here (except of course where to take the addresses from).
>
> Signed-off-by: Jan Beulich <[email protected]>

Honestly, this is already a mess but I think the change is making things
worse rather than better.

To start with, IO-APIC windows are 1k not 4k, except that no-one added a
"4k safe" flag because IO-APICs weren't mapped into userspace by Linux
at the time.

More generally though, if something is safe to let dom0 map in the CPU
pagetables, it is safe to go in the IOMMU pagetables.  Conversely, if
it's not safe to go in one, it's not safe to go in either.

Mappings (or at least mapability) of everything/anything should be
uniform between the CPU and IOMMU pagetables for any kind of sanity to
prevail.

This is most easily demonstrated with PVH dom0 and shared vs split EPT
tables.  Split vs shared is an internal choice within Xen, and shouldn't
cause in any change in static DMA behaviour (obviously - there is
transient difference with logdirty but that's not relevant here).

~Andrew


Reply via email to