target/riscv: make riscv_add_satp_mode_properties() public
This function is used for both accelerators. Make it public, and call it from kvm_riscv_cpu_add_kvm_properties(). This will make it easier to split KVM specific code for the KVM accelerator class in the next patch. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20230925175709.35696-10-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
32fa177604
commit
7d0c302c53
@ -1115,7 +1115,7 @@ static void cpu_riscv_set_satp(Object *obj, Visitor *v, const char *name,
|
||||
satp_map->init |= 1 << satp;
|
||||
}
|
||||
|
||||
static void riscv_add_satp_mode_properties(Object *obj)
|
||||
void riscv_add_satp_mode_properties(Object *obj)
|
||||
{
|
||||
RISCVCPU *cpu = RISCV_CPU(obj);
|
||||
|
||||
@ -1585,12 +1585,11 @@ static void riscv_cpu_add_multiext_prop_array(Object *obj,
|
||||
static void riscv_cpu_add_user_properties(Object *obj)
|
||||
{
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
riscv_add_satp_mode_properties(obj);
|
||||
|
||||
if (kvm_enabled()) {
|
||||
kvm_riscv_cpu_add_kvm_properties(obj);
|
||||
return;
|
||||
}
|
||||
riscv_add_satp_mode_properties(obj);
|
||||
#endif
|
||||
|
||||
riscv_cpu_add_misa_properties(obj);
|
||||
|
@ -726,6 +726,7 @@ extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];
|
||||
extern Property riscv_cpu_options[];
|
||||
|
||||
void riscv_cpu_add_misa_properties(Object *cpu_obj);
|
||||
void riscv_add_satp_mode_properties(Object *obj);
|
||||
|
||||
/* CSR function table */
|
||||
extern riscv_csr_operations csr_ops[CSR_TABLE_SIZE];
|
||||
|
@ -1323,6 +1323,7 @@ void kvm_riscv_cpu_add_kvm_properties(Object *obj)
|
||||
DeviceState *dev = DEVICE(obj);
|
||||
|
||||
riscv_init_user_properties(obj);
|
||||
riscv_add_satp_mode_properties(obj);
|
||||
riscv_cpu_add_misa_properties(obj);
|
||||
|
||||
riscv_cpu_add_kvm_unavail_prop_array(obj, riscv_cpu_extensions);
|
||||
|
Loading…
Reference in New Issue
Block a user