All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Mikhalitsyn <alexander@mihalicyn.com>
To: qemu-devel@nongnu.org
Cc: "Klaus Jensen" <its@irrelevant.dk>,
	"Jesper Devantier" <foss@defmacro.it>,
	"Peter Xu" <peterx@redhat.com>,
	"Alexander Mikhalitsyn" <alexander@mihalicyn.com>,
	"Keith Busch" <kbusch@kernel.org>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Stéphane Graber" <stgraber@stgraber.org>,
	qemu-block@nongnu.org,
	"Alexander Mikhalitsyn" <aleksandr.mikhalitsyn@futurfusion.io>
Subject: [PATCH v2 0/4] hw/nvme: add basic live migration support
Date: Wed,  4 Mar 2026 10:12:25 +0100	[thread overview]
Message-ID: <20260304091229.80725-1-alexander@mihalicyn.com> (raw)

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.

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

Kind regards,
Alex

Alexander Mikhalitsyn (4):
  hw/nvme: add migration blockers for non-supported cases
  hw/nvme: split nvme_init_sq/nvme_init_cq into helpers
  migration: add VMSTATE_VARRAY_OF_POINTER_TO_STRUCT_UINT{8, 32}_ALLOC
  hw/nvme: add basic live migration support

 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 +++++
 5 files changed, 772 insertions(+), 30 deletions(-)

-- 
2.47.3



             reply	other threads:[~2026-03-04  9:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  9:12 Alexander Mikhalitsyn [this message]
2026-03-04  9:12 ` [PATCH v2 1/4] hw/nvme: add migration blockers for non-supported cases Alexander Mikhalitsyn
2026-03-04  9:12 ` [PATCH v2 2/4] hw/nvme: split nvme_init_sq/nvme_init_cq into helpers Alexander Mikhalitsyn
2026-03-04  9:12 ` [PATCH v2 3/4] migration: add VMSTATE_VARRAY_OF_POINTER_TO_STRUCT_UINT{8, 32}_ALLOC Alexander Mikhalitsyn
2026-03-04  9:12 ` [PATCH v2 4/4] hw/nvme: add basic live migration support Alexander Mikhalitsyn

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=20260304091229.80725-1-alexander@mihalicyn.com \
    --to=alexander@mihalicyn.com \
    --cc=aleksandr.mikhalitsyn@futurfusion.io \
    --cc=farosas@suse.de \
    --cc=foss@defmacro.it \
    --cc=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stgraber@stgraber.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.