Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/riscv/cpu.c: skip 'bool' check when filtering KVM props
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>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Message-ID: <20230901194627.1214811-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
danielhb authored and alistair23 committed Sep 8, 2023
1 parent 786d550 commit 34851d4
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions target/riscv/cpu.c
Expand Up @@ -1976,17 +1976,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);
Expand Down

0 comments on commit 34851d4

Please sign in to comment.