Re: [PULL 2/2] target/loongarch: check tlb_ps

2025-03-18 Thread gaosong
在 2025/3/19 上午12:23, Peter Maydell 写道: On Fri, 7 Mar 2025 at 02:42, Song Gao wrote: For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fuction to check tlb_ps, to make sure the tlb_ps is avalablie. we check tlb_ps when ge

Re: [PULL 2/2] target/loongarch: check tlb_ps

2025-03-18 Thread Peter Maydell
On Fri, 7 Mar 2025 at 02:42, Song Gao wrote: > > For LoongArch th min tlb_ps is 12(4KB), for TLB code, > the tlb_ps may be 0,this may case UndefinedBehavior > Add a check-tlb_ps fuction to check tlb_ps, > to make sure the tlb_ps is avalablie. we check tlb_ps > when get the tlb_ps from tlb->misc or

[PULL 2/2] target/loongarch: check tlb_ps

2025-03-06 Thread Song Gao
For LoongArch th min tlb_ps is 12(4KB), for TLB code, the tlb_ps may be 0,this may case UndefinedBehavior Add a check-tlb_ps fuction to check tlb_ps, to make sure the tlb_ps is avalablie. we check tlb_ps when get the tlb_ps from tlb->misc or CSR bits. 1. cpu reset set CSR_PWCL.PTBASE and CSR_STL