Re: [PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-05 Thread maobibo
On 2024/3/5 下午11:45, Richard Henderson wrote: 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 acc

Re: [PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-05 Thread Richard Henderson
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

[PATCH v3] target/loongarch: Add TCG macro in structure CPUArchState

2024-03-04 Thread Bibo Mao
In structure CPUArchState some struct elements are only used in TCG mode, and it is not used in KVM mode. Macro CONFIG_TCG is added to make it simpiler in KVM mode, also there is the same modification in c code when these struct elements are used. When VM runs in KVM mode, TLB entries are not used