> -----Original Message----- > From: Alex Williamson <[email protected]> > Sent: Tuesday, September 22, 2026 7:45 AM > To: Manish Honap <[email protected]> > Cc: [email protected]; Ankit Agrawal <[email protected]>; [email protected]; > [email protected]; [email protected]; Srirangan > Madhavan <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; Yishai > Hadas <[email protected]>; Shameer Kolothum Thodi > <[email protected]>; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; Neo Jia > <[email protected]>; Krishnakant Jaju <[email protected]>; Vikram Sethi > <[email protected]>; Zhi Wang <[email protected]>; linux- > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; linux- > [email protected]; [email protected]; [email protected] > Subject: Re: [PATCH v5 08/27] vfio/pci: Fall back to plain vfio-pci when CXL > init > fails > > External email: Use caution opening links or attachments > > > On Thu, 17 Sep 2026 00:05:21 +0530 > <[email protected]> wrote: > > > From: Manish Honap <[email protected]> > > > > A CXL Type-2 device is also a valid plain vfio-pci device. If the > > vfio-cxl provider cannot bring it up as Type-2, failing the bind would > > regress a device that previously worked as plain vfio-pci. > > > > Make a non-deferred CXL init failure non-fatal: log it, drop the > > provider reference, leave cxl_ops NULL, and continue driving the > > device as plain vfio-pci. The -EPROBE_DEFER path added earlier still > > retries rather than falling back. > > > > Assisted-by: LLM > > Signed-off-by: Manish Honap <[email protected]> > > --- > > drivers/vfio/pci/vfio_pci_core.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/vfio/pci/vfio_pci_core.c > > b/drivers/vfio/pci/vfio_pci_core.c > > index a63a4f5228b8..9a75c30b67e2 100644 > > --- a/drivers/vfio/pci/vfio_pci_core.c > > +++ b/drivers/vfio/pci/vfio_pci_core.c > > @@ -2271,9 +2271,17 @@ static int vfio_pci_core_cxl_init(struct > vfio_pci_core_device *vdev) > > vfio_pci_put_cxl_ops(ops); > > return ret; > > } > > + /* > > + * Any other failure is non-fatal: a CXL device that cannot be brought > > + * up as Type-2 still works as plain vfio-pci, so log and continue > > + * rather than failing the bind. > > + */ > > if (ret) { > > + pci_warn(vdev->pdev, > > + "CXL init failed (%d), continuing as plain > > vfio-pci\n", > > + ret); > > vfio_pci_put_cxl_ops(ops); > > - return ret; > > + return 0; > > } > > > > vdev->cxl_ops = ops; > > Why isn't this the initial implementation in patch 6? I don't fully > understand > why patches 7 and 8 are circling back to modify the broken behavior > established in patch 6 rather than resolving it in the patch where it was > introduced. > > Perhaps rephrasing the message, "... continuing without CXL support". "plain > vfio-pci" doesn't mean anything to a user that only knows to use vfio-pci. > Thanks, >
Agreed. Sorry for this churn; In v6 I will fold 07 and 08 into 06, so the provider hookup lands with its final error handling: -EPROBE_DEFER from the provider defers the bind, and any other init error leaves the device bound without the CXL extensions. I will also update the error message to mention "continuing without CXL support" and remove any references to "plain vfio-pci". > Alex

