]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/pci: Do not register devices with segments >= 0x10000
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 19 Feb 2025 09:20:55 +0000 (10:20 +0100)
committerJuergen Gross <jgross@suse.com>
Fri, 21 Mar 2025 07:15:26 +0000 (08:15 +0100)
commit5ccf1b8ae76ddf348e02a0d1564ff9baf8b6c415
tree6f371a87d60f987f3873b62c6ed4bd8ba5b57e40
parent421d62f47b7a61794f04ddd9ec2e4fa2e209da90
xen/pci: Do not register devices with segments >= 0x10000

The current hypercall interface for doing PCI device operations always uses
a segment field that has a 16 bit width.  However on Linux there are buses
like VMD that hook up devices into the PCI hierarchy at segment >= 0x10000,
after the maximum possible segment enumerated in ACPI.

Attempting to register or manage those devices with Xen would result in
errors at best, or overlaps with existing devices living on the truncated
equivalent segment values.  Note also that the VMD segment numbers are
arbitrarily assigned by the OS, and hence there would need to be some
negotiation between Xen and the OS to agree on how to enumerate VMD
segments and devices behind them.

Skip notifying Xen about those devices.  Given how VMD bridges can
multiplex interrupts on behalf of devices behind them there's no need for
Xen to be aware of such devices for them to be usable by Linux.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
Message-ID: <20250219092059.90850-2-roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/pci.c