]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/loongarch: Add stub function loongarch_get_addr_from_tlb
authorBibo Mao <maobibo@loongson.cn>
Wed, 23 Apr 2025 08:04:12 +0000 (16:04 +0800)
committerSong Gao <gaosong@loongson.cn>
Thu, 24 Apr 2025 02:01:29 +0000 (10:01 +0800)
Stub function loongarch_get_addr_from_tlb() is added if option
CONFIG_TCG is not enabled, so this function can be called in KVM
only mode.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250423080417.3739809-5-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
target/loongarch/cpu_helper.c

index 8ae9a448b4f8b00023482fbf0b7e135bb8330123..71180bc3459395d9f6216f4bde4e0aa51b0c14e5 100644 (file)
@@ -156,7 +156,16 @@ static int loongarch_get_addr_from_tlb(CPULoongArchState *env, hwaddr *physical,
 
     return TLBRET_NOMATCH;
 }
+#else
+static int loongarch_get_addr_from_tlb(CPULoongArchState *env, hwaddr *physical,
+                                       int *prot, target_ulong address,
+                                       MMUAccessType access_type, int mmu_idx)
+{
+    return TLBRET_NOMATCH;
+}
+#endif
 
+#ifdef CONFIG_TCG
 void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base,
                         uint64_t *dir_width, target_ulong level)
 {