]> xenbits.xensource.com Git - xen.git/commit
x86/dom0: attempt to fixup p2m page-faults for PVH dom0
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 20 Mar 2025 12:16:14 +0000 (13:16 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 20 Mar 2025 12:16:14 +0000 (13:16 +0100)
commit2f47f9df89c8655d16bef125fb48c63170977582
tree1eeb7cf2c5d5cf21fea83f48045560f389383671
parentc6366b64dd498727bfb0e3aacc37c6db6d7242f1
x86/dom0: attempt to fixup p2m page-faults for PVH dom0

When building a PVH dom0 Xen attempts to map all (relevant) MMIO regions
into the p2m for dom0 access.  However the information Xen has about the
host memory map is limited.  Xen doesn't have access to any resources
described in ACPI dynamic tables, and hence the p2m mappings provided might
not be complete.

PV doesn't suffer from this issue because a PV dom0 is capable of mapping
into it's page-tables any address not explicitly banned in d->iomem_caps.

Introduce a new command line options that allows Xen to attempt to fixup
the p2m page-faults, by creating p2m identity maps in response to p2m
page-faults.

This is aimed as a workaround to small ACPI regions Xen doesn't know about.
Note that missing large MMIO regions mapped in this way will lead to
slowness due to the VM exit processing, plus the mappings will always use
small pages.

The ultimate aim is to attempt to bring better parity with a classic PV
dom0.

Note such fixup rely on the CPU doing the access to the unpopulated
address.  If the access is attempted from a device instead there's no
possible way to fixup, as IOMMU page-fault are asynchronous.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
master commit: 104591f5dd675d7bfb04885dace0e4e5a097fc1e
master date: 2025-03-05 10:26:46 +0100
CHANGELOG.md
docs/misc/xen-command-line.pandoc
xen/arch/x86/dom0_build.c
xen/arch/x86/hvm/emulate.c
xen/arch/x86/include/asm/hvm/emulate.h