Re: [PATCH v2 2/2] xen/vpci: allow unaligned accesses by the hardware domain

Jan Beulich <[email protected]> Fri, 7 Aug 2026 08:39:58 +0200
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 06.08.2026 17:26, Roger Pau Monne wrote:
> It's possible for domains to generate unaligned PCI config space accesses
> when using ECAM, and hence vPCI should support those at least for the
> hardware domain.  Such unaligned accesses to the PCI config space have been
> reported to come from ACPI logic.
> 
> Relax the checking in vpci_access_allowed() to allow such accesses for the
> hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
> fulfill them using MMCFG.
> 
> MMCFG regions are identity exposed to the hardware domain, and hence such
> unaligned accesses can only come as a result of the host having MMCFG in the
> first place, as otherwise MMCFG won't be exposed to the hardware domain
> either.
> 
> Note that vpci_ecam_{read,write}() already refuse accesses that cross a
> device boundary unconditionally.
> 
> Reported-by: Jason Andryuk <[email protected]>
> Signed-off-by: Roger Pau MonnĂ© <[email protected]>

Reviewed-by: Jan Beulich <[email protected]>

Albeit without the intent to override possible remaining objections by Andrew.

Jan