target/arm/cpu64: Define cpreg migration tolerance for KVM_REG_ARM_VENDOR_HYP_BMAP_2
KVM_REG_ARM_VENDOR_HYP_BMAP_2 pseudo FW register is exposed from v6.15 onwards. Backward migration from a >= v6.15 to an older kernel would fail without cpreg migration tolerance definition for this register. If the register is present on source but not on destination, its value must be checked to make sure it matches the reset value, ie. 0, meaning no service is exposed to the guest, hence the choice of a ToleranceOnlySrcTestValue migration tolerance. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260420140552.104369-6-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Eric Auger committed
Apr 20, 2026 at 16:03 UTC
6dd8be31f8fbbeba65a80b1e96c7331886c6f6d5
1 file changed
+11
target/arm/cpu64.c
+11
@@ -834,6 +834,17 @@ static void kvm_arm_set_cpreg_mig_tolerances(ARMCPU *cpu)
834
0, 0, ToleranceNotOnBothEnds);
835
arm_register_cpreg_mig_tolerance(cpu, ARM64_SYS_REG(3, 0, 10, 2, 3),
836
0, 0, ToleranceNotOnBothEnds);
837
+
838
+ /*
839
+ * KVM_REG_ARM_VENDOR_HYP_BMAP_2 pseudo FW register is exposed
840
+ * from v6.15 onwards. Backward migration from a >= v6.15 to an older
841
+ * kernel would fail without cpreg migration tolerance definition.
842
+ * If the register is present on source but not on destination, make
843
+ * sure it has its reset value, ie. 0, meaning no service is exposed
844
+ * to the guest.
845
+ */
846
+ arm_register_cpreg_mig_tolerance(cpu, KVM_REG_ARM_FW_FEAT_BMAP_REG(3),
847
+ UINT64_MAX, 0, ToleranceOnlySrcTestValue);
848
}
849
#endif
850