[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 05/20] target/riscv/cpu.c: split non-ratified exts from riscv
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v10 05/20] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[] |
Date: |
Tue, 12 Sep 2023 10:24:08 -0300 |
Create a new riscv_cpu_experimental_exts[] to store the non-ratified
extensions properties. Once they are ratified we'll move them back to
riscv_cpu_extensions[].
riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties() are
changed to keep adding non-ratified properties to users.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
---
target/riscv/cpu.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index ad6ce2c2dc..83b44900a5 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1881,8 +1881,11 @@ static Property riscv_cpu_extensions[] = {
DEFINE_PROP_BOOL("xtheadsync", RISCVCPU, cfg.ext_xtheadsync, false),
DEFINE_PROP_BOOL("xventanacondops", RISCVCPU, cfg.ext_XVentanaCondOps,
false),
- /* These are experimental so mark with 'x-' */
+ DEFINE_PROP_END_OF_LIST(),
+};
+/* These are experimental so mark with 'x-' */
+static Property riscv_cpu_experimental_exts[] = {
/* ePMP 0.9.3 */
DEFINE_PROP_BOOL("x-epmp", RISCVCPU, cfg.epmp, false),
DEFINE_PROP_BOOL("x-smaia", RISCVCPU, cfg.ext_smaia, false),
@@ -1973,6 +1976,10 @@ void kvm_riscv_cpu_add_kvm_properties(Object *obj)
riscv_cpu_add_kvm_unavail_prop(obj, prop->name);
}
+ for (prop = riscv_cpu_experimental_exts; prop && prop->name; prop++) {
+ riscv_cpu_add_kvm_unavail_prop(obj, prop->name);
+ }
+
for (prop = riscv_cpu_options; prop && prop->name; prop++) {
/* Check if KVM created the property already */
if (object_property_find(obj, prop->name)) {
@@ -2012,6 +2019,10 @@ static void riscv_cpu_add_user_properties(Object *obj)
for (prop = riscv_cpu_options; prop && prop->name; prop++) {
qdev_property_add_static(dev, prop);
}
+
+ for (prop = riscv_cpu_experimental_exts; prop && prop->name; prop++) {
+ qdev_property_add_static(dev, prop);
+ }
}
static Property riscv_cpu_properties[] = {
--
2.41.0
- [PATCH v10 00/20] riscv: 'max' CPU, detect user choice in TCG, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 02/20] target/riscv/cpu.c: skip 'bool' check when filtering KVM props, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 01/20] target/riscv/cpu.c: split CPU options from riscv_cpu_extensions[], Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 07/20] target/riscv/cpu.c: add riscv_cpu_add_qdev_prop_array(), Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 04/20] target/riscv: add DEFINE_PROP_END_OF_LIST() to riscv_cpu_options[], Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 05/20] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[],
Daniel Henrique Barboza <=
- [PATCH v10 06/20] target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[], Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 03/20] target/riscv/cpu.c: split kvm prop handling to its own helper, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 08/20] target/riscv/cpu.c: add riscv_cpu_add_kvm_unavail_prop_array(), Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 09/20] target/riscv/cpu.c: limit cfg->vext_spec log message, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 10/20] target/riscv: add 'max' CPU type, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 11/20] avocado, risc-v: add tuxboot tests for 'max' CPU, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 12/20] target/riscv: deprecate the 'any' CPU type, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 13/20] target/riscv/cpu.c: use offset in isa_ext_is_enabled/update_enabled, Daniel Henrique Barboza, 2023/09/12
- [PATCH v10 14/20] target/riscv: make CPUCFG() macro public, Daniel Henrique Barboza, 2023/09/12