Message ID | 20230712205748.446931-3-dbarboza@ventanamicro.com |
---|---|
State | New |
Headers | show |
Series | target/riscv: add 'max' CPU type | expand |
On Thu, Jul 13, 2023 at 6:59 AM Daniel Henrique Barboza <dbarboza@ventanamicro.com> wrote: > > After the introduction of riscv_cpu_options[] all properties in > riscv_cpu_extensions[] are booleans. This check is now obsolete. > > Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > target/riscv/cpu.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index cdf9eeeb6b..735e0ed793 100644 > --- a/target/riscv/cpu.c > +++ b/target/riscv/cpu.c > @@ -1907,17 +1907,11 @@ static void riscv_cpu_add_user_properties(Object *obj) > * Set the default to disabled for every extension > * unknown to KVM and error out if the user attempts > * to enable any of them. > - * > - * We're giving a pass for non-bool properties since they're > - * not related to the availability of extensions and can be > - * safely ignored as is. > */ > - if (prop->info == &qdev_prop_bool) { > - object_property_add(obj, prop->name, "bool", > - NULL, cpu_set_cfg_unavailable, > - NULL, (void *)prop->name); > - continue; > - } > + object_property_add(obj, prop->name, "bool", > + NULL, cpu_set_cfg_unavailable, > + NULL, (void *)prop->name); > + continue; > } > #endif > qdev_property_add_static(dev, prop); > -- > 2.41.0 > >
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index cdf9eeeb6b..735e0ed793 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1907,17 +1907,11 @@ static void riscv_cpu_add_user_properties(Object *obj) * Set the default to disabled for every extension * unknown to KVM and error out if the user attempts * to enable any of them. - * - * We're giving a pass for non-bool properties since they're - * not related to the availability of extensions and can be - * safely ignored as is. */ - if (prop->info == &qdev_prop_bool) { - object_property_add(obj, prop->name, "bool", - NULL, cpu_set_cfg_unavailable, - NULL, (void *)prop->name); - continue; - } + object_property_add(obj, prop->name, "bool", + NULL, cpu_set_cfg_unavailable, + NULL, (void *)prop->name); + continue; } #endif qdev_property_add_static(dev, prop);
After the introduction of riscv_cpu_options[] all properties in riscv_cpu_extensions[] are booleans. This check is now obsolete. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> --- target/riscv/cpu.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)