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).
v2->v3: * new patch [1] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg00475.html [2] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg00210.html --- xen/arch/arm/domain_build.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 24c9019cc43c..c1174535f430 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -3912,6 +3912,9 @@ void __init create_dom0(void) panic("SVE vector length error\n"); } + if ( IS_ENABLED(CONFIG_HAS_VPCI) ) + dom0_cfg.arch.pci_flags = XEN_DOMCTL_CONFIG_PCI_VPCI; + dom0 = domain_create(0, &dom0_cfg, CDF_privileged | CDF_directmap); if ( IS_ERR(dom0) ) panic("Error creating domain 0 (rc = %ld)\n", PTR_ERR(dom0)); -- 2.42.0