[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 4/5] [FUTURE] xen/arm: enable vPCI for domUs



Hi,

On 31/10/2023 11:03, Jan Beulich wrote:
On 31.10.2023 00:52, Stewart Hildebrand wrote:
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1618,6 +1618,16 @@ int iommu_do_pci_domctl(
          bus = PCI_BUS(machine_sbdf);
          devfn = PCI_DEVFN(machine_sbdf);
+ if ( IS_ENABLED(CONFIG_ARM) &&
+             !is_hardware_domain(d) &&
+             !is_system_domain(d) &&
+             (!IS_ENABLED(CONFIG_HAS_VPCI_GUEST_SUPPORT) || !has_vpci(d)) )

I don't think you need the explicit ARM check; that's redundant with
checking !HAS_VPCI_GUEST_SUPPORT. It's also not really clear why you
need to check for the system domain here.

I might be missing but I wouldn't expect the domain to have vPCI enabled if CONFIG_HAVE_VPCI_GUEST_SUPPORT=n. So why can't this simply be:

if ( !has_vcpi(d) )
{
   ...
}

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.