* [RFC PATCH] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support
@ 2025-01-15 21:00 Philippe Mathieu-Daudé
2025-01-16 14:23 ` Fabiano Rosas
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-01-15 21:00 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Peter Xu, Michael S. Tsirkin, Markus Armbruster,
Fabiano Rosas, Paolo Bonzini, Daniel P . Berrangé,
Philippe Mathieu-Daudé
mc146818rtc's migration stream is at version 3 since commit
56038ef6234 ("RTC: Update the RTC clock only when reading it")
from 12 years ago, released in QEMU v1.3.0!
No versioned machines are that old, we can safely remove
support for older streams and the qdev_set_legacy_instance_id()
call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
RFC to check whether my reasoning is correct or not.
Goal is to remove qdev_set_legacy_instance_id() globally.
---
hw/rtc/mc146818rtc.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index e322fc2ffb9..b7927f7e258 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -819,7 +819,7 @@ static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = {
static const VMStateDescription vmstate_rtc = {
.name = "mc146818rtc",
.version_id = 3,
- .minimum_version_id = 1,
+ .minimum_version_id = 3,
.pre_save = rtc_pre_save,
.post_load = rtc_post_load,
.fields = (const VMStateField[]) {
@@ -829,13 +829,13 @@ static const VMStateDescription vmstate_rtc = {
VMSTATE_TIMER_PTR(periodic_timer, MC146818RtcState),
VMSTATE_INT64(next_periodic_time, MC146818RtcState),
VMSTATE_UNUSED(3*8),
- VMSTATE_UINT32_V(irq_coalesced, MC146818RtcState, 2),
- VMSTATE_UINT32_V(period, MC146818RtcState, 2),
- VMSTATE_UINT64_V(base_rtc, MC146818RtcState, 3),
- VMSTATE_UINT64_V(last_update, MC146818RtcState, 3),
- VMSTATE_INT64_V(offset, MC146818RtcState, 3),
- VMSTATE_TIMER_PTR_V(update_timer, MC146818RtcState, 3),
- VMSTATE_UINT64_V(next_alarm_time, MC146818RtcState, 3),
+ VMSTATE_UINT32(irq_coalesced, MC146818RtcState),
+ VMSTATE_UINT32(period, MC146818RtcState),
+ VMSTATE_UINT64(base_rtc, MC146818RtcState),
+ VMSTATE_UINT64(last_update, MC146818RtcState),
+ VMSTATE_INT64(offset, MC146818RtcState),
+ VMSTATE_TIMER_PTR(update_timer, MC146818RtcState),
+ VMSTATE_UINT64(next_alarm_time, MC146818RtcState),
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription * const []) {
@@ -929,8 +929,6 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
memory_region_add_subregion(&s->io, 0, &s->coalesced_io);
memory_region_add_coalescing(&s->coalesced_io, 0, 1);
- qdev_set_legacy_instance_id(dev, s->io_base, 3);
-
object_property_add_tm(OBJECT(s), "date", rtc_get_date);
qdev_init_gpio_out(dev, &s->irq, 1);
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support
2025-01-15 21:00 [RFC PATCH] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support Philippe Mathieu-Daudé
@ 2025-01-16 14:23 ` Fabiano Rosas
0 siblings, 0 replies; 2+ messages in thread
From: Fabiano Rosas @ 2025-01-16 14:23 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Thomas Huth, Peter Xu, Michael S. Tsirkin, Markus Armbruster,
Paolo Bonzini, Daniel P . Berrangé,
Philippe Mathieu-Daudé
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> mc146818rtc's migration stream is at version 3 since commit
> 56038ef6234 ("RTC: Update the RTC clock only when reading it")
> from 12 years ago, released in QEMU v1.3.0!
> No versioned machines are that old, we can safely remove
> support for older streams and the qdev_set_legacy_instance_id()
> call.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> RFC to check whether my reasoning is correct or not.
>
> Goal is to remove qdev_set_legacy_instance_id() globally.
Go for it
Reviewed-by: Fabiano Rosas <farosas@suse.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-16 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 21:00 [RFC PATCH] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support Philippe Mathieu-Daudé
2025-01-16 14:23 ` Fabiano Rosas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.