On 21.04.2025 08:18, Jiqian Chen wrote: > @@ -759,10 +759,11 @@ static int vpci_init_capability_list(struct pci_dev > *pdev) > PCI_CAP_ID_MSI, > PCI_CAP_ID_MSIX, > }; > + const unsigned int *caps = is_hwdom ? NULL : supported_caps; > + const unsigned int n = is_hwdom ? 0 : ARRAY_SIZE(supported_caps); > > next = pci_find_next_cap_ttl(pdev->sbdf, PCI_CAPABILITY_LIST, > - supported_caps, > - ARRAY_SIZE(supported_caps), &ttl); > + caps, n, &ttl);
As per the v3 adjustment to patch 02, you can pass supported_caps here in all cases. Only n needs to be zero for the hwdom case. Jan