mirror of https://github.com/proxmox/mirror_qemu
target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[]
Our goal is to make riscv_cpu_extensions[] hold only ratified, non-vendor extensions. Create a new riscv_cpu_vendor_exts[] array for them, changing riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties() accordingly. 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: <20230912132423.268494-7-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>master
parent
b955fd1a00
commit
82822b5d5a
|
@ -1863,7 +1863,10 @@ static Property riscv_cpu_extensions[] = {
|
|||
DEFINE_PROP_BOOL("zcmt", RISCVCPU, cfg.ext_zcmt, false),
|
||||
DEFINE_PROP_BOOL("zicond", RISCVCPU, cfg.ext_zicond, false),
|
||||
|
||||
/* Vendor-specific custom extensions */
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static Property riscv_cpu_vendor_exts[] = {
|
||||
DEFINE_PROP_BOOL("xtheadba", RISCVCPU, cfg.ext_xtheadba, false),
|
||||
DEFINE_PROP_BOOL("xtheadbb", RISCVCPU, cfg.ext_xtheadbb, false),
|
||||
DEFINE_PROP_BOOL("xtheadbs", RISCVCPU, cfg.ext_xtheadbs, false),
|
||||
|
@ -1972,6 +1975,10 @@ void kvm_riscv_cpu_add_kvm_properties(Object *obj)
|
|||
riscv_cpu_add_kvm_unavail_prop(obj, prop->name);
|
||||
}
|
||||
|
||||
for (prop = riscv_cpu_vendor_exts; prop && prop->name; prop++) {
|
||||
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);
|
||||
}
|
||||
|
@ -2016,6 +2023,10 @@ static void riscv_cpu_add_user_properties(Object *obj)
|
|||
qdev_property_add_static(dev, prop);
|
||||
}
|
||||
|
||||
for (prop = riscv_cpu_vendor_exts; 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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue