|
From: | Richard Henderson |
Subject: | Re: [PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState |
Date: | Tue, 5 Mar 2024 05:45:07 -1000 |
User-agent: | Mozilla Thunderbird |
On 3/4/24 20:26, Bibo Mao wrote:
+#ifdef CONFIG_TCG static int loongarch_map_tlb_entry(CPULoongArchState *env, hwaddr *physical, int *prot, target_ulong address, int access_type, int index, int mmu_idx) @@ -154,6 +155,14 @@ static int loongarch_map_address(CPULoongArchState *env, hwaddr *physical,return TLBRET_NOMATCH;} +#else +static int loongarch_map_address(CPULoongArchState *env, hwaddr *physical, + int *prot, target_ulong address, + MMUAccessType access_type, int mmu_idx) +{ + return TLBRET_NOMATCH; +} +#endif
You may find that debugging with gdbstub or the qemu monitor easier with a routine that walks page tables for loongarch_cpu_get_phys_page_debug. For kvm, the existing code is insufficient anyway, because you'd need to emulate a hardware page table walk, not use env->tlb[], which would not be populated.
This can be improved later. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |