Re: [PATCH iwl-next v3 13/13] vfio/ice: Implement vfio_pci driver for E800 devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/4/2023 6:04 AM, Alex Williamson wrote:
On Mon, 18 Sep 2023 06:25:46 +0000
Yahui Cao <yahui.cao@xxxxxxxxx> wrote:

From: Lingyu Liu <lingyu.liu@xxxxxxxxx>

Add a vendor-specific vfio_pci driver for E800 devices.

It uses vfio_pci_core to register to the VFIO subsystem and then
implements the E800 specific logic to support VF live migration.

It implements the device state transition flow for live
migration.

Signed-off-by: Lingyu Liu <lingyu.liu@xxxxxxxxx>
Signed-off-by: Yahui Cao <yahui.cao@xxxxxxxxx>
---
  MAINTAINERS                         |   7 +
  drivers/vfio/pci/Kconfig            |   2 +
  drivers/vfio/pci/Makefile           |   2 +
  drivers/vfio/pci/ice/Kconfig        |  10 +
  drivers/vfio/pci/ice/Makefile       |   4 +
  drivers/vfio/pci/ice/ice_vfio_pci.c | 707 ++++++++++++++++++++++++++++
  6 files changed, 732 insertions(+)
  create mode 100644 drivers/vfio/pci/ice/Kconfig
  create mode 100644 drivers/vfio/pci/ice/Makefile
  create mode 100644 drivers/vfio/pci/ice/ice_vfio_pci.c
The prerequisite ice core driver support (ie. patches 1-12) should be
supplied as a branch to allow this variant driver to be merged through
the vfio tree.


Tony, are you the right one who can help on deal with ice driver and variant driver merging dependency ?



diff --git a/MAINTAINERS b/MAINTAINERS
index 389fe9e38884..09ea8454219a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22608,6 +22608,13 @@ L:	kvm@xxxxxxxxxxxxxxx
  S:	Maintained
  F:	drivers/vfio/pci/mlx5/
+VFIO ICE PCI DRIVER
+M:	Yahui Cao <yahui.cao@xxxxxxxxx>
+M:	Lingyu Liu <lingyu.liu@xxxxxxxxx>
+L:	kvm@xxxxxxxxxxxxxxx
+S:	Maintained
+F:	drivers/vfio/pci/ice/
+
  VFIO PCI DEVICE SPECIFIC DRIVERS
  R:	Jason Gunthorpe <jgg@xxxxxxxxxx>
  R:	Yishai Hadas <yishaih@xxxxxxxxxx>
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index 8125e5f37832..6618208947af 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
@@ -65,4 +65,6 @@ source "drivers/vfio/pci/hisilicon/Kconfig"
source "drivers/vfio/pci/pds/Kconfig" +source "drivers/vfio/pci/ice/Kconfig"
+
  endmenu
diff --git a/drivers/vfio/pci/Makefile b/drivers/vfio/pci/Makefile
index 45167be462d8..fc1df82df3ac 100644
--- a/drivers/vfio/pci/Makefile
+++ b/drivers/vfio/pci/Makefile
@@ -13,3 +13,5 @@ obj-$(CONFIG_MLX5_VFIO_PCI)           += mlx5/
  obj-$(CONFIG_HISI_ACC_VFIO_PCI) += hisilicon/
obj-$(CONFIG_PDS_VFIO_PCI) += pds/
+
+obj-$(CONFIG_ICE_VFIO_PCI) += ice/
diff --git a/drivers/vfio/pci/ice/Kconfig b/drivers/vfio/pci/ice/Kconfig
new file mode 100644
index 000000000000..4c6f348d3062
--- /dev/null
+++ b/drivers/vfio/pci/ice/Kconfig
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config ICE_VFIO_PCI
+	tristate "VFIO support for Intel(R) Ethernet Connection E800 Series"
+	depends on ICE
+	depends on VFIO_PCI_CORE
s/depends on/select/


Sure. Will change to select VFIO_PCI_CORE


+	help
+	  This provides migration support for Intel(R) Ethernet connection E800
+	  series devices using the VFIO framework.
+
+	  If you don't know what to do here, say N.
diff --git a/drivers/vfio/pci/ice/Makefile b/drivers/vfio/pci/ice/Makefile
new file mode 100644
index 000000000000..259d4ab89105
--- /dev/null
+++ b/drivers/vfio/pci/ice/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_ICE_VFIO_PCI) += ice-vfio-pci.o
+ice-vfio-pci-y := ice_vfio_pci.o
+
diff --git a/drivers/vfio/pci/ice/ice_vfio_pci.c b/drivers/vfio/pci/ice/ice_vfio_pci.c
new file mode 100644
index 000000000000..60a0582d7932
--- /dev/null
+++ b/drivers/vfio/pci/ice/ice_vfio_pci.c
Suggest renaming this to main.c


If changing this to drivers/vfio/pci/ice/main.c, it may cause some naming conflict with networking driver file drivers/net/ethernet/intel/ice/ice_main.c and confusion.

Could we still use ice_vfio_pci.c ? Since this variant driver only has single c source file( like hisilicon variant driver )


Thanks.
Yahui.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux