From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists1p.gnu.org (lists1p.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 85D5DC44506 for ; Fri, 10 Jul 2026 09:02:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wi76X-000656-26; Fri, 10 Jul 2026 05:01:05 -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 1wi76K-0005wp-6M for qemu-devel@nongnu.org; Fri, 10 Jul 2026 05:00:55 -0400 Received: from [2400:e920:0:e::2c] (helo=krgm.moe) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wi76D-000486-0Q for qemu-devel@nongnu.org; Fri, 10 Jul 2026 05:00:48 -0400 Received: from yuno-loong (unknown [IPv6:2400:e920:0:e::2c]) by krgm.moe (Postfix) with ESMTPSA id 92EB2241FC8F; Fri, 10 Jul 2026 17:00:34 +0800 (CST) From: SignKirigami To: qemu-devel@nongnu.org Cc: Bibo Mao , xianglai li , SignKirigami Subject: [PATCH v3 0/8] target/loongarch: add LVZ support for TCG Date: Fri, 10 Jul 2026 17:00:09 +0800 Message-ID: X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2400:e920:0:e::2c (failed) Received-SPF: pass client-ip=2400:e920:0:e::2c; envelope-from=prcups@krgm.moe; helo=krgm.moe X-Spam_score_int: 22 X-Spam_score: 2.2 X-Spam_bar: ++ X-Spam_report: (2.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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 This patch implements Loongson VirtualiZation (LVZ) extension support for LoongArch's TCG target. With this patch, it is now possible to start a nested KVM-accelerated virtual machine on a TCG-emulated virtual machine. SignKirigami (8): target/loongarch: Define LVZ CSR fields target/loongarch: Add LVZ CPU state definitions target/loongarch: Add LVZ translation context flags target/loongarch: Add LVZ guest CSR tables target/loongarch: Dump host CSRs with LVZ state target/loongarch: Add LVZ CPU runtime control target/loongarch: Add LVZ MMU and PTW support target/loongarch: Translate LVZ instructions target/loongarch/arch_dump.c | 6 +- target/loongarch/cpu-csr.h | 42 ++ target/loongarch/cpu-mmu.h | 39 +- target/loongarch/cpu.c | 279 ++++++--- target/loongarch/cpu.h | 62 +- target/loongarch/cpu_helper.c | 87 ++- target/loongarch/csr.c | 124 +++- target/loongarch/csr.h | 12 +- target/loongarch/disas.c | 16 + target/loongarch/insns.decode | 14 + target/loongarch/internals.h | 8 +- target/loongarch/machine.c | 125 +++- target/loongarch/tcg/constant_timer.c | 74 ++- target/loongarch/tcg/csr_helper.c | 136 ++++- target/loongarch/tcg/helper.h | 30 +- .../tcg/insn_trans/trans_extra.c.inc | 2 +- .../tcg/insn_trans/trans_privileged.c.inc | 353 ++++++++++- target/loongarch/tcg/op_helper.c | 45 +- target/loongarch/tcg/tcg_cpu.c | 65 +- target/loongarch/tcg/tcg_loongarch.h | 3 +- target/loongarch/tcg/tlb_helper.c | 577 +++++++++++++----- target/loongarch/tcg/translate.c | 6 +- target/loongarch/translate.h | 2 + 23 files changed, 1747 insertions(+), 360 deletions(-) -- 2.52.0