accel/mshv: introduce SaveVMHandler
This mechanism is used to handle more imperative partition-wide steps that have to be taken as part of a migration routine. Currently it's just a skeleton. Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com> Reviewed-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com> Link: https://lore.kernel.org/r/20260710101534.664604-3-magnuskulke@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Magnus Kulke committed
Jul 10, 2026 at 12:15 UTC
f27b4fcfd8f584e4509a18d2ea4019257e19d5b9
1 file changed
+7
accel/mshv/mshv-all.c
+7
@@ -39,6 +39,8 @@
39
#include "system/mshv.h"
40
#include "system/mshv_int.h"
41
#include "system/reset.h"
42
+#include "migration/qemu-file-types.h"
43
+#include "migration/register.h"
44
#include "trace.h"
45
#include <err.h>
46
#include <sys/ioctl.h>
@@ -544,6 +546,9 @@ static int mshv_init_vcpu(CPUState *cpu)
546
return 0;
547
}
548
549
+static SaveVMHandlers savevm_mshv = {
550
+};
551
+
552
static int mshv_init(AccelState *as, MachineState *ms)
553
{
554
MshvState *s;
@@ -599,6 +604,8 @@ static int mshv_init(AccelState *as, MachineState *ms)
604
0, "mshv-memory");
605
memory_listener_register(&mshv_io_listener, &address_space_io);
606
607
+ register_savevm_live("mshv", 0, 1, &savevm_mshv, s);
608
+
609
return 0;
610
}
611