All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xin Zeng <xin.zeng@intel.com>
To: linux-crypto@vger.kernel.org, kvm@vger.kernel.org
Cc: giovanni.cabiddu@intel.com, andriy.shevchenko@linux.intel.com,
	Xin Zeng <xin.zeng@intel.com>
Subject: [RFC 0/5] crypto: qat - enable SRIOV VF live migration
Date: Fri, 30 Jun 2023 21:12:59 +0800	[thread overview]
Message-ID: <20230630131304.64243-1-xin.zeng@intel.com> (raw)

This set enables live migration for Intel QAT GEN4 SRIOV Virtual
Functions (VFs). It is composed of 5 patches.
The first is a pre-requisite. It adds logic to the QAT PF driver that
allows to save and restore the state of a bank (a virtual function is a
wrapper around a bank) and drain a ring pair. The second patch adds to
the QAT PF driver a set of interfaces to allow to save and restore the
state of a VF that will be called by the modules qat_vfio_pci which will
be introduced in the last patch. The third adds HZ_PER_GHZ which will be
required by the fourth one. The fourth one implements the defined
interfaces. The last one adds a vfio pci extension specific for QAT
which intercepts the vfio device operations for a QAT VF to allow live
migration.

Here are the steps required to test the live migration of a QAT GEN4 VF:
1. Bind one or more QAT GEN4 VF devices to the module qat_vfio_pci.ko 
2. Assign the VFs to the virtual machine and enable device live
migration 
3. Run a workload using a QAT VF inside the VM, for example using qatlib
(https://github.com/intel/qatlib) 
4. Migrate the VM from the source node to a destination node

For P2P states support and AER support, we are going to implement these
in the final version. Any feedback is appreciated!

Andy Shevchenko (1):
  units: Add HZ_PER_GHZ

Siming Wan (1):
  crypto: qat - add bank save/restore and RP drain

Xin Zeng (3):
  crypto: qat - add interface for live migration
  crypto: qat - implement interface for live migration
  vfio/qat: Add vfio_pci driver for Intel QAT VF devices

 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     |   9 +-
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.h     |   3 +-
 .../intel/qat/qat_c3xxx/adf_c3xxx_hw_data.c   |   2 +-
 .../qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c     |   2 +-
 .../intel/qat/qat_c62x/adf_c62x_hw_data.c     |   2 +-
 .../intel/qat/qat_c62xvf/adf_c62xvf_hw_data.c |   2 +-
 drivers/crypto/intel/qat/qat_common/Makefile  |   4 +-
 .../intel/qat/qat_common/adf_accel_devices.h  |  78 ++-
 .../intel/qat/qat_common/adf_gen2_hw_data.c   |  17 +-
 .../intel/qat/qat_common/adf_gen2_hw_data.h   |  10 +-
 .../intel/qat/qat_common/adf_gen4_hw_data.c   | 415 +++++++++++-
 .../intel/qat/qat_common/adf_gen4_hw_data.h   | 152 ++++-
 .../intel/qat/qat_common/adf_gen4_pfvf.c      |   7 +-
 .../intel/qat/qat_common/adf_gen4_pfvf.h      |   7 +
 .../intel/qat/qat_common/adf_gen4_vf_mig.c    | 609 ++++++++++++++++++
 .../intel/qat/qat_common/adf_mstate_mgr.c     | 267 ++++++++
 .../intel/qat/qat_common/adf_mstate_mgr.h     |  99 +++
 .../intel/qat/qat_common/adf_transport.c      |  11 +-
 .../crypto/intel/qat/qat_common/adf_vf_isr.c  |   2 +-
 .../crypto/intel/qat/qat_common/qat_vf_mig.c  | 106 +++
 .../qat/qat_dh895xcc/adf_dh895xcc_hw_data.c   |   2 +-
 .../qat_dh895xccvf/adf_dh895xccvf_hw_data.c   |   2 +-
 drivers/vfio/pci/Kconfig                      |   2 +
 drivers/vfio/pci/Makefile                     |   1 +
 drivers/vfio/pci/qat/Kconfig                  |  13 +
 drivers/vfio/pci/qat/Makefile                 |   4 +
 drivers/vfio/pci/qat/qat_vfio_pci_main.c      | 518 +++++++++++++++
 include/linux/qat/qat_vf_mig.h                |  15 +
 include/linux/units.h                         |   6 +-
 29 files changed, 2332 insertions(+), 35 deletions(-)
 create mode 100644 drivers/crypto/intel/qat/qat_common/adf_gen4_vf_mig.c
 create mode 100644 drivers/crypto/intel/qat/qat_common/adf_mstate_mgr.c
 create mode 100644 drivers/crypto/intel/qat/qat_common/adf_mstate_mgr.h
 create mode 100644 drivers/crypto/intel/qat/qat_common/qat_vf_mig.c
 create mode 100644 drivers/vfio/pci/qat/Kconfig
 create mode 100644 drivers/vfio/pci/qat/Makefile
 create mode 100644 drivers/vfio/pci/qat/qat_vfio_pci_main.c
 create mode 100644 include/linux/qat/qat_vf_mig.h

-- 
2.18.2


             reply	other threads:[~2023-06-30 13:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 13:12 Xin Zeng [this message]
2023-06-30 13:13 ` [RFC 1/5] crypto: qat - add bank save/restore and RP drain Xin Zeng
2023-08-04  7:51   ` Tian, Kevin
2023-08-11  8:52     ` Wan, Siming
2023-06-30 13:13 ` [RFC 2/5] crypto: qat - add interface for live migration Xin Zeng
2023-08-04  7:52   ` Tian, Kevin
2023-08-24  7:27     ` Zeng, Xin
2023-06-30 13:13 ` [RFC 3/5] units: Add HZ_PER_GHZ Xin Zeng
2023-06-30 13:13 ` [RFC 4/5] crypto: qat - implement interface for live migration Xin Zeng
2023-08-04  7:55   ` Tian, Kevin
2023-08-24  7:28     ` Zeng, Xin
2023-06-30 13:13 ` [RFC 5/5] vfio/qat: Add vfio_pci driver for Intel QAT VF devices Xin Zeng
2023-07-26 19:37   ` Alex Williamson
2023-08-23 15:29     ` Zeng, Xin
2023-08-24 15:25       ` Alex Williamson
2023-08-04  8:09   ` Tian, Kevin
2023-08-24  7:29     ` Zeng, Xin
2023-08-16 16:20   ` Brett Creeley
2023-08-24  7:31     ` Zeng, Xin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230630131304.64243-1-xin.zeng@intel.com \
    --to=xin.zeng@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.