Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* VM live migration failed from Linux v5.9 to Linux v5.10-rc1
@ 2020-10-31  7:03 Peng Liang
  2020-10-31 13:25 ` Marc Zyngier
  0 siblings, 1 reply; 7+ messages in thread
From: Peng Liang @ 2020-10-31  7:03 UTC (permalink / raw)
  To: maz; +Cc: kvmarm

Hi Marc,
Sorry for disturbing you.

When I try to migrate a VM from Linux v5.9 to Linux v5.10-rc1, QEMU
reports errors like this:
  qemu-system-aarch64: write 0x603000000013c020(0x0100010011111111) to
kvm failed
  qemu-system-aarch64: error while loading state for instance 0x0 of
device 'cpu'

(The first error is added by myself:
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 8bb7318378..b361f62f7f 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -560,6 +560,7 @@ bool write_list_to_kvmstate(ARMCPU *cpu, int level)
              * "you tried to set a register which is constant with
              * a different value from what it actually contains".
              */
+            error_report("write 0x%016lx(0x%016lx) to kvm failed",
cpu->cpreg_indexes[i], cpu->cpreg_values[i]);
             ok = false;
         }
     }
)

If I try to migrate from Linux v5.10-rc1 to v5.9, then the errors are
changed to:
  qemu-system-aarch64: write 0x603000000013c020(0x0000010011111111) to
kvm failed
  error while loading state for instance 0x0 of device 'cpu'

However, the migration from v5.9 to v5.9 or from v5.10-rc1 to v5.10-rc1
are successful.

The source end and destination end of migration have the same hardware
and the same softwares except the Linux version. And of course, the
vCPUs of VMs are host-passthrough.

I found that the different register and the different field between
source and destination is ID_AA64PFR0_EL1.CSV2. I searched in git log
and found that the commit e1026237f9067 ("KVM: arm64: Set CSV2 for
guests on hardware unaffected by Spectre-v2") may be the cause of the
failure?

So do we need to make it possible to migrate VMs between Linux v5.9 and
Linux v5.10-rc1 with QEMU?

And here is the information of my environment:
CPU: Kunpeng-920
QEMU: v5.1.0, built with `../configure --target-list=aarch64-softmmu
--disable-werror`
source end:
  Linux: v5.9, configured with `make defconfig`
destination end:
  Linux: v5.10-rc1, configured with `make defconfig`

Thanks,
Peng
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

end of thread, other threads:[~2020-11-02 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-31  7:03 VM live migration failed from Linux v5.9 to Linux v5.10-rc1 Peng Liang
2020-10-31 13:25 ` Marc Zyngier
2020-11-02  3:12   ` Peng Liang
2020-11-02  7:32     ` Peng Liang
2020-11-02  9:29     ` Marc Zyngier
2020-11-02 10:29   ` Will Deacon
2020-11-02 10:50     ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox