From nobody Sun Nov 24 09:18:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1724345868; cv=none; d=zohomail.com; s=zohoarc; b=bQAZRhCQVO/pCKMcpNZi79ZKbb9KB4XvZ/KOK8CAQUewITPbmPau3pPfFYPSjn/xdCREmbMlQBKlfoaTJjbpy3YCGB8Gf5SqWEon4PTo1ziLYn5et+gYI6/rPCTwEgw1qENoZdhBWW+RhYGJxobe/fYoyP0mt4RJ8dFaQcBIQFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724345868; h=Content-Type:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=vqYv44eNMe3f9JNYIiZe0Y4BWrUV6mmRC7f0+GfRAcI=; b=jIa6hg29XJbrqQ6ACqbdgtMZUSkLbomj3bshmoxv1i6NZ8FgfIkg8FtaK3HJ76sVqwwDxCh5jvDzbCYplMMeXzZ03D3zPuTEuAW/00uM/fC2rRautWCDgCvvYAsJbWbx4JHWD6BXBeZTpEc/mYAkltBWLATpuXtG5Nc0ZbM6nfU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1724345868357161.3385159792905; Thu, 22 Aug 2024 09:57:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shB7X-0004Vk-VW; Thu, 22 Aug 2024 12:57:11 -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 1shB7V-0004UL-LD for qemu-devel@nongnu.org; Thu, 22 Aug 2024 12:57:09 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shB7T-0004QX-HA for qemu-devel@nongnu.org; Thu, 22 Aug 2024 12:57:09 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2f3f68dd44bso12387121fa.3 for ; Thu, 22 Aug 2024 09:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724345825; x=1724950625; darn=nongnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=vqYv44eNMe3f9JNYIiZe0Y4BWrUV6mmRC7f0+GfRAcI=; b=lTpwpCb/5lqROHC+XvlIrwMZzFxa1+DG/ihzgkVp3/GETm1svvAtP2Z/pWBeI6klAj 9ByYaxoS+SnsrB7fYaiU5uyxmLqf9OwlTuLnLi+7NDuVuTE8FsgggqcJDVIVn0WZN3KD kMe+9SNqFs+ZBYcMGmJRHj1guBh8IAamlVZvw1hUGkuxB21ncq+GIZM/mKGlLMHA6C97 ba4cX/IFWxQOIq5NCl/dgBJiEY2OIXivc9eEhfxdbYVB8Ku9XdGkE7wvMFj7rG1X49db tGDgbk/iIBOYPNbA7g7OtRvd1d4emBA4PaSB4//EMUfkDexHq9hKvz/1gw902izSvLD5 iCyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724345825; x=1724950625; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vqYv44eNMe3f9JNYIiZe0Y4BWrUV6mmRC7f0+GfRAcI=; b=FRE+iSsAfJxcT9Lh+De+AX+5MdrnBG81nch26OFFqeNV6lhTSTZsGvB0d+rnIkSGm/ ed0+8HLdfYSNHq2efJ6dTok8vl7EFOMmVjIB1MSzouAP9MVdquv0wxdG1P865Bw/HK7y SRCaRH68wBycEUeaFMw2D4i+7M5J46mu0hwUSdKpIMYv8hVfejlg254At7/bmSMFh3c/ bxu9SFtYyidP7bvz0WPUFWvUVF0BiGDKuj2Ev70ZRIwFeu4ygZafRWQ/NY0wnLvPYl/A tS7afMO7PD6m9sj3TLbTqQbUiNfeLoM8coXK/qCcpb47Gm4xxVuLHWTab15FxsRVYgsr GjcA== X-Gm-Message-State: AOJu0Yw0cS2yGB01s/L2Z2uNL31q/wsOFf/p2xtb6P1p5O5+25/Arfhs UbJE6xgLCoRUJeCe10WcOeM/T0tRZBvvATFj0dcB6QgCuQflLu3D/+4F9UidTcJ0PXUtnaJhHUc ZDAM6s+YHxFzmGJcZZUb1n6mK0Na8SCGI8Bo= X-Google-Smtp-Source: AGHT+IHtax+3724MJEwzp4MMGgRTBVNSWqYNiKQ7AhGn6+SRfdvIWH3sv6APth9j9rjz3pHTQr7Elhxdyi5nRBzgKE4= X-Received: by 2002:a2e:e0a:0:b0:2ef:2c0f:283e with SMTP id 38308e7fff4ca-2f3f8832ab0mr31824931fa.12.1724345824532; Thu, 22 Aug 2024 09:57:04 -0700 (PDT) MIME-Version: 1.0 From: Arman Nabiev Date: Thu, 22 Aug 2024 19:56:53 +0300 Message-ID: Subject: [PATCH v2] target/ppc: Fix migration of CPUs with TLB_EMB TLB type To: qemu-devel@nongnu.org, Peter Maydell Content-Type: multipart/alternative; boundary="00000000000057616d0620488c04" Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=nabiev.arman13@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1724345869423116600 Content-Transfer-Encoding: quoted-printable --00000000000057616d0620488c04 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 RnJvbTogQXJtYW4gTmFiaWV2IDxuYWJpZXYuYXJtYW4xM0BnbWFpbC5jb20+CgpJbiB2bXN0YXRl X3RsYmVtYiBhIGN1dC1hbmQtcGFzdGUgZXJyb3IgbWVhbnQgd2UgZ2F2ZQp0aGlzIHZtc3RhdGUg c3Vic2VjdGlvbiB0aGUgc2FtZSAiY3B1L3RsYjZ4eCIgbmFtZSBhcwp0aGUgdm1zdGF0ZV90bGI2 eHggc3Vic2VjdGlvbi4gVGhpcyBicmVha3MgbWlncmF0aW9uIGxvYWQKZm9yIGFueSBDUFUgdXNp bmcgdGhlIFRMQl9FTUIgQ1BVIHR5cGUsIGJlY2F1c2Ugd2hlbiB3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WF5ZGVsbEBsaW5hcm8ub3JnPgpT aWduZWQtb2ZmLWJ5OiBBcm1hbiBOYWJpZXYgPG5hYmlldi5hcm1hbjEzQGdtYWlsLmNvbT4KLS0t CiB0YXJnZXQvcHBjL21hY2hpbmUuYyB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlv bigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL3RhcmdldC9wcGMvbWFjaGluZS5jIGIv dGFyZ2V0L3BwYy9tYWNoaW5lLmMKaW5kZXggNzMxZGQ4ZGYzNS4uZDQzM2ZkNDVmYyAxMDA2NDQK LS0tIGEvdGFyZ2V0L3BwYy9tYWNoaW5lLmMKKysrIGIvdGFyZ2V0L3BwYy9tYWNoaW5lLmMKQEAg LTYyMSw3ICs2MjEsNyBAQCBzdGF0aWMgYm9vbCB0bGJlbWJfbmVlZGVkKHZvaWQgKm9wYXF1ZSkK IH0KCiBzdGF0aWMgY29uc3QgVk1TdGF0ZURlc2NyaXB0aW9uIHZtc3RhdGVfdGxiZW1iID0zRCB7 Ci0gICAgLm5hbWUgPTNEICJjcHUvdGxiNnh4IiwKKyAgICAubmFtZSA9M0QgImNwdS90bGJlbWIi LAogICAgIC52ZXJzaW9uX2lkID0zRCAxLAogICAgIC5taW5pbXVtX3ZlcnNpb25faWQgPTNEIDEs CiAgICAgLm5lZWRlZCA9M0QgdGxiZW1iX25lZWRlZCwKLS09MjAKMi4zNC4x --00000000000057616d0620488c04 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
From: Arman Nabiev <nabiev.arman13@gmail.com>

