On 2/6/26 05:00, Bibo Mao wrote:
Here new structure CPUSysState is added in CPULoongArchState, CSR registers are moved to CPUSysState, qemu timer will be moved to this structure in future. With incoming LVZ supported, there will be two copied of CSR registers, so it is simply to add CPUSysState array.Also new field sys_state is added which points to CPUSysState at beginning, and it can be changed during VM exit/enter entry. There is no function change, all is code movement or variable rename. --- v1 ... v2: 1. Rename get_current_state with env_sys, variable name cur with sys, since cur/get_current_state is misleading. 2. Add modification with files in directory linux-user/loongarch64/ --- Bibo Mao (13): target/loongarch: Add new field curState in CPULoongArchState target/loongarch: Use sys_state in cpu.c when accessing CSR registers target/loongarch: Use sys_state in cpu_helper.c when accessing CSR registers target/loongarch: Use sys_state in file arch_dump.c when accessing CSR registers target/loongarch: Use sys_state in kvm.c when accessing CSR registers target/loongarch: Use sys_state in tlb_helper.c when accessing CSR registers target/loongarch: Use sys_state in tcg_cpu.c when accessing CSR registers target/loongarch: Use sys_state in csr_helper.c when accessing CSR registers target/loongarch: Use sys_state in op_helper.c when accessing CSR registers
Patches 1-10: Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
