[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 02/12] target/riscv/cpu.c: skip 'bool' check when filtering KV
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v6 02/12] target/riscv/cpu.c: skip 'bool' check when filtering KVM props |
Date: |
Thu, 27 Jul 2023 19:09:17 -0300 |
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>
---
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 61bce2dc55..2fa2581742 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1914,17 +1914,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
- [PATCH v6 00/12] riscv: add 'max' CPU, deprecate 'any', Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 01/12] target/riscv/cpu.c: split CPU options from riscv_cpu_extensions[], Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 02/12] target/riscv/cpu.c: skip 'bool' check when filtering KVM props,
Daniel Henrique Barboza <=
- [PATCH v6 03/12] target/riscv/cpu.c: split kvm prop handling to its own helper, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 04/12] target/riscv/cpu.c: del DEFINE_PROP_END_OF_LIST() from riscv_cpu_extensions, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 05/12] target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[], Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 06/12] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[], Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 07/12] target/riscv/cpu.c: add ADD_CPU_QDEV_PROPERTIES_ARRAY() macro, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 08/12] target/riscv/cpu.c: add ADD_UNAVAIL_KVM_PROP_ARRAY() macro, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 09/12] target/riscv/cpu.c: limit cfg->vext_spec log message, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 10/12] target/riscv: add 'max' CPU type, Daniel Henrique Barboza, 2023/07/27
- [PATCH v6 11/12] avocado, risc-v: add opensbi tests for 'max' CPU, Daniel Henrique Barboza, 2023/07/27