public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
@ 2026-02-13  9:14 Suman Kumar Chakraborty
  2026-03-09 23:02 ` Alex Williamson
  2026-03-20 21:18 ` Alex Williamson
  0 siblings, 2 replies; 6+ messages in thread
From: Suman Kumar Chakraborty @ 2026-02-13  9:14 UTC (permalink / raw)
  To: jgg, yishaih, skolothumtho, kevin.tian, giovanni.cabiddu, alex,
	kvm, qat-linux

From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>

Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
the VFIO driver also supports VFs from the 420xx and 6xxx device
families, which share a compatible migration interface.

Extends the Kconfig dependencies to allow configuration when any of the
supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.

Signed-off-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
 drivers/vfio/pci/qat/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/pci/qat/Kconfig b/drivers/vfio/pci/qat/Kconfig
index bf52cfa4b595..83f037d7e9a4 100644
--- a/drivers/vfio/pci/qat/Kconfig
+++ b/drivers/vfio/pci/qat/Kconfig
@@ -2,7 +2,7 @@
 config QAT_VFIO_PCI
 	tristate "VFIO support for QAT VF PCI devices"
 	select VFIO_PCI_CORE
-	depends on CRYPTO_DEV_QAT_4XXX
+	depends on CRYPTO_DEV_QAT_4XXX || CRYPTO_DEV_QAT_420XX || CRYPTO_DEV_QAT_6XXX
 	help
 	  This provides migration support for Intel(R) QAT Virtual Function
 	  using the VFIO framework.

base-commit: b10c62483b324e60e45fb27d7fdc09c9198993d7
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
  2026-02-13  9:14 [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices Suman Kumar Chakraborty
@ 2026-03-09 23:02 ` Alex Williamson
  2026-03-10 17:27   ` Giovanni Cabiddu
  2026-03-20 21:18 ` Alex Williamson
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Williamson @ 2026-03-09 23:02 UTC (permalink / raw)
  To: Suman Kumar Chakraborty
  Cc: jgg, yishaih, skolothumtho, kevin.tian, giovanni.cabiddu, kvm,
	qat-linux, alex

On Fri, 13 Feb 2026 09:14:03 +0000
Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> wrote:

> From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> 
> Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
> QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
> the VFIO driver also supports VFs from the 420xx and 6xxx device
> families, which share a compatible migration interface.
> 
> Extends the Kconfig dependencies to allow configuration when any of the
> supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.

420xx seems to be device ID 0x4947:

drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
#define PCI_DEVICE_ID_INTEL_QAT_420XXIOV 0x4947

We don't currently have that in the ID table for the vfio qat driver:

static const struct pci_device_id qat_vf_vfio_pci_table[] = {
        /* Intel QAT GEN4 4xxx VF device */
        { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4941) },
        { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4943) },
        { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4945) },
        /* Intel QAT GEN6 6xxx VF device */
        { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4949) },
        {}
};

Are we missing support for this device and is this Kconfig change
therefore a little overeager?  Thanks,

Alex

> Signed-off-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---
>  drivers/vfio/pci/qat/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/pci/qat/Kconfig b/drivers/vfio/pci/qat/Kconfig
> index bf52cfa4b595..83f037d7e9a4 100644
> --- a/drivers/vfio/pci/qat/Kconfig
> +++ b/drivers/vfio/pci/qat/Kconfig
> @@ -2,7 +2,7 @@
>  config QAT_VFIO_PCI
>  	tristate "VFIO support for QAT VF PCI devices"
>  	select VFIO_PCI_CORE
> -	depends on CRYPTO_DEV_QAT_4XXX
> +	depends on CRYPTO_DEV_QAT_4XXX || CRYPTO_DEV_QAT_420XX || CRYPTO_DEV_QAT_6XXX
>  	help
>  	  This provides migration support for Intel(R) QAT Virtual Function
>  	  using the VFIO framework.
> 
> base-commit: b10c62483b324e60e45fb27d7fdc09c9198993d7


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
  2026-03-09 23:02 ` Alex Williamson
@ 2026-03-10 17:27   ` Giovanni Cabiddu
  2026-03-10 17:40     ` Alex Williamson
  0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Cabiddu @ 2026-03-10 17:27 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Suman Kumar Chakraborty, jgg, yishaih, skolothumtho, kevin.tian,
	kvm, qat-linux

On Mon, Mar 09, 2026 at 05:02:47PM -0600, Alex Williamson wrote:
> On Fri, 13 Feb 2026 09:14:03 +0000
> Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> wrote:
> 
> > From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> > 
> > Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
> > QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
> > the VFIO driver also supports VFs from the 420xx and 6xxx device
> > families, which share a compatible migration interface.
> > 
> > Extends the Kconfig dependencies to allow configuration when any of the
> > supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.
> 
> 420xx seems to be device ID 0x4947:
> 
> drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
> #define PCI_DEVICE_ID_INTEL_QAT_420XXIOV 0x4947
> 
> We don't currently have that in the ID table for the vfio qat driver:
> 
> static const struct pci_device_id qat_vf_vfio_pci_table[] = {
>         /* Intel QAT GEN4 4xxx VF device */
>         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4941) },
>         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4943) },
>         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4945) },
>         /* Intel QAT GEN6 6xxx VF device */
>         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4949) },
>         {}
> };
> 
> Are we missing support for this device and is this Kconfig change
> therefore a little overeager?
The PF-side live migration support for the 420xx VF (0x4947) was added
in [1], however the qat_vf_vfio_pci_table in the qat_vfio_pci driver wasn't
updated to include that device. I'm going to send a patch to add that.

Do you prefer both changes (Kconfig and table) on the same patch?

[1] https://lore.kernel.org/all/20251120163023.29288-1-giovanni.cabiddu@intel.com/

Thanks,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
  2026-03-10 17:27   ` Giovanni Cabiddu
@ 2026-03-10 17:40     ` Alex Williamson
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Williamson @ 2026-03-10 17:40 UTC (permalink / raw)
  To: Giovanni Cabiddu
  Cc: Suman Kumar Chakraborty, jgg, yishaih, skolothumtho, kevin.tian,
	kvm, qat-linux, alex

On Tue, 10 Mar 2026 17:27:26 +0000
Giovanni Cabiddu <giovanni.cabiddu@intel.com> wrote:

> On Mon, Mar 09, 2026 at 05:02:47PM -0600, Alex Williamson wrote:
> > On Fri, 13 Feb 2026 09:14:03 +0000
> > Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> wrote:
> >   
> > > From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> > > 
> > > Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
> > > QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
> > > the VFIO driver also supports VFs from the 420xx and 6xxx device
> > > families, which share a compatible migration interface.
> > > 
> > > Extends the Kconfig dependencies to allow configuration when any of the
> > > supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.  
> > 
> > 420xx seems to be device ID 0x4947:
> > 
> > drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
> > #define PCI_DEVICE_ID_INTEL_QAT_420XXIOV 0x4947
> > 
> > We don't currently have that in the ID table for the vfio qat driver:
> > 
> > static const struct pci_device_id qat_vf_vfio_pci_table[] = {
> >         /* Intel QAT GEN4 4xxx VF device */
> >         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4941) },
> >         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4943) },
> >         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4945) },
> >         /* Intel QAT GEN6 6xxx VF device */
> >         { PCI_DRIVER_OVERRIDE_DEVICE_VFIO(PCI_VENDOR_ID_INTEL, 0x4949) },
> >         {}
> > };
> > 
> > Are we missing support for this device and is this Kconfig change
> > therefore a little overeager?  
> The PF-side live migration support for the 420xx VF (0x4947) was added
> in [1], however the qat_vf_vfio_pci_table in the qat_vfio_pci driver wasn't
> updated to include that device. I'm going to send a patch to add that.
> 
> Do you prefer both changes (Kconfig and table) on the same patch?
> 
> [1] https://lore.kernel.org/all/20251120163023.29288-1-giovanni.cabiddu@intel.com/

A separate patch is fine.  Thanks,

Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
  2026-02-13  9:14 [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices Suman Kumar Chakraborty
  2026-03-09 23:02 ` Alex Williamson
@ 2026-03-20 21:18 ` Alex Williamson
  2026-03-20 21:40   ` Giovanni Cabiddu
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Williamson @ 2026-03-20 21:18 UTC (permalink / raw)
  To: Suman Kumar Chakraborty
  Cc: jgg, yishaih, skolothumtho, kevin.tian, giovanni.cabiddu, kvm,
	qat-linux, alex

On Fri, 13 Feb 2026 09:14:03 +0000
Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> wrote:

> From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> 
> Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
> QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
> the VFIO driver also supports VFs from the 420xx and 6xxx device
> families, which share a compatible migration interface.
> 
> Extends the Kconfig dependencies to allow configuration when any of the
> supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.
> 
> Signed-off-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---
>  drivers/vfio/pci/qat/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/vfio/pci/qat/Kconfig b/drivers/vfio/pci/qat/Kconfig
> index bf52cfa4b595..83f037d7e9a4 100644
> --- a/drivers/vfio/pci/qat/Kconfig
> +++ b/drivers/vfio/pci/qat/Kconfig
> @@ -2,7 +2,7 @@
>  config QAT_VFIO_PCI
>  	tristate "VFIO support for QAT VF PCI devices"
>  	select VFIO_PCI_CORE
> -	depends on CRYPTO_DEV_QAT_4XXX
> +	depends on CRYPTO_DEV_QAT_4XXX || CRYPTO_DEV_QAT_420XX || CRYPTO_DEV_QAT_6XXX
>  	help
>  	  This provides migration support for Intel(R) QAT Virtual Function
>  	  using the VFIO framework.
> 
> base-commit: b10c62483b324e60e45fb27d7fdc09c9198993d7

Applied to vfio next branch for v7.1, still waiting on a patch that
actually adds support for for 420xx to the variant driver.  Thanks,

Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices
  2026-03-20 21:18 ` Alex Williamson
@ 2026-03-20 21:40   ` Giovanni Cabiddu
  0 siblings, 0 replies; 6+ messages in thread
From: Giovanni Cabiddu @ 2026-03-20 21:40 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Suman Kumar Chakraborty, jgg, yishaih, skolothumtho, kevin.tian,
	kvm, qat-linux

On Fri, Mar 20, 2026 at 03:18:35PM -0600, Alex Williamson wrote:
> On Fri, 13 Feb 2026 09:14:03 +0000
> Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> wrote:
> 
> > From: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> > 
> > Currently, the QAT VFIO PCI driver can only be configured when the 4xxx
> > QAT driver (CRYPTO_DEV_QAT_4XXX) is enabled. This is too restrictive as
> > the VFIO driver also supports VFs from the 420xx and 6xxx device
> > families, which share a compatible migration interface.
> > 
> > Extends the Kconfig dependencies to allow configuration when any of the
> > supported QAT device families (4xxx, 420xx, or 6xxx) are enabled.
> > 
> > Signed-off-by: Vijay Sundar Selvamani <vijay.sundar.selvamani@intel.com>
> > Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>
> > Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> > ---
> >  drivers/vfio/pci/qat/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/vfio/pci/qat/Kconfig b/drivers/vfio/pci/qat/Kconfig
> > index bf52cfa4b595..83f037d7e9a4 100644
> > --- a/drivers/vfio/pci/qat/Kconfig
> > +++ b/drivers/vfio/pci/qat/Kconfig
> > @@ -2,7 +2,7 @@
> >  config QAT_VFIO_PCI
> >  	tristate "VFIO support for QAT VF PCI devices"
> >  	select VFIO_PCI_CORE
> > -	depends on CRYPTO_DEV_QAT_4XXX
> > +	depends on CRYPTO_DEV_QAT_4XXX || CRYPTO_DEV_QAT_420XX || CRYPTO_DEV_QAT_6XXX
> >  	help
> >  	  This provides migration support for Intel(R) QAT Virtual Function
> >  	  using the VFIO framework.
> > 
> > base-commit: b10c62483b324e60e45fb27d7fdc09c9198993d7
> 
> Applied to vfio next branch for v7.1, still waiting on a patch that
> actually adds support for for 420xx to the variant driver.  Thanks,
Submitted. Apologies for the delay.

Regards,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-20 21:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13  9:14 [PATCH] vfio/qat: extend Kconfig dependencies for 420xx and 6xxx devices Suman Kumar Chakraborty
2026-03-09 23:02 ` Alex Williamson
2026-03-10 17:27   ` Giovanni Cabiddu
2026-03-10 17:40     ` Alex Williamson
2026-03-20 21:18 ` Alex Williamson
2026-03-20 21:40   ` Giovanni Cabiddu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox