Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx

2022-01-01 Thread Weiwei Li
在 2022/1/2 上午3:46, Richard Henderson 写道: On 12/31/21 9:55 PM, Weiwei Li wrote: This shouldn't be necessary because it should never have been set. Yes, I think so. However, I have a question about MSTATUS_MIE and MSTATUS_MPRV, will they be set before cpu reset? Yes, via warm reset. Thanks.

Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx

2022-01-01 Thread Richard Henderson
On 12/31/21 9:55 PM, Weiwei Li wrote: This shouldn't be necessary because it should never have been set. Yes, I think so. However, I have a question about MSTATUS_MIE and MSTATUS_MPRV, will they be set before cpu reset? Yes, via warm reset. I would think it would be more correct to have a

Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx

2021-12-31 Thread Weiwei Li
Thanks for your comments. 在 2022/1/1 上午3:56, Richard Henderson 写道: On 12/30/21 7:23 PM, Weiwei Li wrote: @@ -363,6 +363,10 @@ static void riscv_cpu_reset(DeviceState *dev)   env->misa_mxl = env->misa_mxl_max;   env->priv = PRV_M;   env->mstatus &= ~(MSTATUS_MIE | MSTATUS_MPRV); +   

Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx

2021-12-31 Thread Richard Henderson
On 12/30/21 7:23 PM, Weiwei Li wrote: @@ -363,6 +363,10 @@ static void riscv_cpu_reset(DeviceState *dev) env->misa_mxl = env->misa_mxl_max; env->priv = PRV_M; env->mstatus &= ~(MSTATUS_MIE | MSTATUS_MPRV); +/* hardwire mstatus.FS to zero when enable zfinx */ +if