Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-09 Thread Anup Patel
On Thu, Jun 9, 2022 at 7:28 PM Richard Henderson wrote: > > On 6/8/22 20:16, Anup Patel wrote: > > On Wed, Jun 8, 2022 at 10:23 PM Richard Henderson > > wrote: > >> > >> On 6/8/22 09:14, Anup Patel wrote: > >>> +struct isa_ext_data isa_edata_arr[] = { > >> > >> static const? > > > > Using con

Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-09 Thread Richard Henderson
On 6/8/22 20:16, Anup Patel wrote: On Wed, Jun 8, 2022 at 10:23 PM Richard Henderson wrote: On 6/8/22 09:14, Anup Patel wrote: +struct isa_ext_data isa_edata_arr[] = { static const? Using const is fine but we can't use "static const" because the "struct isa_ext_data" has a pointer to

Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-08 Thread Anup Patel
On Wed, Jun 8, 2022 at 10:23 PM Richard Henderson wrote: > > On 6/8/22 09:14, Anup Patel wrote: > > +struct isa_ext_data isa_edata_arr[] = { > > static const? Using const is fine but we can't use "static const" because the "struct isa_ext_data" has a pointer to ext_xyz which is different for

Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-08 Thread Bin Meng
On Thu, Jun 9, 2022 at 12:20 AM Anup Patel wrote: > > We should disable extensions in riscv_cpu_realize() if minimum required > priv spec version is not satisfied. This also ensures that machines with > priv spec v1.11 (or lower) cannot enable H, V, and various multi-letter > extensions. > > Fixes

Re: [PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-08 Thread Richard Henderson
On 6/8/22 09:14, Anup Patel wrote: +struct isa_ext_data isa_edata_arr[] = { static const? r~

[PATCH v4 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-08 Thread Anup Patel
We should disable extensions in riscv_cpu_realize() if minimum required priv spec version is not satisfied. This also ensures that machines with priv spec v1.11 (or lower) cannot enable H, V, and various multi-letter extensions. Fixes: a775398be2e ("target/riscv: Add isa extenstion strings to the