From patchwork Wed Mar 2 18:29:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 547515 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:3c7:0:0:0:0 with SMTP id b7csp412139wrg; Wed, 2 Mar 2022 10:52:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoi1Y2XlBUf8DdRAHp5z87cWHcdxEIhc7Xigh6jRDHCmmnOzU8epsooquVt7WzXixaVjT3 X-Received: by 2002:a25:c741:0:b0:628:755b:4757 with SMTP id w62-20020a25c741000000b00628755b4757mr10073002ybe.66.1646247136823; Wed, 02 Mar 2022 10:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646247136; cv=none; d=google.com; s=arc-20160816; b=jeFriejq6O1ne83S87JqcDzrCLDi7QqjITDdJytzQsoU9Sxg+UnUCVJtB9fPXei+7E +0r0yYEjPtqIvNMKJhojmEDxQhOWAk1/5hYa+VM0E/MZ9N3TNzScLDR9FhOPngyI0Lmg ga52/Rh/8JfV5BtmXCoK8xJsRCBlXRNdTr6XYDPCXb92ab2+W80Le+vFPebOy4Lfkksu IgcotmM3IdWnQ3qZTZJQ90W3PyuTzm/UiufoxRA1vQte1OV+edZRAbg01WDtOeDwYwBL IYhcZDROYbZ3U7nUBo8OT2UPr9zjIi8aTBpeoLmDWfKb7id3OuVBK8cRI+CS+iXhppnF Vx1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=K8u2T++Crfcmx6tmHawN9ZEPoosKW24Svo58S7Rae5g=; b=HfL9BKrjFdCsnBgFBO7Bk8fvfsLm9VaUWSHlbw0i8S8DbnYAIFW2xxAbC7WNkn6AUS JGqYsbWHklYC/ds/kdzVW3SBwDqeoQMRiCob4OigVZcnAEi0ws13F8QdX8OlJjap3eLV JHBBzYKYLmpVZ3qJ5SC9cKlRbCdM5axixrFynrZOJ5XXIFB3/ltLrP0xU/FvT2wVQJ3z anhVEV63QCkfq/MI4kMNbcaSA73YhoG+tD5OyLvVJ6eHi76uJFhLaP+lvtR5+1K4+P2F ayHtYk1j9020VDJyFbCkJr9JH3c2c4FyBRgoibe+QLSDSOa9V/76m2CLUOalRucADMjR T0Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f2XehK2G; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s14-20020a5b074e000000b00628ba65c4ddsi654748ybq.7.2022.03.02.10.52.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Mar 2022 10:52:16 -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=@redhat.com header.s=mimecast20190719 header.b=f2XehK2G; 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=redhat.com Received: from localhost ([::1]:50380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPU5A-000413-6R for patch@linaro.org; Wed, 02 Mar 2022 13:52:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPTko-0001th-1E for qemu-devel@nongnu.org; Wed, 02 Mar 2022 13:31:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:36229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPTkm-0000MI-9R for qemu-devel@nongnu.org; Wed, 02 Mar 2022 13:31:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646245868; 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=K8u2T++Crfcmx6tmHawN9ZEPoosKW24Svo58S7Rae5g=; b=f2XehK2Gx93mlH+O7Ok95apwm3XWsqLtds1STwxMOTk0dreilNGNOkM+7m1Z7B0TPefB6Q XUmugt8a9Z6JG6cQDInCmWNsmju+N5Msn49kmpdcS2U36fN7Abj2r7h90F+710fL/btP/h kupA/kFj9qvDhbcAj/wpziAWF4HrxMA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-267-m_s0mPO3NniHOwTMistPHw-1; Wed, 02 Mar 2022 13:31:05 -0500 X-MC-Unique: m_s0mPO3NniHOwTMistPHw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5344B19251BD; Wed, 2 Mar 2022 18:31:04 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id B46911059170; Wed, 2 Mar 2022 18:31:02 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, f.ebner@proxmox.com, hreitz@redhat.com, jinpu.wang@ionos.com, peter.maydell@linaro.org, peterx@redhat.com, s.reiter@proxmox.com Subject: [PULL 18/18] migration: Remove load_state_old and minimum_version_id_old Date: Wed, 2 Mar 2022 18:29:36 +0000 Message-Id: <20220302182936.227719-19-dgilbert@redhat.com> In-Reply-To: <20220302182936.227719-1-dgilbert@redhat.com> References: <20220302182936.227719-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: quintela@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell There are no longer any VMStateDescription structs in the tree which use the load_state_old support for custom handling of incoming migration from very old QEMU. Remove the mechanism entirely. This includes removing one stray useless setting of minimum_version_id_old in a VMStateDescription with no load_state_old function, which crept in after the global weeding-out of them in commit 17e313406126. Signed-off-by: Peter Maydell Message-Id: <20220215175705.3846411-1-peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Francisco Iglesias Reviewed-by: Alistair Francis Signed-off-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 12 +++--------- hw/ssi/xlnx-versal-ospi.c | 1 - include/migration/vmstate.h | 2 -- migration/vmstate.c | 6 ------ 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index 2401253482..3e9656d8e0 100644 --- a/docs/devel/migration.rst +++ b/docs/devel/migration.rst @@ -389,19 +389,13 @@ Each version is associated with a series of fields saved. The ``save_state`` al the state as the newer version. But ``load_state`` sometimes is able to load state from an older version. -You can see that there are several version fields: +You can see that there are two version fields: - ``version_id``: the maximum version_id supported by VMState for that device. - ``minimum_version_id``: the minimum version_id that VMState is able to understand for that device. -- ``minimum_version_id_old``: For devices that were not able to port to vmstate, we can - assign a function that knows how to read this old state. This field is - ignored if there is no ``load_state_old`` handler. - -VMState is able to read versions from minimum_version_id to -version_id. And the function ``load_state_old()`` (if present) is able to -load state from minimum_version_id_old to minimum_version_id. This -function is deprecated and will be removed when no more users are left. + +VMState is able to read versions from minimum_version_id to version_id. There are *_V* forms of many ``VMSTATE_`` macros to load fields for version dependent fields, e.g. diff --git a/hw/ssi/xlnx-versal-ospi.c b/hw/ssi/xlnx-versal-ospi.c index 7ecd148fdf..c762e0b367 100644 --- a/hw/ssi/xlnx-versal-ospi.c +++ b/hw/ssi/xlnx-versal-ospi.c @@ -1800,7 +1800,6 @@ static const VMStateDescription vmstate_xlnx_versal_ospi = { .name = TYPE_XILINX_VERSAL_OSPI, .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, .fields = (VMStateField[]) { VMSTATE_FIFO8(rx_fifo, XlnxVersalOspi), VMSTATE_FIFO8(tx_fifo, XlnxVersalOspi), diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 017c03675c..ad24aa1934 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -181,9 +181,7 @@ struct VMStateDescription { int unmigratable; int version_id; int minimum_version_id; - int minimum_version_id_old; MigrationPriority priority; - LoadStateHandler *load_state_old; int (*pre_load)(void *opaque); int (*post_load)(void *opaque, int version_id); int (*pre_save)(void *opaque); diff --git a/migration/vmstate.c b/migration/vmstate.c index 05f87cdddc..36ae8b9e19 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -90,12 +90,6 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, return -EINVAL; } if (version_id < vmsd->minimum_version_id) { - if (vmsd->load_state_old && - version_id >= vmsd->minimum_version_id_old) { - ret = vmsd->load_state_old(f, opaque, version_id); - trace_vmstate_load_state_end(vmsd->name, "old path", ret); - return ret; - } error_report("%s: incoming version_id %d is too old " "for local minimum version_id %d", vmsd->name, version_id, vmsd->minimum_version_id);