From patchwork Thu Aug 22 16:56:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arman Nabiev X-Patchwork-Id: 13773954 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B22FFC3DA4A for ; Thu, 22 Aug 2024 16:57:47 +0000 (UTC) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Arman Nabiev In vmstate_tlbemb a cut-and-paste error meant we gave this vmstate subsection the same "cpu/tlb6xx" 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: $ qemu-system-ppc -drive if=none,format=qcow2,file=/home/petmay01/test-images/virt/dummy.qcow2 -monitor stdio -M bamboo QEMU 9.0.92 monitor - type 'help' for more information (qemu) savevm foo (qemu) loadvm foo Missing section footer for cpu Error: Error -22 while loading VM state 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, 440, 460 and e200 CPU families. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2522 Reviewed-by: Peter Maydell Signed-off-by: Arman Nabiev --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/machine.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) } static const VMStateDescription vmstate_tlbemb = { - .name = "cpu/tlb6xx", + .name = "cpu/tlbemb", .version_id = 1, .minimum_version_id = 1, .needed = tlbemb_needed,