Re: [PATCH v1 4/4] target/riscv: Add itrigger_enabled field to CPURISCVState

2022-11-10 Thread Alistair Francis
On Thu, Nov 10, 2022 at 3:35 PM Richard Henderson wrote: > > On 11/10/22 13:15, LIU Zhiwei wrote: > >>> +static int debug_post_load(void *opaque, int version_id) > >>> +{ > >>> +RISCVCPU *cpu = opaque; > >>> +CPURISCVState *env = &cpu->env; > >>> + > >>> +if (icount_enabled()) { > >>>

Re: [PATCH v1 4/4] target/riscv: Add itrigger_enabled field to CPURISCVState

2022-11-09 Thread Richard Henderson
On 11/10/22 13:15, LIU Zhiwei wrote: +static int debug_post_load(void *opaque, int version_id) +{ +    RISCVCPU *cpu = opaque; +    CPURISCVState *env = &cpu->env; + +    if (icount_enabled()) { +    env->itrigger_enabled = riscv_itrigger_enabled(env); +    } + +    return 0; +} +   static co

Re: [PATCH v1 4/4] target/riscv: Add itrigger_enabled field to CPURISCVState

2022-11-09 Thread LIU Zhiwei
On 2022/11/10 6:55, Alistair Francis wrote: On Thu, Oct 13, 2022 at 4:51 PM LIU Zhiwei wrote: Avoid calling riscv_itrigger_enabled() when calculate the tbflags. As the itrigger enable status can only be changed when write tdata1, migration load or itrigger fire, update env->itrigger_enabled a

Re: [PATCH v1 4/4] target/riscv: Add itrigger_enabled field to CPURISCVState

2022-11-09 Thread Alistair Francis
On Thu, Oct 13, 2022 at 4:51 PM LIU Zhiwei wrote: > > Avoid calling riscv_itrigger_enabled() when calculate the tbflags. > As the itrigger enable status can only be changed when write > tdata1, migration load or itrigger fire, update env->itrigger_enabled > at these places. > > Signed-off-by: LIU