In vmstate_tlbemb a cut-an= d-paste error meant we gave
this vmstate subsection the same "cpu/t= lb6xx" name as
the vmstate_tlb6xx subsection. This breaks migration= load
for any CPU using the TLB_EMB CPU type, because when we
see the= "tlb6xx" name in the incoming data we try to
interpret it as = a vmstate_tlb6xx subsection, which it
isn't the right format for:
=C2=A0$ qemu-system-ppc -drive
=C2=A0if=3Dnone,format=3Dqcow2,file= =3D/home/petmay01/test-images/virt/dummy.qcow2
=C2=A0-monitor stdio -M b= amboo
=C2=A0QEMU 9.0.92 monitor - type 'help' for more informati= on
=C2=A0(qemu) savevm foo
=C2=A0(qemu) loadvm foo
=C2=A0Missing s= ection footer for cpu
=C2=A0Error: Error -22 while loading VM state
<= br>Correct the incorrect vmstate section name. Since migration
for these= CPU types was completely broken before, we don't
need to care that = this is a migration compatibility break.

This affects the PPC 405, 4= 40, 460 and e200 CPU families.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-= /issues/2522
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Arma= n Nabiev <nabiev.arman13@gma= il.com>
---
=C2=A0target/ppc/machine.c | 2 +-
=C2=A01 file = changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/machi= ne.c b/target/ppc/machine.c
index 731dd8df35..d433fd45fc 100644
--- a= /target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -621,7 +621,7 @@ = static bool tlbemb_needed(void *opaque)
=C2=A0}
=C2=A0
=C2=A0stati= c const VMStateDescription vmstate_tlbemb =3D {
- =C2=A0 =C2=A0.name =3D= "cpu/tlb6xx",
+ =C2=A0 =C2=A0.name =3D "cpu/tlbemb"= ,
=C2=A0 =C2=A0 =C2=A0.version_id =3D 1,
=C2=A0 =C2=A0 =C2=A0.minimum= _version_id =3D 1,
=C2=A0 =C2=A0 =C2=A0.needed =3D tlbemb_needed,
-- =
2.34.1

--00000000000057616d0620488c04--