Re: [PATCH] target/riscv: Fix itrigger when icount is used

2023-04-04 Thread Alistair Francis
On Sat, Mar 25, 2023 at 2:04 AM LIU Zhiwei wrote: > > When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. > The reason is that when execute helper_mret or helper_sret, it will > cause a call to icount_get_raw_locked (), which needs set can_do_io flag > on cpustate. > > Th

Re: [PATCH] target/riscv: Fix itrigger when icount is used

2023-04-04 Thread Alistair Francis
On Sat, Mar 25, 2023 at 2:04 AM LIU Zhiwei wrote: > > When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. > The reason is that when execute helper_mret or helper_sret, it will > cause a call to icount_get_raw_locked (), which needs set can_do_io flag > on cpustate. > > Th

[PATCH] target/riscv: Fix itrigger when icount is used

2023-03-24 Thread LIU Zhiwei
When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. The reason is that when execute helper_mret or helper_sret, it will cause a call to icount_get_raw_locked (), which needs set can_do_io flag on cpustate. Thus we setting this flag when execute these two instructions. Si

Re: [PATCH] target/riscv: Fix itrigger when icount is used

2023-03-24 Thread liweiwei
On 2023/3/24 14:40, LIU Zhiwei wrote: When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. The reason is that when execute helper_mret or helper_sret, it will cause a call to icount_get_raw_locked (), which needs set can_do_io flag on cpustate. Thus we setting this fla