Re: [PATCH v6 3/8] vpci: Hide legacy capability when it fails to initialize

2025-06-19 Thread Chen, Jiqian
On 2025/6/18 22:09, Jan Beulich wrote: > On 12.06.2025 11:29, Jiqian Chen wrote: >> --- a/xen/drivers/vpci/vpci.c >> +++ b/xen/drivers/vpci/vpci.c >> @@ -83,6 +83,88 @@ static int assign_virtual_sbdf(struct pci_dev *pdev) >> >> #endif /* CONFIG_HAS_VPCI_GUEST_SUPPORT */ >> >> +static struct vp

Re: [PATCH v6 3/8] vpci: Hide legacy capability when it fails to initialize

2025-06-18 Thread Jan Beulich
On 12.06.2025 11:29, Jiqian Chen wrote: > --- a/xen/drivers/vpci/vpci.c > +++ b/xen/drivers/vpci/vpci.c > @@ -83,6 +83,88 @@ static int assign_virtual_sbdf(struct pci_dev *pdev) > > #endif /* CONFIG_HAS_VPCI_GUEST_SUPPORT */ > > +static struct vpci_register *vpci_get_register(struct vpci *vpci

Re: [PATCH v6 3/8] vpci: Hide legacy capability when it fails to initialize

2025-06-18 Thread Jan Beulich
On 12.06.2025 11:29, Jiqian Chen wrote: > --- a/xen/drivers/vpci/vpci.c > +++ b/xen/drivers/vpci/vpci.c > @@ -83,6 +83,88 @@ static int assign_virtual_sbdf(struct pci_dev *pdev) > > #endif /* CONFIG_HAS_VPCI_GUEST_SUPPORT */ > > +static struct vpci_register *vpci_get_register(struct vpci *vpci

[PATCH v6 3/8] vpci: Hide legacy capability when it fails to initialize

2025-06-12 Thread Jiqian Chen
When vpci fails to initialize a legacy capability of device, it just returns an error and vPCI gets disabled for the whole device. That most likely renders the device unusable, plus possibly causing issues to Xen itself if guest attempts to program the native MSI or MSI-X capabilities if present.