xen/arm: Add PHYSDEVOP_pci_device_(*add/remove) support for ARM
authorRahul Singh <rahul.singh@arm.com>
Wed, 6 Oct 2021 17:40:28 +0000 (18:40 +0100)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Thu, 7 Oct 2021 19:29:51 +0000 (12:29 -0700)
commitf9187cf17597907fb6ce4ca65463d6232ef3b36c
treea697df6f8cea38d87ca4aa236e7e12351379c546
parent2a04f396a34c5a43b9a09d72e8c4f49c64066cce
xen/arm: Add PHYSDEVOP_pci_device_(*add/remove) support for ARM

Hardware domain is in charge of doing the PCI enumeration and will
discover the PCI devices and then will communicate to XEN via hyper
call PHYSDEVOP_pci_device_add(..) to add the PCI devices in XEN.

Also implement PHYSDEVOP_pci_device_remove(..) to remove the PCI device.

As most of the code for PHYSDEVOP_pci_device_* is the same between x86
and ARM, move the code to a common file to avoid duplication.

There are other PHYSDEVOP_pci_device_* operations to add PCI devices.
Currently implemented PHYSDEVOP_pci_device_remove(..) and
PHYSDEVOP_pci_device_add(..) only as those are minimum required to
support PCI passthrough on ARM.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/arm/physdev.c
xen/arch/x86/physdev.c
xen/arch/x86/x86_64/physdev.c
xen/drivers/pci/Makefile
xen/drivers/pci/physdev.c [new file with mode: 0644]
xen/include/public/arch-arm.h
xen/include/xen/hypercall.h