From patchwork Wed Jan 15 21:00:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 857613 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp2681590wrc; Wed, 15 Jan 2025 13:02:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVDpQ0fl6F/cJr/j+9/8IbFaI7kDP+ZiMavaR9cNFU93WN5Wqlhe1ewqomSwkOulgpYWgH/yA==@linaro.org X-Google-Smtp-Source: AGHT+IG2dGQvQ0pE0CXAiDmcuYRVFo3upveYKAtfVJj113582oaQB+L/R28trs1eT0PgJXpECIXl X-Received: by 2002:a05:6000:712:b0:38a:615c:8225 with SMTP id ffacd0b85a97d-38a87305486mr28766246f8f.15.1736974926029; Wed, 15 Jan 2025 13:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736974926; cv=none; d=google.com; s=arc-20240605; b=MhMQrvxF9BG7HT/EhVb7wuTMICiqKB6huYbbg+oIMl2Vmy7kEMX86lvlF+mbLAL9Hz mg2NF0hve98kG6nMJAx5GUT3N/H+05LgLd4adCLTa9VKWtPaQ5H0IogGBZZqutGDUThD hwlCL9VOs1OYEfxxVZBQO9lvRDuL+E2ISY7C3D+DRkUdHn4EN6zkQOrSAZ4Oizhm2E0p J3IJk0rHzS7yN4d0vmT4DfyC6aDqxqnA8zPnt2Ee9yC5E2enin5QILw20W8IpN2uV+Nl SbqkOAY2eCO0mBOo6QvwtApKkSxgWBIxuAVUUmnjPIa/MJlivf9y+ijfsm6y+rtMvZmZ Fgbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=vjRl7JCegegyXyUnn5GpI7jVd0qmkWGQ7fWtdXQEF/k=; fh=sErNzhmyibb60tXLel4mSCPSCcapzF4WEdYfrIXphiY=; b=INDkPZNjRRtAX6eMnHKmEsAAkO5klZWuUb8gFKMU3P+emUJuNjbu1WQHJugDnfsrzD QlAytyTGfL+vtoYwPnJJBBpDCQHW1A0WMpknloSIiizduKZv9k4BHBYWein1AVg/v3XI hbjoEGoxmn17DDAoPnBOgYb/hOewnGJ37Zm1TqLM9En7ZATqfUW5KlycMaiSdqv4GOxt gEEVDeoaIMgDnm3xi2CboIN4mydP6S14QfiN8azrJMfPZU0TE0OdptyJn6Q364i0LZtt gzKUUapqLCH3JdIVLVqqI3H7FP9q+iVYUEfZVMnl1NquvLXt6GMY//ikN77xLtGpTcDK bOzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T0P2BE5R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-38a8e4c8809si11070382f8f.417.2025.01.15.13.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Jan 2025 13:02:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T0P2BE5R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYAVe-0007Ho-0R; Wed, 15 Jan 2025 16:01:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tYAVT-0007HC-V0 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 16:00:57 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYAVR-0003fF-CW for qemu-devel@nongnu.org; Wed, 15 Jan 2025 16:00:55 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-436637e8c8dso1303275e9.1 for ; Wed, 15 Jan 2025 13:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736974851; x=1737579651; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vjRl7JCegegyXyUnn5GpI7jVd0qmkWGQ7fWtdXQEF/k=; b=T0P2BE5R7oMyoClmnUv8AJmmOU/XZeo9hXbeuUULWp0SFaDaL+3Nm96b4PJBulrWQh /AKOhF7NE7O2KgQYiG5zl5c+fBV9hUqic89DId5fEbPdoYcKVLIAzT2r910+m7g3m9LT wXd6rqjRE4oZlLidYvpDAuEZD4RzvEm9Kag0EEhas5iOlPy1LyHD3YSI4LPum1I4u+16 /RHttm1w2qoHk5M1tBipjs2QLtNsA+KohKsvI7XNqMlmK6pBaeze56RghdBFpZttQmg3 WLbbKbXY55jOVxWCGJVZDf5TvLuUhY9tfcl8GZJdc4jRwIghHb3WtK9xe1/8Pfg3NYsu gd8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736974851; x=1737579651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vjRl7JCegegyXyUnn5GpI7jVd0qmkWGQ7fWtdXQEF/k=; b=Pb/a7sC3w8kxSmhpUzbCXCY9kQ3UyLsJtd5szIgFeqdR5sSFj6eMUWf9oudjM3jecZ zmQh4+N8OIxMv4pxm8QknhY3n4RdpPPBkCp5tUtBEXG0mrsSrGNlpKwToHT7aFcAgYqd JruZr/7dWq6w2CApyyHgimvl3elUFDK62HwIV9gpYVc74X7RUOuKgxPW4NxpvkHVJcX9 TwuTskLB/oT9nfs1Ra7bhnxQBEalxUAX2hO/v6wNmCCoXoaaL+xT8hY+nAsOHlzdmPKx FbC1wt38LtmQoBBF7850nxmloU15gZrmPSIcghl5jmkGrnSLdU7HpI8EOLQfWhi0bZbZ 85+g== X-Gm-Message-State: AOJu0Yykhlmw9W64FKKfYmoIQSRgo94uBym6wLdgny29uzRMR4np5Mve GwRCDokZrVJmROPESJ938vxeTh3Cvdr6QGv3AfNCpRImxe2suSRuR8CJOFak7R9o22jIXyd6kNk Vo90= X-Gm-Gg: ASbGncsaFkA9YbNnYP9dBkgiIrOT4WDeKU+RepcWcNi6bfzUiQtx7Vr2WxmLlHzhwW5 3D4tjj6F3xgquFrezWxKChFGPK0d/6MEva/NualmuuYVvb+KiDmy53OEYy37nCPk0UTamqTMerM pVLOOzSNuXQWZ/+CzG/Ye2sayvJ2hbN+mMPMMnIFEpPRfrsm+qq4SxRlHwK6JV2vZz2l86uyh9+ xgfsvErnegOS5iOJlZnwtHGgTTXZI/9XZlZTUNlcYfoF6S8UcTk1vFY/Sut8OjgxK70/2ErvSLQ cB8DR4WQTEeh22CucTKRWA5OHoIM07Y= X-Received: by 2002:a05:600c:46d0:b0:431:58cd:b259 with SMTP id 5b1f17b1804b1-436e26f4d53mr289809355e9.31.1736974850947; Wed, 15 Jan 2025 13:00:50 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-437c74ac73csm36339965e9.15.2025.01.15.13.00.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 13:00:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Peter Xu , "Michael S. Tsirkin" , Markus Armbruster , Fabiano Rosas , Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support Date: Wed, 15 Jan 2025 22:00:48 +0100 Message-ID: <20250115210048.25396-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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);