[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 1/1] xen/pci: Install vpci handlers on x86 and fix error paths
On 20.10.2021 12:05, Bertrand Marquis wrote: > Xen might not be able to discover at boot time all devices or some devices > might appear after specific actions from dom0. > In this case dom0 can use the PHYSDEVOP_pci_device_add to signal some > PCI devices to Xen. > As those devices where not known from Xen before, the vpci handlers must > be properly installed during pci_device_add for x86 PVH Dom0, in the > same way as what is done currently on arm (where Xen does not detect PCI > devices but relies on Dom0 to declare them all the time). > > So this patch is removing the ifdef protecting the call to > vpci_add_handlers and the comment which was arm specific. > > vpci_add_handlers is called on during pci_device_add which can be called > at runtime through hypercall physdev_op. > Remove __hwdom_init as the call is not limited anymore to hardware > domain init and fix linker script to only keep vpci_array in rodata > section. > > Add missing vpci handlers cleanup during pci_device_remove and in case > of error with iommu during pci_device_add. > > Move code adding the domain to the pdev domain_list as vpci_add_handlers > needs this to be set and remove it from the list in the error path. > > Exit early of vpci_remove_device if the domain has no vpci support. > > Add empty static inline for vpci_remove_device when CONFIG_VPCI is not > defined. > > Add an ASSERT in vpci_add_handlers to check that the function is not > called twice for the same device. > > Fixes: d59168dc05 ("xen/arm: Enable the existing x86 virtual PCI support > for ARM") > Suggested-by: Jan Beulich <jbeulich@xxxxxxxx> > Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> This looks to address all review comments, so Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Thanks, Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |