All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] hw/nvme: add basic live migration support
@ 2026-03-06 15:03 Alexander Mikhalitsyn
  2026-03-06 15:03 ` [PATCH v3 1/6] migration: add VMSTATE_VARRAY_OF_POINTER_TO_STRUCT_UINT{8, 32}_ALLOC Alexander Mikhalitsyn
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Alexander Mikhalitsyn @ 2026-03-06 15:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Zhao Liu, Jesper Devantier, Alexander Mikhalitsyn, Klaus Jensen,
	Stéphane Graber, Paolo Bonzini, qemu-block, Keith Busch,
	Peter Xu, Fabiano Rosas, Alexander Mikhalitsyn

From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>

Dear friends,

This patchset adds basic live migration support for
QEMU emulated NVMe device.

Implementation has some limitations:
- only one NVMe namespace is supported
- SMART counters are not preserved
- CMB is not supported
- PMR is not supported
- SPDM is not supported
- SR-IOV is not supported

I believe this is something I can support in next patchset versions or
separately on-demand (when usecase appears).

Testing.

This patch series was manually tested on:
- Debian 13.3 VM (kernel 6.12.69+deb13-amd64) using fio on *non-root* NVMe disk
  (root disk was virtio-scsi):

time fio --name=nvme-verify \
    --filename=/dev/nvme0n1 \
    --size=5G \
    --rw=randwrite \
    --bs=4k \
    --iodepth=16 \
    --numjobs=1 \
    --direct=0 \
    --ioengine=io_uring \
    --verify=crc32c \
    --verify_fatal=1

- Windows Server 2022 VM (NVMe drive was a *root* disk) with opened browser
  playing video.

No defects were found.

I'm currently working to address feedback from Peter Xu and Klaus Jensen:
- improvements on migration API side to make dynamic arrays support more flexible
- figuring out what is a right way to go with NVMe feature migration capability checks

Changelog for version 3:
- rebased
- simple functional test was added (in accordance with Klaus Jensen's review comment)
  $ meson test 'func-x86_64-nvme_migration' --setup thorough -C build

Changelog for version 2:
- full support for AERs (in-flight requests and queued events too)

Kind regards,
Alex

Alexander Mikhalitsyn (6):
  migration: add VMSTATE_VARRAY_OF_POINTER_TO_STRUCT_UINT{8, 32}_ALLOC
  tests/functional/migration: add VM launch/configure hooks
  hw/nvme: add migration blockers for non-supported cases
  hw/nvme: split nvme_init_sq/nvme_init_cq into helpers
  hw/nvme: add basic live migration support
  tests/functional/x86_64: add migration test for NVMe device

 hw/nvme/ctrl.c                                | 665 +++++++++++++++++-
 hw/nvme/nvme.h                                |   5 +
 hw/nvme/trace-events                          |  11 +
 include/migration/vmstate.h                   |  33 +
 migration/vmstate-types.c                     |  88 +++
 tests/functional/migration.py                 |  22 +-
 tests/functional/x86_64/meson.build           |   1 +
 .../functional/x86_64/test_nvme_migration.py  | 159 +++++
 8 files changed, 951 insertions(+), 33 deletions(-)
 create mode 100755 tests/functional/x86_64/test_nvme_migration.py

-- 
2.47.3



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

end of thread, other threads:[~2026-03-13 14:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 15:03 [PATCH v3 0/6] hw/nvme: add basic live migration support Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 1/6] migration: add VMSTATE_VARRAY_OF_POINTER_TO_STRUCT_UINT{8, 32}_ALLOC Alexander Mikhalitsyn
2026-03-06 15:55   ` Peter Xu
2026-03-06 15:57     ` Alexander Mikhalitsyn
2026-03-06 16:34       ` Peter Xu
2026-03-13 14:22         ` Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 2/6] tests/functional/migration: add VM launch/configure hooks Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 3/6] hw/nvme: add migration blockers for non-supported cases Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 4/6] hw/nvme: split nvme_init_sq/nvme_init_cq into helpers Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 5/6] hw/nvme: add basic live migration support Alexander Mikhalitsyn
2026-03-06 15:03 ` [PATCH v3 6/6] tests/functional/x86_64: add migration test for NVMe device Alexander Mikhalitsyn

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.