From nobody Mon Nov 23 05:10:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790653349011140.9281881380109; Mon, 28 Sep 2026 20:42:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBOj0-0004H7-JV; Mon, 28 Sep 2026 23:41:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBOip-0004GL-O0 for qemu-devel@nongnu.org; Mon, 28 Sep 2026 23:41:41 -0400 Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBOim-0000aE-Jo for qemu-devel@nongnu.org; Mon, 28 Sep 2026 23:41:39 -0400 Received: from loongson.cn (unknown [10.40.46.54]) by gateway (Coremail) with SMTP id _____8Bxn9FqM7tq0s8QAA--.48699S3; Tue, 29 Sep 2026 11:41:30 +0800 (CST) Received: from fedora.loongson.cn (unknown [10.40.46.54]) by front1 (Coremail) with SMTP id qMiowJDxRs1oM7tqXGMmAA--.2885S2; Tue, 29 Sep 2026 11:41:28 +0800 (CST) From: Bibo Mao To: Song Gao <17746591750@163.com> Cc: Xianglai Li , qemu-devel@nongnu.org Subject: [PATCH] target/loongarch: Remove TLB entry in vmstate Date: Tue, 29 Sep 2026 11:42:52 +0800 Message-ID: <20260929034252.712482-1-maobibo@loongson.cn> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: qMiowJDxRs1oM7tqXGMmAA--.2885S2 X-CM-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iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07UWHqcUUUUU= 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=lists1p.gnu.org; Received-SPF: pass client-ip=114.242.206.163; envelope-from=maobibo@loongson.cn; helo=mail.loongson.cn 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, 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: qemu development 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-ZM-MESSAGEID: 1790653352647158500 Content-Type: text/plain; charset="utf-8" The content of TLB entry may change if LVZ is added, TLB table can re-establish from empty state after VM migration. There will be compatible issue if TLB entry is removed in vmstate, however it is only affect TCG mode. Signed-off-by: Bibo Mao Reviewed-by:=C2=A0 Xianglai Li --- target/loongarch/machine.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c index 931a5ca5ba..952c5497af 100644 --- a/target/loongarch/machine.c +++ b/target/loongarch/machine.c @@ -175,38 +175,6 @@ static const VMStateDescription vmstate_pmu =3D { }, }; =20 -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) -static bool tlb_needed(void *opaque) -{ - return tcg_enabled(); -} - -/* TLB state */ -static const VMStateDescription vmstate_tlb_entry =3D { - .name =3D "cpu/tlb_entry", - .version_id =3D 0, - .minimum_version_id =3D 0, - .fields =3D (const VMStateField[]) { - VMSTATE_UINT64(tlb_misc, LoongArchTLB), - VMSTATE_UINT64(tlb_entry0, LoongArchTLB), - VMSTATE_UINT64(tlb_entry1, LoongArchTLB), - VMSTATE_END_OF_LIST() - } -}; - -static const VMStateDescription vmstate_tlb =3D { - .name =3D "cpu/tlb", - .version_id =3D 0, - .minimum_version_id =3D 0, - .needed =3D tlb_needed, - .fields =3D (const VMStateField[]) { - VMSTATE_STRUCT_ARRAY(env.tlb, LoongArchCPU, LOONGARCH_TLB_MAX, - 0, vmstate_tlb_entry, LoongArchTLB), - VMSTATE_END_OF_LIST() - } -}; -#endif - /* LoongArch CPU state */ const VMStateDescription vmstate_loongarch_cpu =3D { .name =3D "cpu", @@ -283,9 +251,6 @@ const VMStateDescription vmstate_loongarch_cpu =3D { &vmstate_fpu, &vmstate_lsx, &vmstate_lasx, -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) - &vmstate_tlb, -#endif &vmstate_lbt, &vmstate_msgint, &vmstate_pmu, base-commit: 81ce3a87737aa50716c42db8886082d12783e0a1 --=20 2.54.0