With the new infrastructure in place it is now feasible to teach
qemu that it is safe to ignore a sysreg in the incoming migration
stream. So with the plan to revert commit 4f2b82f60431 ("target/arm:
Reinstate bogus AArch32 DBGDTRTX register for migration compat") from
qemu 11.0 onwards, let's add a compat in 10.2 machine options stating
that this reg is safe to ignore. from 11.0 onwards we will not need
that register anymore.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
v4 -> v5:
- rebased on top of latest machine types (Connie)
v3 -> v4:
- add a comment related to DBGDTRTX (Connie)
---
hw/arm/virt.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index baa4e31aac1..03d5af18f26 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -100,6 +100,15 @@ static GlobalProperty arm_virt_compat_defaults[] = {
static const size_t arm_virt_compat_defaults_len =
G_N_ELEMENTS(arm_virt_compat_defaults);
+/* Register erronously exposed on 10.2 and earlier */
+#define DBGDTRTX 0x40200000200e0298
+
+static GlobalProperty arm_virt_compat_10_2[] = {
+ { TYPE_ARM_CPU, "x-mig-safe-missing-regs", stringify(DBGDTRTX)},
+};
+static const size_t arm_virt_compat_10_2_len =
+ G_N_ELEMENTS(arm_virt_compat_10_2);
+
/*
* This cannot be called from the virt_machine_class_init() because
* TYPE_VIRT_MACHINE is abstract and mc->compat_props g_ptr_array_new()
@@ -3552,6 +3561,7 @@ static void virt_machine_10_2_options(MachineClass *mc)
{
virt_machine_11_0_options(mc);
compat_props_add(mc->compat_props, hw_compat_10_2, hw_compat_10_2_len);
+ compat_props_add(mc->compat_props, arm_virt_compat_10_2, arm_virt_compat_10_2_len);
}
DEFINE_VIRT_MACHINE(10, 2)
--
2.52.0