PCI: don't allow "pci-phantom=" to mark real devices as phantom functions
authorJan Beulich <jbeulich@suse.com>
Fri, 20 May 2022 10:20:35 +0000 (12:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 20 May 2022 10:20:35 +0000 (12:20 +0200)
commit444b555dc9e09fa3ce90f066e0c88dec9b47f422
tree6f45cde962afc83a14e2a362486b518b8f40d4b5
parent6a2ea1a2370a0c8a0210accac0ae62e68c185134
PCI: don't allow "pci-phantom=" to mark real devices as phantom functions

IOMMU code mapping / unmapping devices and interrupts will misbehave if
a wrong command line option declared a function "phantom" when there's a
real device at that position. Warn about this and adjust the specified
stride (in the worst case ignoring the option altogether).

Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/drivers/passthrough/pci.c