From patchwork Wed Apr 30 18:50:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 886079 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:38f:210b:807b with SMTP id g4csp1011739wrq; Wed, 30 Apr 2025 11:52:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTj8DuA2GyH+ZFcUGPsos5a9E2CiMn87mC9Z1PpHo2c3I5jp4/q1oO8Zt7x60Yl294qHo+hw==@linaro.org X-Google-Smtp-Source: AGHT+IEB4Uwe++t2+CjhFbtm+uPCgpSo6z6QVltkq/24vP3Wm8/ADCzT8du1t9U7XVwVDSd64RI+ X-Received: by 2002:a05:620a:290f:b0:7ac:b95b:7107 with SMTP id af79cd13be357-7cacd03417amr86889985a.12.1746039124746; Wed, 30 Apr 2025 11:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746039124; cv=none; d=google.com; s=arc-20240605; b=IoW409enDnXmvbHS/gbvL5KQN4qzUxVRV+ByglYo5uIk6W0VUXM6H29RC4Gtnu3WOc lNVc8tsCUpknQ0AlDK2+fy7oXMRNyrHttM98SFPQ68mou82QG2C/PLdmH8RxAr3JAJ4u 86Ai2tBVARye9wwR21RZZKrM/yDaOQ1vH2UliHzc9N+K0QWUCjpLNEW/ksvP1LXfCGgx QcaPTE16mRGM4bSr0exqQYzs0oknz3O8g4A/AxOlF0/Vi8kBDMbL9gk1FCuAaooe3lE2 ChbZfsvHwTGiqTlGlmmx4Wt+tERN6Sog1uwbugV9yXu9eEwBPGYxC77xdS+67xpsyJe5 KhhA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FGMmWQoDu0O44Khh2IplYBQXTQMrVHQxvhNgACgHD6s=; fh=xw5RWGu1x0+f/R0T2ngqmImniGwogAR8sATudS8QKPQ=; b=lcAYhD0WOFDuWIQCBwRIzJWzVfEWQD7YXWonjd/FLrJ2h58TLT46PbtKC2UhqBhk5a yHV9sChxDMNPNBneAcHDQabV4HryfJYdWyija6YTmfXe/4zbCR+Kyc6qToHXtJ4Y4+uU K5ViW03uXhGoJILSRppLzkUZ45FnjBV/Xj6lIumCxURrTZ9jmjU5CZsqsKg2SOX6l8Db OSywRDpwjrOQ9wZ86FoRKfmllRB+ASNZyv9yhlIrouO4+4CL7p4P9YWe4FcoafKUUdrF lLhAKbxkzdJ25p1XrhBIrviQ0Up6XwFWS5kDjuxq1bGdPzY3T75wws224dEikKdvNkGU AttQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YoQcF3r1; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cac9c7af80si165578085a.582.2025.04.30.11.52.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Apr 2025 11:52:04 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=YoQcF3r1; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uACWR-0003yo-KJ; Wed, 30 Apr 2025 14:51:07 -0400 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 1uACWP-0003tv-J5 for qemu-devel@nongnu.org; Wed, 30 Apr 2025 14:51:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uACWN-0008LJ-V1 for qemu-devel@nongnu.org; Wed, 30 Apr 2025 14:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1746039063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FGMmWQoDu0O44Khh2IplYBQXTQMrVHQxvhNgACgHD6s=; b=YoQcF3r1PME9Kqdmu0gejmIiwE3NW1WuWZARk16IvY9iKDVEHOEe8yf+Faj0FSGb2ZBlzJ HdQ9OkqLyvHii5zydDe3BHQLcIeyooKBWUmKvVfsOfLYfXiHIZAH4UpLMhEckAU2Pnt4tR oepbc0bxkt7VQsuj7EXfinj2WLHQhq8= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-79j4yoelPomgWdzlEF3-LA-1; Wed, 30 Apr 2025 14:50:59 -0400 X-MC-Unique: 79j4yoelPomgWdzlEF3-LA-1 X-Mimecast-MFC-AGG-ID: 79j4yoelPomgWdzlEF3-LA_1746039058 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B9E21956086; Wed, 30 Apr 2025 18:50:58 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.67]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C91AA19560A3; Wed, 30 Apr 2025 18:50:56 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Fabiano Rosas Subject: [PULL 8/9] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support Date: Wed, 30 Apr 2025 20:50:34 +0200 Message-ID: <20250430185035.724919-9-thuth@redhat.com> In-Reply-To: <20250430185035.724919-1-thuth@redhat.com> References: <20250430185035.724919-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.483, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 From: 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é Reviewed-by: Fabiano Rosas Message-ID: <20250115210048.25396-1-philmd@linaro.org> Signed-off-by: Thomas Huth --- 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 6f787be7af8..f9f5cf396f0 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);