Hi Connie, On 1/27/26 6:19 PM, Cornelia Huck wrote: > On Mon, Jan 26 2026, Eric Auger <[email protected]> wrote: > >> 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 <[email protected]> >> >> --- >> >> 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); >> + > Not objecting, but we had a discussion recently regarding where compat > values for arm cpus should live: > https://lore.kernel.org/qemu-devel/[email protected]/ > ff. > > Could this become relevant for future other versioned machine types? I'd > assume that they just would skip the bogus reg from the start, though. Thanks for the pointer. Effectively this could have initially lived in hw/core/machine.c but the problem specific to this array prop is that in any case this is not something you can aggregate and this requires infra defined in 10/11 where you register safe missing regs and hidden regs throgh a specific helper. Currently only one machine requires this so I would be inclined to leave it in virt arm machine code. So this patch is something trasncient and replaced in 10/11. Thanks Eric > >> /* >> * 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) >>
