numam-spdk/test
Changpeng Liu d1c2027d01 nvmf/vfio-user: add NVMe live migration support finally
VFIO in QEMU uses region 9 as the PCI passthrough devices' migration channel.

The format of the region 9 migration region is as follows:
 ------------------------------------------------------------------
|vfio_device_migration_info|    data section                      |
 ------------------------------------------------------------------
QEMU will access vfio_device_migration_info to controll the migration
process.

For SPDK vfio-user target, we also implement the BAR9 via libvfio-user,
and we also define the NVMe device specific migration data stored in
data section of BAR9.  QEMU doesn't care about the format in data section,
it will help us to gather the NVMe specific migration data in source VM and
then restore the migration date to data section of BAR9 in destination VM.

The core idea to implement live migration will following the device state
change which is controlled by QEMU.  First QEMU will try to STOP the device
in the source VM, and set the destination VM to RESUME state, SPDK will save
NVMe devic state data structure to BAR9 in the source VM once the subsystem
is paused, then QEMU will read BAR9 in source VM and restore the content of
BAR9 in destination VM, finally in the destination VM, we will restore the
NVMe device state include BARs/PCI CFG/queue pairs in the destination VM.

Change-Id: I42e38f28c3ff59831be63290038b50d199d06658
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7617
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-01-27 20:55:16 +00:00
..
accel_engine test/accel_engine: add more test cases 2021-09-01 07:34:02 +00:00
app test/llvm_nvme_fuzz: add NAMESPACE ATTACHMENT and NAMESPACE MANAGEMENT 2022-01-12 08:21:14 +00:00
bdev scripts/common: set special name to test partitions 2022-01-26 19:07:43 +00:00
blobfs test/blobfs: update rocksdb version 2021-12-14 13:23:30 +00:00
blobstore scheduler: Change main core frequency dynamically 2021-01-22 18:31:25 +00:00
common test/dpdk: enable kmods on FreeBSD for upstream DPDK tests 2022-01-27 11:03:37 +00:00
compress test/nvmf: use recommended nvmf_create_subsystem rpc 2021-05-20 15:00:22 +00:00
cpp_headers queue_extras: use SPDK_CONTAINEROF 2019-10-07 15:06:01 +00:00
dd test/dd: Simple tests utilizing uring RPCs 2021-12-20 08:46:13 +00:00
dma test/dma: Update the test to run IO for some time 2021-11-18 08:21:43 +00:00
dpdk_memory_utility check_format: Ignore shellcheck's SC2128 and SC2178 directives 2021-06-30 22:43:05 +00:00
env spelling: test 2021-12-03 08:13:22 +00:00
event spelling: test 2021-12-03 08:13:22 +00:00
external_code test/common: move all LIB paths to autotest_common.sh 2022-01-26 08:19:06 +00:00
ftl autotest: Skip use of any zoned nvme devices 2021-12-06 08:34:46 +00:00
fuzz nvme_fuzz: pass trid on command line only 2021-09-27 10:55:34 +00:00
interrupt spelling: test 2021-12-03 08:13:22 +00:00
ioat build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
iscsi_tgt Lib/iSCSI: add the LUN Resize support 2022-01-20 07:56:23 +00:00
json_config test/json_config: Simplify events check 2021-12-16 08:49:53 +00:00
lvol spelling: test 2021-12-03 08:13:22 +00:00
make build: don't put out-of-tree ocf build in build/ dir 2021-08-17 08:54:30 +00:00
nvme scripts/common: set special name to test partitions 2022-01-26 19:07:43 +00:00
nvmf nvmf/rdma: Round up in_capsule_data_size to support msdbd=16 2022-01-20 00:37:30 +00:00
ocf check_format: Fixes for shellcheck's SC2251 directive 2021-06-30 22:43:05 +00:00
openstack test/openstack: restart whole devstack before tests 2021-12-23 08:36:21 +00:00
pmem spelling: test 2021-12-03 08:13:22 +00:00
rpc autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
rpc_client build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler test/scheduler: Ignore failures while removing dummy cgroups 2022-01-05 09:23:57 +00:00
setup autotest: Skip use of any zoned nvme devices 2021-12-06 08:34:46 +00:00
spdkcli autotest: Don't override default amount of hugepages on Linux to 8GB 2021-06-24 17:33:10 +00:00
thread test/thread: Add poller_perf to evaluate cost to run poller 2021-08-20 07:29:42 +00:00
unit nvmf/vfio-user: add NVMe live migration support finally 2022-01-27 20:55:16 +00:00
vfio_user test/vfio_user: Restart vm, check if memory region register/unregister failed 2021-12-31 10:10:24 +00:00
vhost scripts/common: set special name to test partitions 2022-01-26 19:07:43 +00:00
vmd test: replace VMD_WHITELIST with VMD_ALLOWED 2020-12-03 09:41:07 +00:00
Makefile test/dma: Add functional test to verify DMA 2021-09-24 07:37:45 +00:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00