From patchwork Tue Feb 15 17:57:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 542793 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp685469imn; Tue, 15 Feb 2022 09:58:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOW241a5fGsi3tUDjizwFrBPOtEgpZfX2ziAkN09d7J+Lxecp+E2HJhpvbelddtHlP2pHC X-Received: by 2002:a25:d304:: with SMTP id e4mr45790ybf.515.1644947905819; Tue, 15 Feb 2022 09:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644947905; cv=none; d=google.com; s=arc-20160816; b=DlOGeay3rzW0Ea1Aila4VuxRKM98K+uR/ElEIflxQbKOd2NmyvnASxXMxBEFipRBPf gGxsQvFng9MSRBGUPfzaPotejKcDn7bJvriFOpWyczevhOMxoMA4JaK6wwlmT6ugJgdS J9f6IOFp1UgTKxVDHTpTKF17IdEJj7gr+5i/UxX/UDBMirvTTOJSu9ksW98VBWAGT9Z9 9Q6fDIMFjf2Ny/t8NWnBDGcnfm4dm150Rc9xdWPmyU+iJvSN1uEJgHaxFyOYaj4JAs6g DJJj5A98H9GU4Lrcrxbdwgpa8u2Jkbs1w4vmSMsepPiRITlmG/6g/nspjBiN+aZv9CCr p4RQ== 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:message-id:date:subject:to:from:dkim-signature; bh=0kDDsMjNNIrphQ/RGXhR/7sP5KLXcWkTpPnUps9e9Ao=; b=G7GK1FzXGaaQOWpuVcVR5C3wxRLb+6VMJX9156kcA3mbBPZI1yfboCpWyVfO7lvWka s5TvTBhGuHf5kZmtpPuN40uaQWoiTO4SWj60hDysrjaV+9IETrM/SP3TB3jFrUZOKJpI JbWGPoZTvI1rRKz8ru89S0Fzx0y0L0v6PB/bRs/+RujstzbJ07elM4pBg8SSR5ETtQ4K ms43LZXDvLQCtVK9WsueLwFUrbqp4raTUwwP3jN26Q0BovX9REPpBA01a2k8mMpWHCDh 8N0CaKgzgsEMl4dK6HtJv8YwGrwt5pylufdzMlXPGbBMXR4u4aq1YIwRj0r9ePM/EFr2 J2SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="N/f/STO3"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t127si14785411ywt.444.2022.02.15.09.58.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Feb 2022 09:58:25 -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=fail header.i=@linaro.org header.s=google header.b="N/f/STO3"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK25p-0004YT-Ab for patch@linaro.org; Tue, 15 Feb 2022 12:58:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK24e-0004Iz-BX for qemu-devel@nongnu.org; Tue, 15 Feb 2022 12:57:12 -0500 Received: from [2a00:1450:4864:20::430] (port=40671 helo=mail-wr1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nK24b-0008Hi-Ra for qemu-devel@nongnu.org; Tue, 15 Feb 2022 12:57:11 -0500 Received: by mail-wr1-x430.google.com with SMTP id j26so22613745wrb.7 for ; Tue, 15 Feb 2022 09:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0kDDsMjNNIrphQ/RGXhR/7sP5KLXcWkTpPnUps9e9Ao=; b=N/f/STO32QcmEZ03UET14Faz/S5+pKCC7ocBqYe19yAEvXTFYZurN6zUbWxT9M5PaK 0mdslYfcfqfHU7IUm8zgtjI4YdR8EhGXHj88OxRAc9Ki0/2VK0pnqXAzNDEjT6CORnls o0zL2QM0ocDFoRUN+Dy52APHmHZbfWkCMu3hxEjB6tVY3f2+DZo5MaSteWBU+OUW4Xf1 /KoVZtXWDDQ8oEiqj+lTrx0NC9lSf8Elbsw+wUX/N1vRf/vhm4s8TAOXVDPaoaC2Vqlk NbAHxLTHmS7MTlNye/J8imWh1fGrys3us1ZO7G70llFva+M/ZrcS5/70GKYyZIyU1k3k chQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0kDDsMjNNIrphQ/RGXhR/7sP5KLXcWkTpPnUps9e9Ao=; b=LYo5WqFdsHYBhKNlRfTgyFOqKFp23+LdOBSz+Vrys2/xpbjYlDDMY89bN4diy2HW05 mFssIfq9iiX80m/q51hicDOfGINe4cnk1YwKTTPRd9wc4GqSI4Ruo0ZoPEHOQk5cdiXI /o8txRZjVVY26m+7ieLgYMSlmyeM4MPBc01IJ2gNB0XeCWIqGZoMxVUdZzIP+SINtmjs q/4pPSXMOo8MBVqMzut4aAd0q6IeI5vYb9dr+k/8m9qBGFwaXmw4P2XeiMM/zNetPP6E 6I/TTa93bvgTkIDeBS3kGfbwPdapfibveC80yDgEfMRWLOzbk/G5cCrTKYBbfRBvLVoQ w6Jw== X-Gm-Message-State: AOAM532LV0jVmuP3UWmF+yTOwkCJTEX9NCIZ8BsQPn+2eKI6eizsL7Mt RopGF/zyFVnjTXBzOId00lQPm9urzXv3hg== X-Received: by 2002:a5d:480b:: with SMTP id l11mr133691wrq.276.1644947828241; Tue, 15 Feb 2022 09:57:08 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id o10sm23768409wrc.98.2022.02.15.09.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 09:57:07 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] migration: Remove load_state_old and minimum_version_id_old Date: Tue, 15 Feb 2022 17:57:05 +0000 Message-Id: <20220215175705.3846411-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::430 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 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, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: Francisco Iglesias , Alistair Francis , "Edgar E. Iglesias" , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Francisco Iglesias Reviewed-by: Alistair Francis --- docs/devel/migration.rst | 10 ++-------- include/migration/vmstate.h | 2 -- hw/ssi/xlnx-versal-ospi.c | 1 - migration/vmstate.c | 6 ------ 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index 24012534827..3e9656d8e0b 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/include/migration/vmstate.h b/include/migration/vmstate.h index 017c03675ca..ad24aa19345 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/hw/ssi/xlnx-versal-ospi.c b/hw/ssi/xlnx-versal-ospi.c index 7ecd148fdf3..c762e0b3679 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/migration/vmstate.c b/migration/vmstate.c index 05f87cdddc5..36ae8b9e191 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);