Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 9d8ffbfc1d371131cd2b44dc40f3d2fa1b90faae
https://github.com/qemu/qemu/commit/9d8ffbfc1d371131cd2b44dc40f3d2fa1b90faae
Author: Chao Liu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M MAINTAINERS
M tests/qtest/libqos/meson.build
A tests/qtest/libqos/qos-riscv-iommu.c
A tests/qtest/libqos/qos-riscv-iommu.h
Log Message:
-----------
tests/qtest/libqos: Add RISC-V IOMMU helper library
Introduce a libqos helper module for RISC-V IOMMU testing with
iommu-testdev. The helper provides routines to:
- Build device contexts (DC) and 3-level page tables for SV39/SV39x4
- Program command queue (CQ), fault queue (FQ), and DDTP registers
following the RISC-V IOMMU specification
- Execute DMA translations and verify results
The current implementation supports SV39 for S-stage and SV39x4 for
G-stage translation. Support for SV48/SV48x4/SV57/SV57x4 can be added
in future patches.
Signed-off-by: Chao Liu <[email protected]>
Reviewed-by: Tao Tang <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/a2edf8c44f0bce26dccb91a7d13edb58be50c1a3.1770127918.git.chao.liu.zev...@gmail.com
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: a8f98ffd7b22a5c6554bc475096cf5de1d0cbd6f
https://github.com/qemu/qemu/commit/a8f98ffd7b22a5c6554bc475096cf5de1d0cbd6f
Author: Chao Liu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M MAINTAINERS
A tests/qtest/iommu-riscv-test.c
M tests/qtest/meson.build
Log Message:
-----------
tests/qtest: Add RISC-V IOMMU bare-metal test
Add a qtest suite for the RISC-V IOMMU PCI device on the virt machine.
The test exercises bare, S-stage, G-stage, and nested translation paths
using iommu-testdev and the qos-riscv-iommu helpers.
The test validates:
- Device context (DC) configuration
- SV39 page table walks for S-stage translation
- SV39x4 page table walks for G-stage translation
- Nested translation combining both stages
- FCTL register constraints
This provides regression coverage for the RISC-V IOMMU implementation
without requiring a full guest OS boot.
Signed-off-by: Chao Liu <[email protected]>
Reviewed-by: Tao Tang <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/35f046c8d21aa6d5f9a531258762e01be198d8cf.1770127918.git.chao.liu.zev...@gmail.com
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 7e9608ebf5724765b087dd5b1910c0eabc99d300
https://github.com/qemu/qemu/commit/7e9608ebf5724765b087dd5b1910c0eabc99d300
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/trace-events
Log Message:
-----------
migration: Add a tracepoint for invoking migration notifiers
Reviewed-by: Fabiano Rosas <[email protected]>
Acked-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: ff3a9e4e3125a605da51cecb1774dd7844b98c7a
https://github.com/qemu/qemu/commit/ff3a9e4e3125a605da51cecb1774dd7844b98c7a
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M include/migration/misc.h
M migration/migration.c
M ui/spice-core.c
Log Message:
-----------
migration: Fix double notification of DONE/FAIL for postcopy
Migration notifiers will notify at any of three places: (1) SETUP
phase, (2) migration completes, (3) migration fails.
There's actually a special case for spice: one can refer to
b82fc321bf ("Postcopy+spice: Pass spice migration data earlier"). It
doesn't need another 4th event because in commit 9d9babf78d ("migration:
MigrationEvent for notifiers") we merged it together with the DONE event.
The merge makes some sense if we treat "switchover" of postcopy as "DONE",
however that also means for postcopy we'll notify DONE twice.. The other
one at the end of postcopy when migration_cleanup().
In reality, the current code base will also notify FAILED for postcopy
twice. It's because an (maybe accidental) change in commit
4af667f87c ("migration: notifier error checking").
First of all, we still need that notification when switchover as stated in
Dave's commit, however that's only needed for spice. To fix it, introduce
POSTCOPY_START event to differenciate it from DONE. Use that instead in
postcopy_start(). Then spice will need to capture this event too.
Then we remove the extra FAILED notification in postcopy_start().
If one wonder if other DONE users should also monitor POSTCOPY_START
event.. We have two more DONE users:
- kvm_arm_gicv3_notifier
- cpr_exec_notifier
Both of them do not need a notification for POSTCOPY_START, but only when
migration completed. Actually, both of them are used in CPR, which doesn't
support postcopy.
When at this, update the notifier transition graph in the comment, and move
it from migration_add_notifier() to be closer to where the enum is defined.
I didn't attach Fixes: because I am not aware of any real bug on such
double reporting. I'm wildly guessing the 2nd notify might be silently
ignored in many cases. However this is still worth fixing.
Cc: Marc-André Lureau <[email protected]>
Cc: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 96dc397fe2399272ffe89c3c7e269939700d9cf4
https://github.com/qemu/qemu/commit/96dc397fe2399272ffe89c3c7e269939700d9cf4
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration: Notify migration FAILED before starting VM
Devices may opt-in migration FAILED notifiers to be invoked when migration
fails. Currently, the notifications happen in migration_cleanup(). It is
normally fine, but maybe not ideal if there's dependency of the fallback
v.s. VM starts.
This patch moves the FAILED notification earlier, so that if the failure
happened during switchover, it'll notify before VM restart.
After walking over all existing FAILED notifier users, I got the conclusion
that this should also be a cleaner approach at least from design POV.
We have these notifier users, where the first two do not need to trap
FAILED:
|----------------------------+-------------------------------------+---------------------|
| device | handler | events
needed |
|----------------------------+-------------------------------------+---------------------|
| gicv3 | kvm_arm_gicv3_notifier | DONE
|
| vfio_iommufd / vfio_legacy | vfio_cpr_reboot_notifier | SETUP
|
| cpr-exec | cpr_exec_notifier | FAILED,
DONE |
| virtio-net | virtio_net_migration_state_notifier | SETUP,
FAILED |
| vfio | vfio_migration_state_notifier | FAILED
|
| vdpa | vdpa_net_migration_state_notifier | SETUP,
FAILED |
| spice [*] | migration_state_notifier | SETUP,
FAILED, DONE |
|----------------------------+-------------------------------------+---------------------|
For cpr-exec, it tries to cleanup some cpr-exec specific fd or env
variables. This should be fine either way, as long as before
migration_cleanup().
For virtio-net, we need to re-plug the primary device back to guest in the
failover mode. Likely benign.
VFIO needs to re-start the device if FAILED. IIUC it should do it before
vm_start(), if the VFIO device can be put into a STOPed state due to
migration, we should logically make it running again before vCPUs run.
VDPA will disable SVQ when migration is FAILED. Likely benign too, but
looks better if we can do it before resuming vCPUs.
For spice, we should rely on "spice_server_migrate_end(false)" to retake
the ownership. Benign, but looks more reasonable if the spice client does
it before VM runs again.
Note that this change may introduce slightly more downtime, if the
migration failed exactly at the switchover phase. But that's very rare,
and even if it happens, none of above expects a long delay, but a short
one, likely will be buried in the total downtime even if failed.
Cc: Cédric Le Goater <[email protected]>
Cc: Marc-André Lureau <[email protected]>
Acked-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 7da1fba27e3275ab458fd53a2b647ec316f11ffd
https://github.com/qemu/qemu/commit/7da1fba27e3275ab458fd53a2b647ec316f11ffd
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration: Drop explicit block activation in postcopy fail path
Postcopy (in failure path) should share with precopy on disk reactivations.
Explicit activiation should used to be fine even if called twice, but after
26f65c01ed ("migration: Do not try to start VM if disk activation fails")
we may want to avoid it and always capture failure when reactivation
happens (even if we do not expect the failure to happen). Remove this
redundant call.
Reviewed-by: Fabiano Rosas <[email protected]>
Acked-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: a545fafccfe34ec2e4127ed9962e2772ee2197e9
https://github.com/qemu/qemu/commit/a545fafccfe34ec2e4127ed9962e2772ee2197e9
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M hw/intc/arm_gicv3_kvm.c
M hw/net/virtio-net.c
M hw/scsi/scsi-disk.c
M hw/vfio/cpr-legacy.c
M hw/vfio/cpr.c
M hw/vfio/migration.c
M include/migration/misc.h
M migration/cpr-exec.c
M migration/migration.c
M net/vhost-vdpa.c
M ui/spice-core.c
Log Message:
-----------
migration: Rename MIG_EVENT_PRECOPY_* to MIG_EVENT_*
All three events are shared between precopy and postcopy, rather than
precopy specific.
For example, both precopy and postcopy will go through a SETUP process.
Meanwhile, both FAILED and DONE notifiers will be notified for either
precopy or postcopy on completions / failures.
Rename them to make them match what they do, and shorter.
Reviewed-by: Fabiano Rosas <[email protected]>
Acked-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
[fixed-up entry in scsi-disk.c that got merged first]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 3a4aa1782188672e667d14719a8f9b8c2861f8a7
https://github.com/qemu/qemu/commit/3a4aa1782188672e667d14719a8f9b8c2861f8a7
Author: Fabiano Rosas <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration: Update comments mentioning qmp_migrate_finish
The qmp_migrate_finish function was recently removed in commit
2379a04e60 ("migration: Remove qmp_migrate_finish"), update comments
that mention it.
Reviewed-by: Peter Xu <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: fd5d166faf6c9434807efabe8539fc7d66ca02a9
https://github.com/qemu/qemu/commit/fd5d166faf6c9434807efabe8539fc7d66ca02a9
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Introduce qemu_savevm_send_* helpers
Split qemu_savevm_state_header() into two parts. This paves way for a
reuse elsewhere.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 12f5921ff2d80c2373091518904e864727242052
https://github.com/qemu/qemu/commit/12f5921ff2d80c2373091518904e864727242052
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Use qemu_savevm_send_header() in qemu_save_device_state()
Reduces duplication of the other path where we also send the same header.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 4d82caab177a62a835b13d6f839c0be0082e7803
https://github.com/qemu/qemu/commit/4d82caab177a62a835b13d6f839c0be0082e7803
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Remove one migration_in_colo_state() occurance
Move the send header operation directly into Xen's QMP command, as COLO
doesn't need it.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 8df42ed6e5a17149954639b472e995162d74b228
https://github.com/qemu/qemu/commit/8df42ed6e5a17149954639b472e995162d74b228
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration/savevm: Remove SaveStateEntry.is_ram
It's neither accurate nor necessary. Use a proper helper to detect if it's
an iterable savevm state entry instead.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: ac4702a7465ec585ce2ba63bcc1dfb912d81149c
https://github.com/qemu/qemu/commit/ac4702a7465ec585ce2ba63bcc1dfb912d81149c
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration/colo: Unwrap qemu_savevm_live_state()
It's only used in COLO path and only contains two calls. Unwrap the
function. It paves way for further reduce special COLO paths on sync.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 93b974cbc163609048e633ec21387ae518d307f0
https://github.com/qemu/qemu/commit/93b974cbc163609048e633ec21387ae518d307f0
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
M migration/savevm.c
Log Message:
-----------
migration: Remove call to send switchover start event in colo/savevm
COLO (in case of periodically checkpointing) already have switchover
happened before hand. This switchover_start feature never applies to COLO.
Savevm for snapshot doesn't have switchover phase and VM is stopped for the
whole process.
Remove both.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: afbba26fd3996a4850f6dc7dc18a5c05408f0872
https://github.com/qemu/qemu/commit/afbba26fd3996a4850f6dc7dc18a5c05408f0872
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M monitor/qmp-cmds.c
Log Message:
-----------
colo: Forbid VM resume during checkpointing
COLO will stop the VM during each checkpoint on either PVM or SVM.
Accidentally resuming the VM during the window might be fatal because it
may cause the RAM and devices state to misalign, corrupting the checkpoint.
Hence forbid VM resume during the process.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 47377604dcdf2f3067e6606fd1540867240e3e4c
https://github.com/qemu/qemu/commit/47377604dcdf2f3067e6606fd1540867240e3e4c
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
Log Message:
-----------
migration/colo: Use the RAM iterable helper directly
qemu_savevm_state_complete_precopy() has a weird parameter called
"iterable_only". It's needed because COLO saves device states in advance.
To make dropping that weird parameter easier, let COLO directly use the RAM
iterator helper instead, which should make the code easier to read too.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 8c4d280054ea6817e98cefd3ff4dd2aa44a651ac
https://github.com/qemu/qemu/commit/8c4d280054ea6817e98cefd3ff4dd2aa44a651ac
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
Log Message:
-----------
migration/colo: Document qemu_fflush(fb)
COLO caches all device states in a buffer channel `fb'. Add some comments
explaining the flush, that (1) it's the `fb' not the main channel, (2) on
what it updates.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 994f4b29ec0b4c605257fa7b57e9b615a1b03cac
https://github.com/qemu/qemu/commit/994f4b29ec0b4c605257fa7b57e9b615a1b03cac
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Drop iterable_only in qemu_savevm_state_complete_precopy
Now after removing the special case in COLO, we can drop this parameter.
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: f2b2e6b42f64543b491081eff8218a36f2c25d58
https://github.com/qemu/qemu/commit/f2b2e6b42f64543b491081eff8218a36f2c25d58
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Drop qemu_file_set_error() when save non-iterable fails
All users of qemu_savevm_state_complete_precopy_non_iterable() process
return values. There's no need to set error on qemufile (which we likely
should remove gradually across the tree). Remove it for possible code
dedup to happen later.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 2602618b3f9396fdccfcebdb9153b7ab95865c50
https://github.com/qemu/qemu/commit/2602618b3f9396fdccfcebdb9153b7ab95865c50
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
Log Message:
-----------
migration/colo: Send device states without copying buffer
We can safely use the async version of put buffer here because the qemufile
will be flushed right away.
Suggested-by: Fabiano Rosas <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 7e188607fa61276055c1f9c454ce3cf8fe3c8d38
https://github.com/qemu/qemu/commit/7e188607fa61276055c1f9c454ce3cf8fe3c8d38
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration/postcopy: Send device states without copying buffer
Put buffer can be async as long as the flush happens before the buffer will
be recycled / reused. Do it for postcopy package data. Quick measurement
shows a small VM the time to push / flush the package shrinks from 91us to
38us.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: c3bc01feb82a3cd870b09e9131ecec1aff22c868
https://github.com/qemu/qemu/commit/c3bc01feb82a3cd870b09e9131ecec1aff22c868
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Introduce qemu_savevm_state_end()
Introduce a helper to end a migration stream.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 56294bcd25572c47fdfc43504f1d9e7640a59a05
https://github.com/qemu/qemu/commit/56294bcd25572c47fdfc43504f1d9e7640a59a05
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Provide helper for save vm description
Provide two smaller helpers to dump the vm desc. Preparing to move it out
and generalize device state dump.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 4b5dc4d831e4abbd0a80328c9a61bf8e8a18b418
https://github.com/qemu/qemu/commit/4b5dc4d831e4abbd0a80328c9a61bf8e8a18b418
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Split qemu_savevm_state_complete_precopy_non_iterable()
Split the function, making itself to be the helper to dump all non-iterable
device states (early_vmsd excluded). Move the precopy end logic out to the
two callers that need it.
With it, we can remove the in_postcopy parameter. Meanwhile, renaming the
function to be qemu_savevm_state_non_iterable(): we don't need the keyword
"complete" because non-iterable doesn't iterate anyway, and we don't need
precopy because we moved precopy specialties out.
NOTE: this patch introduced one new migrate_get_current() user; will be
removed in follow up patch.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 09108805d56025d3a736ed047ff4f5ea98db3a2b
https://github.com/qemu/qemu/commit/09108805d56025d3a736ed047ff4f5ea98db3a2b
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: qemu_savevm_state_complete_precopy() take MigrationState*
Make it pass in MigrationState* instead of s->to_dst_file, so as to drop
the internal migrate_get_current().
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 9a2faa6a1705997131b42ac697f2c2e2789d2d60
https://github.com/qemu/qemu/commit/9a2faa6a1705997131b42ac697f2c2e2789d2d60
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Cleanup error propagates in qemu_savevm_state_setup()
We did two unnecessary error propagations in qemu_savevm_state_setup(), on
either propagate it to MigrationState*, or set qemufile with error.
Error propagation is not needed because:
- Two live migration callers ([bg_]migration_thread) will propagate error
if this function returned with an error.
- Save snapshot (qemu_savevm_state) doesn't need to persist error; it got
returned directly from save_snapshot().
QEMUFile set error is not needed because the callers always check for
errors explicitly.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: b1f774767f2f4e07a1f46512e6c7915822e0546a
https://github.com/qemu/qemu/commit/b1f774767f2f4e07a1f46512e6c7915822e0546a
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Refactor qemu_savevm_state_setup()
Split it into two smaller chunks:
- Dump of early_setup VMSDs
- Dump of save_setup() sections
They're mutual exclusive, hence we can run two loops and do them
sequentially. This will cause migration thread to loop one more time, but
it should be fine when migration just started and only do it once. It's
needed because we will need to reuse the early_vmsd helper later to
deduplicate code elsewhere.
QEMU almost sticks with qemu_savevm_state_XXX() to represent the dump of
vmstates's section XXX. With that in mind, this patch renamed the original
qemu_savevm_state_setup() to qemu_savevm_state_do_setup() instead.
So after this patch:
- qemu_savevm_state_non_iterable_early() dumps early_vmsds only,
- qemu_savevm_state_setup() dumps save_setup() sections only,
- qemu_savevm_state_do_setup() does all things needed during setup
phase (including migration SETUP notifies)
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: ce0c20c68feb9f362d3231cf1eadf9cf025bc8c1
https://github.com/qemu/qemu/commit/ce0c20c68feb9f362d3231cf1eadf9cf025bc8c1
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Introduce qemu_savevm_state_active()
Introduce this helper to detect if a SaveStateEntry is active.
Note that this helper can actually also be used in loadvm paths, but let's
stick with this name for now because we still use SaveStateEntry for the
shared structure that both savevm/loadvm uses, where this name still suites.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 7a6eeaf8109d6332412e72b724bac0a995b29840
https://github.com/qemu/qemu/commit/7a6eeaf8109d6332412e72b724bac0a995b29840
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration/bg-snapshot: Cleanup error paths
Cleanup bg_migration_thread() function on error handling. First of all,
early_fail is almost only used to say if BQL is taken. Since we already
have separate jumping labels, we don't really need it, hence removed.
Also, since local_err is around, making sure every failure path will set a
proper error string for the failure, then propagate to MigrationState.error.
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 6b56e62de313b226b2fbeba055ed48cc7581be3a
https://github.com/qemu/qemu/commit/6b56e62de313b226b2fbeba055ed48cc7581be3a
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration: Make qemu_savevm_state_non_iterable() take errp
Let the function report errors to upper layers. Out of three current
users, two of them already process the errors, except one outlier,
qemu_savevm_state_complete_precopy(), where we do it manually for now with
a comment for TODO.
Signed-off-by: Peter Xu <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
[add space in error_prepend string]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 1580d7346b38fe5a0baee72cdf9f46bd8eb6b150
https://github.com/qemu/qemu/commit/1580d7346b38fe5a0baee72cdf9f46bd8eb6b150
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/savevm.c
Log Message:
-----------
migration: Simplify qemu_save_device_state()
This function is used by both COLO and Xen. Simplify it with two changes:
- Remove checks on qemu_savevm_se_iterable(): this is not needed as
vmstate_save() also checks for "save_state() || vmsd" instead. Here,
save_setup() (or say, iterable states) should be mutual exclusive to
"save_state() || vmsd" [*].
- Remove migrate_error_propagate(): both of the users are not using live
migration framework, but raw vmstate operations. Error propagation is
only needed for query-migrate persistence.
[*] One tricky user is VFIO, who provided _both_ save_state() and
save_setup(). However VFIO mustn't have been used in these paths or it
means both COLO and Xen have ignored VFIO data instead (that is,
qemu_savevm_se_iterable() will return true for VFIO). Hence, this change is
safe.
Cc: David Woodhouse <[email protected]>
Cc: Paul Durrant <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
[commit msg: s/not needed for/only needed for]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: 32ed27e5b920695c82c5a397d3837a00a5b5b46a
https://github.com/qemu/qemu/commit/32ed27e5b920695c82c5a397d3837a00a5b5b46a
Author: Peter Xu <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/colo.c
M migration/savevm.c
M migration/savevm.h
Log Message:
-----------
migration/colo/xen: Use generic helpers in qemu_save_device_state()
Use qemu_savevm_state_non_iterable*() helpers for saving device states,
rather than walking the vmstate handlers on its own.
Non-iterables can be either early_setup devices, or otherwise.
Note that QEMU only has one early_setup device currently, which is
virtio-mem, and I highly doubt if it is used in either COLO or Xen users..
However this step is still better needed to provide full coverage of all
non-iterable vmstates.
When at it, allow it to report errors.
Cc: David Woodhouse <[email protected]>
Cc: Paul Durrant <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: e8e8bb79dd548063508528b527d67fa85baa1c7c
https://github.com/qemu/qemu/commit/e8e8bb79dd548063508528b527d67fa85baa1c7c
Author: Cédric Le Goater <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M migration/cpr.c
Log Message:
-----------
migration/cpr: Include vfio-cpr.h instead of vfio-device.h
The file migration/cpr.c uses vmstate_cpr_vfio_devices which is
declared in hw/vfio/vfio-cpr.h, not in hw/vfio/vfio-device.h.
Replace the include with the correct header file to avoid pulling in
unnecessary VFIO device declarations.
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: fd5ecd187bc245013399d14cc225f05c0ad1a96c
https://github.com/qemu/qemu/commit/fd5ecd187bc245013399d14cc225f05c0ad1a96c
Author: Peter Maydell <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M tests/qtest/migration/tls-tests.c
Log Message:
-----------
tests/qtest/migration/tls-tests.c: Don't use tls_psk end hook for no_tls tests
If you run the TLS tests under a clang undefined-behaviour sanitizer build
it will fall over like this:
../../tests/unit/crypto-tls-psk-helpers.c:53:12: runtime error: null pointer
passed as argument 1, which is declared to never be null
/usr/include/unistd.h:858:48: note: nonnull attribute specified here
#0 0x62bd810762ee in test_tls_psk_cleanup
/home/pm215/qemu/build/clang/../../tests/unit/crypto-tls-psk-helpers.c:53:5
#1 0x62bd81073f89 in migrate_hook_end_tls_psk
/home/pm215/qemu/build/clang/../../tests/qtest/migration/tls-tests.c:101:5
#2 0x62bd81062ef0 in test_precopy_common
/home/pm215/qemu/build/clang/../../tests/qtest/migration/framework.c:947:9
This happens because test_precopy_tcp_no_tls() uses a custom start_hook
that only sets a couple of parameters, but reuses the tsk_psk end_hook.
However, the end_hook runs cleanup that assumes that the data was set
up by migrate_hook_start_tls_psk_common(). In particular, it will
unconditionally call test_tls_psk_cleanup(data->pskfile), and
test_tls_psk_cleanup() will unconditionally unlink() the filename it
is passed, which is undefined behaviour if you pass it a NULL pointer.
Instead of creating a TestMigrateTLSPSKData struct which we never set
any fields in and requiring the migrate_hook_end_tls_psk() hook to
cope with that, don't allocate the struct in the start_hook. Then
there is nothing we need to clean up, and we can set the end_hook
to NULL (which the test framework will interpret as "don't call
any end_hook").
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Link:
https://lore.kernel.org/qemu-devel/[email protected]
[no need to copy stable]
Signed-off-by: Fabiano Rosas <[email protected]>
Commit: d82365236626798f6f3fbb3b4022eb8b5c7538f9
https://github.com/qemu/qemu/commit/d82365236626798f6f3fbb3b4022eb8b5c7538f9
Author: Peter Maydell <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M hw/intc/arm_gicv3_kvm.c
M hw/net/virtio-net.c
M hw/scsi/scsi-disk.c
M hw/vfio/cpr-legacy.c
M hw/vfio/cpr.c
M hw/vfio/migration.c
M include/migration/misc.h
M migration/colo.c
M migration/cpr-exec.c
M migration/cpr.c
M migration/migration.c
M migration/savevm.c
M migration/savevm.h
M migration/trace-events
M monitor/qmp-cmds.c
M net/vhost-vdpa.c
M tests/qtest/migration/tls-tests.c
M ui/spice-core.c
Log Message:
-----------
Merge tag 'migration-20260217-pull-request' of
https://gitlab.com/farosas/qemu into staging
Migration pull request
- Notifier changes: Remove duplicated events during postcopy. Emit
MIG_EVENT_FAILED before the VM is started.
- Undefined behavior fix for tls-tests.
- Cleanups: COLO, savevm handlers, CPR/VFIOheaders.
# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmmUkycQHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnRUQD/9tRGwSAmIY6T9X20eH+KFbPK+QquPGpyt7
# CPuTPAIx3fXCPZWq4syjJ1hKfoB3n8IHirTfKLmpW/0UKPZReOvsW7EDvZ5pati5
# Zsj/DtVYIEEwRDPRq2OL1kT//ofqhL8htjs2sTypEVgHTToIxYuT7kNGr1xVAKyB
# lUZWgQUJoihX4czNLkxKddxrG4BQx9hEYrq6kTgqmRdVUVo2xiQMSyHElE76L37g
# JZB2kOgf2Y6o8T4WTROiiEkn5CwWw181Nl/Iic1CNh44mFt/xSB7RQU91lU1Pu9b
# 4cqk6pf6WR35b0BS27b8jYfLGCf1GJJKMpoZLCEKbHPYs1rnGcD0gxoOx6NtscpR
# xNhaFm+iH4UtD2yX7Z3TlA7u/DfwsFpIMMtxc91bhYCnLX9AMm2MB+71T/v4HWvX
# f0dqXMSxlDpuzubuA+Ztw7h43+vidQCYXknFFtHVSv4SNAJbSqyzWiALpUibsT3I
# 2cQ+xm4mCT+7hYei59P2cnPOR9DW4/ONbvua2VAVeipgARwWnzn882B1zQrGYirJ
# gsQchT0/PTZEikkd3WWTUtSRO8r61AUnFgkTTIKkgZDF7rRAwm79gkM9yPFddIQQ
# GcssvGiuwdnWmSov0zW24285zRTOJendi1gMtd66jaEEWcvsONl285904RnrxQnm
# uypzwZgzaw==
# =5jYW
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 17 16:11:19 2026 GMT
# gpg: using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg: issuer "[email protected]"
# gpg: Good signature from "Fabiano Rosas <[email protected]>" [unknown]
# gpg: aka "Fabiano Almeida Rosas <[email protected]>"
[unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3 64CF C798 DC74 1BEC 319D
* tag 'migration-20260217-pull-request' of https://gitlab.com/farosas/qemu: (32
commits)
tests/qtest/migration/tls-tests.c: Don't use tls_psk end hook for no_tls tests
migration/cpr: Include vfio-cpr.h instead of vfio-device.h
migration/colo/xen: Use generic helpers in qemu_save_device_state()
migration: Simplify qemu_save_device_state()
migration: Make qemu_savevm_state_non_iterable() take errp
migration/bg-snapshot: Cleanup error paths
migration: Introduce qemu_savevm_state_active()
migration: Refactor qemu_savevm_state_setup()
migration: Cleanup error propagates in qemu_savevm_state_setup()
migration: qemu_savevm_state_complete_precopy() take MigrationState*
migration: Split qemu_savevm_state_complete_precopy_non_iterable()
migration: Provide helper for save vm description
migration: Introduce qemu_savevm_state_end()
migration/postcopy: Send device states without copying buffer
migration/colo: Send device states without copying buffer
migration: Drop qemu_file_set_error() when save non-iterable fails
migration: Drop iterable_only in qemu_savevm_state_complete_precopy
migration/colo: Document qemu_fflush(fb)
migration/colo: Use the RAM iterable helper directly
colo: Forbid VM resume during checkpointing
...
Signed-off-by: Peter Maydell <[email protected]>
Commit: 314f2d7fe601b8dba2a88ac4870469e9f6bb8464
https://github.com/qemu/qemu/commit/314f2d7fe601b8dba2a88ac4870469e9f6bb8464
Author: Peter Maydell <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M MAINTAINERS
A tests/qtest/iommu-riscv-test.c
M tests/qtest/libqos/meson.build
A tests/qtest/libqos/qos-riscv-iommu.c
A tests/qtest/libqos/qos-riscv-iommu.h
M tests/qtest/meson.build
Log Message:
-----------
Merge tag 'qtest-20260217-pull-request' of https://gitlab.com/farosas/qemu
into staging
QTest pull request
- RISCV IOMMU test
# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmmUlLMQHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnW3eEACAR/RJWKbxQM2O0M4QS5BKtryaI5y7CMb5
# VwovTOVwzs1WsV3eve5Q6y6vcGIjgp7Q53I5l9pvzLB4IcXG+RG5l9lP8AcEctvn
# KyY6dPD8FmXLmhYOrnyXDNkfS72g9ELfsccm8prJi3Xeo7yXVJf7e+sPE3YVPBPa
# 8YfIlgkVWDy2OfrM7kd4SaCoNevs2jMlhqdzXxg6KZNBx51wX2knDYGSenWFyL//
# 0YgRGnMSprLJgWHrddU4dQe+knpOZWHPqZuq9eSoAVO+k6i0+znwEoCqQNRssYhI
# Hgu5/A/NdAbOQiktEKGjjgMX8XDo5fq4BklLaGeziGwjgsflK9M1VSttgJUHgCOr
# aR216kclzi+dDxqNNS7hWack0OjhnHYErDcbAyYdTkm5kCE1h6Co2t0rZIVZZBW6
# sGiF1rMLjJvSC34v29hJCEmbDcW1w2fEAb14ntrbov+XKhsgwtE74H7sj81hLJzQ
# rfIqwn3cjTtGfMXuc0fK4vqSjmPfkZse4/b68fJAaduV9A7bof1HId+k82tMO69v
# ZtLhWsk8dSJmRNDM1gzeOPB2TDunX+i54AJboa7G0DMpPA8VGxvoVygdhC9GSfu0
# rXpPkywjcvX6sUIkoUi7KGAREjH+vH8pUbVVisbLI9kt3ovaj60R8S+dySQCEhBl
# ZKmy8EAeEg==
# =jkva
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Feb 17 16:17:55 2026 GMT
# gpg: using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg: issuer "[email protected]"
# gpg: Good signature from "Fabiano Rosas <[email protected]>" [unknown]
# gpg: aka "Fabiano Almeida Rosas <[email protected]>"
[unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3 64CF C798 DC74 1BEC 319D
* tag 'qtest-20260217-pull-request' of https://gitlab.com/farosas/qemu:
tests/qtest: Add RISC-V IOMMU bare-metal test
tests/qtest/libqos: Add RISC-V IOMMU helper library
Signed-off-by: Peter Maydell <[email protected]>
Compare: https://github.com/qemu/qemu/compare/ece408818d27...314f2d7fe601
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications