@samitouri / QOSamiQemu / commits / 59de9b6fa7

hw/rtc/pl031: : Remove PL031State::migrate_tick_offset field

The PL031State::migrate_tick_offset boolean was only set in the hw_compat_4_0[] array, via the 'migrate-tick-offset=false' property. We removed all machines using that array, lets remove that property, along with the pl031_properties[] array which is now empty. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20260307154202.86309-7-philmd@linaro.org>

Philippe Mathieu-Daudé committed May 2, 2025 at 00:03 UTC 59de9b6fa759fd4d0641ba39de442fa6f8e87413
2 files changed -23
hw/rtc/pl031.c
-22
@@ -278,18 +278,10 @@ static int pl031_tick_offset_post_load(void *opaque, int version_id)
278 return 0;
279 }
280
281 -static bool pl031_tick_offset_needed(void *opaque)
282 -{
283 - PL031State *s = opaque;
284 -
285 - return s->migrate_tick_offset;
286 -}
287 -
281 static const VMStateDescription vmstate_pl031_tick_offset = {
282 .name = "pl031/tick-offset",
283 .version_id = 1,
284 .minimum_version_id = 1,
292 - .needed = pl031_tick_offset_needed,
285 .post_load = pl031_tick_offset_post_load,
286 .fields = (const VMStateField[]) {
287 VMSTATE_UINT32(tick_offset, PL031State),
@@ -319,25 +311,11 @@ static const VMStateDescription vmstate_pl031 = {
311 }
312 };
313
322 -static const Property pl031_properties[] = {
323 - /*
324 - * True to correctly migrate the tick offset of the RTC. False to
325 - * obtain backward migration compatibility with older QEMU versions,
326 - * at the expense of the guest RTC going backwards compared with the
327 - * host RTC when the VM is saved/restored if using -rtc host.
328 - * (Even if set to 'true' older QEMU can migrate forward to newer QEMU;
329 - * 'false' also permits newer QEMU to migrate to older QEMU.)
330 - */
331 - DEFINE_PROP_BOOL("migrate-tick-offset",
332 - PL031State, migrate_tick_offset, true),
333 -};
334 -
314 static void pl031_class_init(ObjectClass *klass, const void *data)
315 {
316 DeviceClass *dc = DEVICE_CLASS(klass);
317
318 dc->vmsd = &vmstate_pl031;
340 - device_class_set_props(dc, pl031_properties);
319 }
320
321 static const TypeInfo pl031_info = {
include/hw/rtc/pl031.h
-1
@@ -36,7 +36,6 @@ struct PL031State {
36 uint32_t tick_offset_vmstate;
37 uint32_t tick_offset;
38 bool tick_offset_migrated;
39 - bool migrate_tick_offset;
39
40 uint32_t mr;
41 uint32_t lr;