On 10/20/23 13:33, Julien Grall wrote: > Hi Stewart, > > On 09/10/2023 20:57, Stewart Hildebrand wrote: >> Set the pci flags in xen_arch_domainconfig to enable vPCI for dom0. >> >> Signed-off-by: Stewart Hildebrand <stewart.hildebr...@amd.com> >> --- >> Julien had a suggestion to make this conditional on pci_passthrough_enabled >> [1]. >> However, in v5 of the PCI ARM SMMU series [2], we propose removing the >> pci_passthrough_enabled flag. If pci_passthrough_enabled is gone, the >> conditions >> under which vPCI should be enabled for dom0 aren't entirely clear to me >> (other >> than CONFIG_HAS_VPCI=y). > > I think it should be based on whether Xen detected a PCI hostbridge in > system. I haven't looked which variable/function could be used in Xen > for this purpose.
We can slightly tweak pci_host_iterate_bridges_and_count() and use that. Also, a full revert of the pci_passthrough_enabled flag over in the SMMU series probably wasn't the best approach, so I'll add pci_passthrough_enabled into the mix too. > > Cheers, > > -- > Julien Grall