[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 15/20] target/riscv/cpu.c: add satp_mode properties earlier
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v7 15/20] target/riscv/cpu.c: add satp_mode properties earlier |
Date: |
Fri, 30 Jun 2023 07:08:06 -0300 |
riscv_cpu_add_user_properties() ended up with an excess of "#ifndef
CONFIG_USER_ONLY" blocks after changes that added KVM properties
handling.
KVM specific properties are required to be created earlier than their
TCG counterparts, but the remaining props can be created at any order.
Move riscv_add_satp_mode_properties() to the start of the function,
inside the !CONFIG_USER_ONLY block already present there, to remove the
last ifndef block.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/cpu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index f348424170..db718eff65 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1770,6 +1770,8 @@ static void riscv_cpu_add_user_properties(Object *obj)
DeviceState *dev = DEVICE(obj);
#ifndef CONFIG_USER_ONLY
+ riscv_add_satp_mode_properties(obj);
+
if (kvm_enabled()) {
kvm_riscv_init_user_properties(obj);
}
@@ -1788,10 +1790,6 @@ static void riscv_cpu_add_user_properties(Object *obj)
#endif
qdev_property_add_static(dev, prop);
}
-
-#ifndef CONFIG_USER_ONLY
- riscv_add_satp_mode_properties(obj);
-#endif
}
static Property riscv_cpu_properties[] = {
--
2.41.0
- [PATCH v7 06/20] target/riscv: use KVM scratch CPUs to init KVM properties, (continued)
- [PATCH v7 06/20] target/riscv: use KVM scratch CPUs to init KVM properties, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 07/20] target/riscv: read marchid/mimpid in kvm_riscv_init_machine_ids(), Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 08/20] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 09/20] linux-headers: Update to v6.4-rc1, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 10/20] target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 12/20] target/riscv: add KVM specific MISA properties, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 11/20] target/riscv/cpu: add misa_ext_info_arr[], Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 15/20] target/riscv/cpu.c: add satp_mode properties earlier,
Daniel Henrique Barboza <=
- [PATCH v7 13/20] target/riscv/kvm.c: update KVM MISA bits, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 16/20] target/riscv/cpu.c: remove priv_ver check from riscv_isa_string_ext(), Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 17/20] target/riscv/cpu.c: create KVM mock properties, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 18/20] target/riscv: update multi-letter extension KVM properties, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 19/20] target/riscv/kvm.c: add kvmconfig_get_cfg_addr() helper, Daniel Henrique Barboza, 2023/06/30
- [PATCH v7 20/20] target/riscv/kvm.c: read/write (cbom|cboz)_blocksize in KVM, Daniel Henrique Barboza, 2023/06/30