|
From: | maobibo |
Subject: | Re: [PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState |
Date: | Wed, 6 Mar 2024 09:21:21 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 2024/3/5 下午11:45, Richard Henderson wrote:
Sure, will add page table walk emulation code later in function loongarch_cpu_get_phys_page_debug(). And thanks for your guidance.On 3/4/24 20:26, Bibo Mao wrote:+#ifdef CONFIG_TCGstatic 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; +} +#endifYou 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.
Regards Bibo Mao
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |