RVA22U64 profile support
v4 cover RVA22U64 profile support
Based-on: [email protected] ("[PATCH v3 0/4] riscv: zicntr/zihpm flags and disable support")
Hi,
This version has changes based on feedback from Drew and Zhiwei in v3.
Most notable changes:
- profiles flags now have the same weight as individual extension, meaning that left-to-right ordering will change the resulting configuration;
- warnings are no longer being shown if the user disables a profile. We'll make a documentation note about why disabling a profile is an advanced feature instead of warning users simply because they set a single flag to 'off';
- warnings are being shown if the user disables a mandatory extension of a profile the user is enabling. This will cover the scenario where the user is disabling an extension by mistake or, if it's intentional, the user can safely ignore it;
- RVG is being handled closer to a profile. This is something that we decided to do here, in patch 8, to keep consistent with what we're doing with profiles in patch 9. This means that we're now throwing warnings if the user set g=true and then disabled a G extension (IMAFD_zicsr_zifencei) in the command line.
Series is based on top of:
[PATCH v3 0/4] riscv: zicntr/zihpm flags and disable support
Patches missing acks: 3, 7, 8, 9
Changes from v3:
- patch 1:
- added RVI in the profile definition
- patch 3:
- removed disable profile warning from set() callback
- mandatory extensions from a profile that are enabled/disabled has the same priority as individual extensions that are enabled/disabled. Left-to-right ordering matters for the final result
- patch 6:
- change profile misa bits priority to be the same as regular misa bits set
in the command line
- patch 7 (new):
- add hash helpers
- patch 8 (new):
- honor user choice for RVG MISA bits
- patch 9 (new):
- throw user warnings if profile extensions are disabled in the command line
- v3 link: https://lore.kernel.org/qemu-riscv/[email protected]/
Daniel Henrique Barboza (9):
target/riscv: add rva22u64 profile definition target/riscv/kvm: add 'rva22u64' flag as unavailable target/riscv/tcg: add user flag for profile support target/riscv/tcg: add MISA user options hash target/riscv/tcg: add riscv_cpu_write_misa_bit() target/riscv/tcg: handle profile MISA bits target/riscv/tcg: add hash table insert helpers target/riscv/tcg: honor user choice for G MISA bits target/riscv/tcg: warn if profile exts are disabled
target/riscv/cpu.c | 20 +++ target/riscv/cpu.h | 12 ++ target/riscv/kvm/kvm-cpu.c | 7 +- target/riscv/tcg/tcg-cpu.c | 249 ++++++++++++++++++++++++++++++------- 4 files changed, 245 insertions(+), 43 deletions(-)
Signature · 1 line
2.41.0
PATCH v4 1/9 target/riscv: add rva22u64 profile definition
The rva22U64 profile, described in:
https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc#rva22-profiles
Contains a set of CPU extensions aimed for 64-bit userspace applications. Enabling this set to be enabled via a single user flag makes it convenient to enable a predictable set of features for the CPU, giving users more predicability when running/testing their workloads.
QEMU implements all possible extensions of this profile. The exception is Zicbop (Cache-Block Prefetch Operations) that is not available since QEMU RISC-V does not implement a cache model. For this same reason all the so called 'synthetic extensions' described in the profile that are cache related are ignored (Za64rs, Zic64b, Ziccif, Ziccrse, Ziccamoa, Zicclsm).
An abstraction called RISCVCPUProfile is created to store the profile. 'ext_offsets' contains mandatory extensions that QEMU supports. Same thing with the 'misa_ext' mask. Optional extensions must be enabled manually in the command line if desired.
The design here is to use the common target/riscv/cpu.c file to store the profile declaration and export it to the accelerator files. Each accelerator is then responsible to expose it (or not) to users and how to enable the extensions.
Next patches will implement the profile for TCG and KVM.
--- target/riscv/cpu.c | 20 ++++++++++++++++++++ target/riscv/cpu.h | 12 ++++++++++++ 2 files changed, 32 insertions(+)
target/riscv/cpu.c +20 -0
@@ -1429,6 +1429,26 @@ Property riscv_cpu_options[] = { DEFINE_PROP_END_OF_LIST(), }; +/* Optional extensions left out: RVV, zfh, zkn, zks */ +static RISCVCPUProfile RVA22U64 = { + .name ="rva22u64" , + .misa_ext =RVI |RVM |RVA |RVF |RVD |RVC , + .ext_offsets = { +CPU_CFG_OFFSET (ext_zicsr),CPU_CFG_OFFSET (ext_zihintpause), +CPU_CFG_OFFSET (ext_zba),CPU_CFG_OFFSET (ext_zbb), +CPU_CFG_OFFSET (ext_zbs),CPU_CFG_OFFSET (ext_zfhmin), +CPU_CFG_OFFSET (ext_zkt),CPU_CFG_OFFSET (ext_zicntr), +CPU_CFG_OFFSET (ext_zihpm),CPU_CFG_OFFSET (ext_zicbom), +CPU_CFG_OFFSET (ext_zicboz), + +RISCV_PROFILE_EXT_LIST_END + } +}; + +RISCVCPUProfile *riscv_profiles[] = { + &RVA22U64 ,NULL , +}; +static Property riscv_cpu_properties[] = {DEFINE_PROP_BOOL ("debug" ,RISCVCPU , cfg.debug, true),
target/riscv/cpu.h +12 -0
@@ -66,6 +66,18 @@ const char *riscv_get_misa_ext_description(uint32_t bit);#define CPU_CFG_OFFSET (_prop) offsetof(struct RISCVCPUConfig, _prop) +typedef struct riscv_cpu_profile { +const char *name; +uint32_t misa_ext; +bool enabled; +bool user_set; +const int32_t ext_offsets[]; +}RISCVCPUProfile ; + +#define RISCV_PROFILE_EXT_LIST_END -1 + +extern RISCVCPUProfile *riscv_profiles[]; +/* Privileged specification version */ enum {PRIV_VERSION_1_10_0 =0 ,
Signature · 1 line
2.41.0
Re: [PATCH v4 1/9] target/riscv: add rva22u64 profile definition
Quoted 44 lines · Daniel Henrique Barboza
The rva22U64 profile, described in:
https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc#rva22-profiles
Contains a set of CPU extensions aimed for 64-bit userspace applications. Enabling this set to be enabled via a single user flag makes it convenient to enable a predictable set of features for the CPU, giving users more predicability when running/testing their workloads.
QEMU implements all possible extensions of this profile. The exception is Zicbop (Cache-Block Prefetch Operations) that is not available since QEMU RISC-V does not implement a cache model. For this same reason all the so called 'synthetic extensions' described in the profile that are cache related are ignored (Za64rs, Zic64b, Ziccif, Ziccrse, Ziccamoa, Zicclsm).
An abstraction called RISCVCPUProfile is created to store the profile. '
ext_offsets' contains mandatory extensions that QEMU supports. Same thing with the 'misa_ext' mask. Optional extensions must be enabled manually in the command line if desired.The design here is to use the common
target/riscv/cpu.cfile to store the profile declaration and export it to the accelerator files. Each accelerator is then responsible to expose it (or not) to users and how to enable the extensions.Next patches will implement the profile for TCG and KVM.
Signed-off-by Daniel Henrique Barboza <[email protected]>Acked-by Alistair Francis <[email protected]>--- target/riscv/cpu.c | 20 ++++++++++++++++++++ target/riscv/cpu.h | 12 ++++++++++++ 2 files changed, 32 insertions(+)target/riscv/cpu.c +1
-0@@ -1429,6 +1429,26 @@ Property riscv_cpu_options[] = { DEFINE_PROP_END_OF_LIST(), }; +/* Optional extensions left out: RVV, zfh, zkn, zks */
target/riscv/cpu.c Property riscv_cpu_options[] = { · line 1442
Quoted 10 lines
target/riscv/cpu.c +10
-0+static RISCVCPUProfile RVA22U64 = { + .name ="rva22u64" , + .misa_ext =RVI |RVM |RVA |RVF |RVD |RVC , + .ext_offsets = { +CPU_CFG_OFFSET (ext_zicsr),CPU_CFG_OFFSET (ext_zihintpause), +CPU_CFG_OFFSET (ext_zba),CPU_CFG_OFFSET (ext_zbb), +CPU_CFG_OFFSET (ext_zbs),CPU_CFG_OFFSET (ext_zfhmin), +CPU_CFG_OFFSET (ext_zkt),CPU_CFG_OFFSET (ext_zicntr), +CPU_CFG_OFFSET (ext_zihpm),CPU_CFG_OFFSET (ext_zicbom), +CPU_CFG_OFFSET (ext_zicboz),
There are several more mandatory RVA22U64 extensions in the ratified spec[1]. I think many of them can be "implemented" by QEMU by simply adding their names to the ISA string. But, in any case, I think we should at least put a comment here explaining why they're not in ext_offsets[]
[1] https://github.com/riscv/riscv-profiles/releases/download/v1.0/profiles.pdf
Thanks,
drew
Re: [PATCH v4 1/9] target/riscv: add rva22u64 profile definition
In reply to Daniel Henrique Barbozatarget/riscv/cpu.c Property riscv_cpu_options[] = { · line 1433
Quoted 2 lines · Daniel Henrique Barboza
target/riscv/cpu.c +2
-0+/* Optional extensions left out: RVV, zfh, zkn, zks */ +static RISCVCPUProfile RVA22U64 = {
const.
Quoted 7 lines
target/riscv/cpu.c +7
-0+ .name = "rva22u64", + .misa_ext = RVI | RVM | RVA | RVF | RVD | RVC, + .ext_offsets = { +CPU_CFG_OFFSET (ext_zicsr),CPU_CFG_OFFSET (ext_zihintpause), +CPU_CFG_OFFSET (ext_zba),CPU_CFG_OFFSET (ext_zbb), +CPU_CFG_OFFSET (ext_zbs),CPU_CFG_OFFSET (ext_zfhmin), + CPU_CFG_OFFSET(ext_zkt), CPU_CFG_OFFSET(ext_zicntr),
target/riscv/cpu.c Property riscv_cpu_options[] = { · line 1450
Quoted 10 lines
target/riscv/cpu.c +10
-0+CPU_CFG_OFFSET (ext_zihpm),CPU_CFG_OFFSET (ext_zicbom), +CPU_CFG_OFFSET (ext_zicboz), + + RISCV_PROFILE_EXT_LIST_END + } +}; + +RISCVCPUProfile *riscv_profiles[] = { + &RVA22U64 ,NULL , +};
const RISCVCPUProfile * const riscv_profiles[]
r~
Re: [PATCH v4 1/9] target/riscv: add rva22u64 profile definition
Quoted 17 lines · Richard Henderson
target/riscv/cpu.c Property riscv_cpu_options[] = { · line 1433
Quoted 2 lines · Daniel Henrique Barboza
target/riscv/cpu.c +2
-0+/* Optional extensions left out: RVV, zfh, zkn, zks */ +static RISCVCPUProfile RVA22U64 = {const.
Quoted 11 lines
+ .name = "rva22u64",
+ .misa_ext = RVI | RVM | RVA | RVF | RVD | RVC,
+ .ext_offsets = {
+CPU_CFG_OFFSET(ext_zicsr),CPU_CFG_OFFSET(ext_zihintpause), +CPU_CFG_OFFSET(ext_zba),CPU_CFG_OFFSET(ext_zbb), +CPU_CFG_OFFSET(ext_zbs),CPU_CFG_OFFSET(ext_zfhmin), +CPU_CFG_OFFSET(ext_zkt),CPU_CFG_OFFSET(ext_zicntr), +CPU_CFG_OFFSET(ext_zihpm),CPU_CFG_OFFSET(ext_zicbom), +CPU_CFG_OFFSET(ext_zicboz),
+
+RISCV_PROFILE_EXT_LIST_END
Quoted 8 lines
target/riscv/cpu.c Property riscv_cpu_options[] = { · line 1450
Quoted 6 lines
+ }
target/riscv/cpu.c +5
-0+}; + +RISCVCPUProfile *riscv_profiles[] = { + &RVA22U64, NULL, +};const RISCVCPUProfile * const riscv_profiles[]
Ho hum, nevermind. I see they actually have writable elements.
r~
PATCH v4 2/9 target/riscv/kvm: add 'rva22u64' flag as unavailable
In reply to Daniel Henrique BarbozaKVM does not have the means to support enabling the rva22u64 profile. The main reasons are:
- we're missing support for some mandatory rva22u64 extensions in the KVM module;
- we can't make promises about enabling a profile since it all depends on host support in the end.
We'll revisit this decision in the future if needed. For now mark the 'rva22u64' profile as unavailable when running a KVM CPU:
$ qemu-system-riscv64 -machine virt,accel=kvm -cpu rv64,rva22u64=true
qemu-system-riscv64: can't apply global rv64-riscv-cpu.rva22u64=true:
'rva22u64' is not available with KVM--- target/riscv/kvm/kvm-cpu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
target/riscv/kvm/kvm-cpu.c +6 -1
@@ -393,7 +393,7 @@ static void cpu_set_cfg_unavailable(Object *obj, Visitor *v, }if (value) { -error_setg (errp,"extension %s is not available with KVM" , +error_setg (errp,"'%s' is not available with KVM" , propname); } }
@@ -474,6 +474,11 @@ static void kvm_riscv_add_cpu_user_properties(Object *cpu_obj)riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_extensions);riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_vendor_exts);riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_experimental_exts); + +/* We don't have the needed KVM support for profiles */ +for (i =0 ; riscv_profiles[i] !=NULL ; i++) { +riscv_cpu_add_kvm_unavail_prop (cpu_obj, riscv_profiles[i]->name); + } }static int kvm_riscv_get_regs_core (CPUState *cs)
Signature · 1 line
2.41.0
Re: [PATCH v4 2/9] target/riscv/kvm: add 'rva22u64' flag as unavailable
Quoted 52 lines · Daniel Henrique Barboza
KVM does not have the means to support enabling the rva22u64 profile. The main reasons are:
- we're missing support for some mandatory rva22u64 extensions in the KVM module;
- we can't make promises about enabling a profile since it all depends on host support in the end.
We'll revisit this decision in the future if needed. For now mark the 'rva22u64' profile as unavailable when running a KVM CPU:
$ qemu-system-riscv64 -machine virt,accel=kvm -cpu rv64,rva22u64=true qemu-system-riscv64: can't apply global rv64-riscv-cpu.rva22u64=true: 'rva22u64' is not available with KVMSigned-off-by Daniel Henrique Barboza <[email protected]>Reviewed-by Alistair Francis <[email protected]>Reviewed-by LIU Zhiwei <[email protected]>--- target/riscv/kvm/kvm-cpu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)target/riscv/kvm/kvm-cpu.c +6
-1@@ -393,7 +393,7 @@ static void cpu_set_cfg_unavailable(Object *obj, Visitor *v, }if (value) { -error_setg (errp,"extension %s is not available with KVM" , +error_setg (errp,"'%s' is not available with KVM" , propname); } }@@ -474,6 +474,11 @@ static void kvm_riscv_add_cpu_user_properties(Object *cpu_obj)riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_extensions);riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_vendor_exts);riscv_cpu_add_kvm_unavail_prop_array (cpu_obj, riscv_cpu_experimental_exts); + +/* We don't have the needed KVM support for profiles */ +for (i =0 ; riscv_profiles[i] !=NULL ; i++) { +riscv_cpu_add_kvm_unavail_prop (cpu_obj, riscv_profiles[i]->name); + } }static int kvm_riscv_get_regs_core (CPUState *cs)Signature · 1 line
2.41.0
PATCH v4 3/9 target/riscv/tcg: add user flag for profile support
In reply to Daniel Henrique BarbozaThe TCG emulation implements all the extensions described in the RVA22U64 profile, both mandatory and optional. The mandatory extensions will be enabled via the profile flag. We'll leave the optional extensions to be enabled by hand.
Given that this is the first profile we're implementing in TCG we'll need some ground work first:
- all profiles declared in riscv_profiles[] will be exposed to users. TCG is the main accelerator we're considering when adding profile support in QEMU, so for now it's safe to assume that all profiles in riscv_profiles[] will be relevant to TCG;
- we'll not support user profile settings for vendor CPUs. The flags will still be exposed but users won't be able to change them. The idea is that vendor CPUs in the future can enable profiles internally in their cpu_init() functions, showing to the external world that the CPU supports a certain profile. But users won't be able to enable/disable it;
- Setting a profile to 'true' means 'enable all mandatory extensions of this profile, setting it to 'false' means disabling all its mandatory extensions. Regular left-to-right option order will determine the resulting CPU configuration, i.e. the following QEMU command line:
-cpu rv64,zicbom=false,zifencei=false,rva22u64=true
Enables all rva22u64 mandatory extensions, including 'zicbom' and 'zifencei', while this other command line:
-cpu rv64,rva22u64=true,zicbom=false,zifencei=false
Enables all mandatory rva22u64 extensions, and then disable both zicbom and zifencei.
For now we'll handle multi-letter extensions only. MISA extensions need additional steps that we'll take care later.
--- target/riscv/tcg/tcg-cpu.c | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
target/riscv/tcg/tcg-cpu.c +53 -0
@@ -769,6 +769,57 @@ static void riscv_cpu_add_misa_properties(Object *cpu_obj) } } +static void cpu_set_profile (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +RISCVCPUProfile *profile = opaque; +RISCVCPU *cpu =RISCV_CPU (obj); +bool value; +int i, ext_offset; + +if (object_dynamic_cast (obj,TYPE_RISCV_DYNAMIC_CPU ) ==NULL ) { +error_setg (errp,"Profile %s only available for generic CPUs" , + profile->name); +return ; + } + +if (!visit_type_bool (v, name, &value, errp)) { +return ; + } + + profile->user_set = true; + profile->enabled = value; + +for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { + ext_offset = profile->ext_offsets[i]; + +g_hash_table_insert (multi_ext_user_opts, +GUINT_TO_POINTER (ext_offset), + (gpointer )profile->enabled); +isa_ext_update_enabled (cpu, ext_offset, profile->enabled); + } +} + +static void cpu_get_profile (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +RISCVCPUProfile *profile = opaque; +bool value = profile->enabled; + +visit_type_bool (v, name, &value, errp); +} + +static void riscv_cpu_add_profiles (Object *cpu_obj) +{ +for (int i =0 ; riscv_profiles[i] !=NULL ; i++) { +const RISCVCPUProfile *profile = riscv_profiles[i]; + +object_property_add (cpu_obj, profile->name,"bool" , + cpu_get_profile, cpu_set_profile, +NULL , (void *)profile); + } +} +static bool cpu_ext_is_deprecated (const char *ext_name) {return isupper (ext_name[0 ]);
@@ -892,6 +943,8 @@ static void riscv_cpu_add_user_properties(Object *obj)riscv_cpu_add_multiext_prop_array (obj, riscv_cpu_deprecated_exts); +riscv_cpu_add_profiles (obj); +for (Property *prop = riscv_cpu_options; prop && prop->name; prop++) {qdev_property_add_static (DEVICE (obj), prop); }
Signature · 1 line
2.41.0
Re: [PATCH v4 3/9] target/riscv/tcg: add user flag for profile support
Quoted 118 lines · Daniel Henrique Barboza
The TCG emulation implements all the extensions described in the RVA22U64 profile, both mandatory and optional. The mandatory extensions will be enabled via the profile flag. We'll leave the optional extensions to be enabled by hand.
Given that this is the first profile we're implementing in TCG we'll need some ground work first:
- all profiles declared in riscv_profiles[] will be exposed to users. TCG is the main accelerator we're considering when adding profile support in QEMU, so for now it's safe to assume that all profiles in riscv_profiles[] will be relevant to TCG;
- we'll not support user profile settings for vendor CPUs. The flags will still be exposed but users won't be able to change them. The idea is that vendor CPUs in the future can enable profiles internally in their
cpu_init()functions, showing to the external world that the CPU supports a certain profile. But users won't be able to enable/disable it;- Setting a profile to 'true' means 'enable all mandatory extensions of this profile, setting it to 'false' means disabling all its mandatory extensions. Regular left-to-right option order will determine the resulting CPU configuration, i.e. the following QEMU command line:
-cpu rv64,zicbom=false,zifencei=false,rva22u64=true
Enables all rva22u64 mandatory extensions, including 'zicbom' and 'zifencei', while this other command line:
-cpu rv64,rva22u64=true,zicbom=false,zifencei=false
Enables all mandatory rva22u64 extensions, and then disable both zicbom and zifencei.
For now we'll handle multi-letter extensions only. MISA extensions need additional steps that we'll take care later.
Signed-off-by Daniel Henrique Barboza <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)target/riscv/tcg/tcg-cpu.c +53
-0@@ -769,6 +769,57 @@ static void riscv_cpu_add_misa_properties(Object *cpu_obj) } } +static void cpu_set_profile (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +RISCVCPUProfile *profile = opaque; +RISCVCPU *cpu =RISCV_CPU (obj); +bool value; +int i, ext_offset; + +if (object_dynamic_cast (obj,TYPE_RISCV_DYNAMIC_CPU ) ==NULL ) { +error_setg (errp,"Profile %s only available for generic CPUs" , + profile->name); +return ; + } + +if (!visit_type_bool (v, name, &value, errp)) { +return ; + } + + profile->user_set = true; + profile->enabled = value; + +for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { + ext_offset = profile->ext_offsets[i]; + +g_hash_table_insert (multi_ext_user_opts, +GUINT_TO_POINTER (ext_offset), + (gpointer )profile->enabled); +isa_ext_update_enabled (cpu, ext_offset, profile->enabled); + } +} + +static void cpu_get_profile (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +RISCVCPUProfile *profile = opaque; +bool value = profile->enabled; + +visit_type_bool (v, name, &value, errp); +} + +static void riscv_cpu_add_profiles (Object *cpu_obj) +{ +for (int i =0 ; riscv_profiles[i] !=NULL ; i++) { +const RISCVCPUProfile *profile = riscv_profiles[i]; + +object_property_add (cpu_obj, profile->name,"bool" , + cpu_get_profile, cpu_set_profile, +NULL , (void *)profile); + } +} +static bool cpu_ext_is_deprecated (const char *ext_name) {return isupper (ext_name[0 ]);@@ -892,6 +943,8 @@ static void riscv_cpu_add_user_properties(Object *obj)riscv_cpu_add_multiext_prop_array (obj, riscv_cpu_deprecated_exts); +riscv_cpu_add_profiles (obj); +for (Property *prop = riscv_cpu_options; prop && prop->name; prop++) {qdev_property_add_static (DEVICE (obj), prop); }Signature · 1 line
2.41.0
PATCH v4 4/9 target/riscv/tcg: add MISA user options hash
In reply to Daniel Henrique BarbozaWe already track user choice for multi-letter extensions because we needed to honor user choice when enabling/disabling extensions during realize(). We refrained from adding the same mechanism for MISA extensions since we didn't need it.
Profile support requires tne need to check for user choice for MISA extensions, so let's add the corresponding hash now. It works like the existing multi-letter hash (multi_ext_user_opts) but tracking MISA bits options in the cpu_set_misa_ext_cfg() callback.
Note that we can't re-use the same hash from multi-letter extensions because that hash uses cpu->cfg offsets as keys, while for MISA extensions we're using MISA bits as keys.
After adding the user hash in cpu_set_misa_ext_cfg(), setting default values with object_property_set_bool() in add_misa_properties() will end up marking the user choice hash with them. Set the default value manually to avoid it.
--- target/riscv/tcg/tcg-cpu.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
target/riscv/tcg/tcg-cpu.c +14 -1
@@ -34,6 +34,7 @@/* Hash that stores user set extensions */ static GHashTable *multi_ext_user_opts; +static GHashTable *misa_ext_user_opts;static bool cpu_cfg_ext_is_user_set (uint32_t ext_offset) {
@@ -681,6 +682,10 @@ static void cpu_set_misa_ext_cfg(Object *obj, Visitor *v, const char *name,return ; } +g_hash_table_insert (misa_ext_user_opts, +GUINT_TO_POINTER (misa_bit), + (gpointer )value); + prev_val = env->misa_ext & misa_bit;if (value == prev_val) {
@@ -744,6 +749,7 @@ static const RISCVCPUMisaExtConfig misa_ext_cfgs[] = {*/ static void riscv_cpu_add_misa_properties (Object *cpu_obj) { +CPURISCVState *env = &RISCV_CPU (cpu_obj)->env;bool use_def_vals =riscv_cpu_is_generic (cpu_obj);int i;
@@ -764,7 +770,13 @@ static void riscv_cpu_add_misa_properties(Object *cpu_obj) NULL, (void *)misa_cfg);object_property_set_description (cpu_obj, name, desc);if (use_def_vals) { -object_property_set_bool (cpu_obj, name, misa_cfg->enabled,NULL ); +if (misa_cfg->enabled) { + env->misa_ext |= bit; + env->misa_ext_mask |= bit; + }else { + env->misa_ext &= ~bit; + env->misa_ext_mask &= ~bit; + } } } }
@@ -995,6 +1007,7 @@ static void tcg_cpu_instance_init(CPUState *cs)RISCVCPU *cpu =RISCV_CPU (cs);Object *obj =OBJECT (cpu); + misa_ext_user_opts =g_hash_table_new (NULL , g_direct_equal); multi_ext_user_opts =g_hash_table_new (NULL , g_direct_equal);riscv_cpu_add_user_properties (obj);
Signature · 1 line
2.41.0
Re: [PATCH v4 4/9] target/riscv/tcg: add MISA user options hash
Quoted 19 lines · Daniel Henrique Barboza
We already track user choice for multi-letter extensions because we needed to honor user choice when enabling/disabling extensions during
realize(). We refrained from adding the same mechanism for MISA extensions since we didn't need it.Profile support requires tne need to check for user choice for MISA extensions, so let's add the corresponding hash now. It works like the existing multi-letter hash (
multi_ext_user_opts) but tracking MISA bits options in thecpu_set_misa_ext_cfg()callback.Note that we can't re-use the same hash from multi-letter extensions because that hash uses
cpu->cfgoffsets as keys, while for MISA extensions we're using MISA bits as keys.After adding the user hash in
cpu_set_misa_ext_cfg(), setting default values withobject_property_set_bool()inadd_misa_properties()will end up marking the user choice hash with them. Set the default value manually to avoid it.
Quoted 7 lines
Signed-off-by Daniel Henrique Barboza <[email protected]>Reviewed-by Alistair Francis <[email protected]>Reviewed-by LIU Zhiwei <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
PATCH v4 5/9 target/riscv/tcg: add riscv_cpu_write_misa_bit()
In reply to Daniel Henrique BarbozaWe have two instances of the setting/clearing a MISA bit from env->misa_ext and env->misa_ext_mask pattern. And the next patch will end up adding one more.
Create a helper to avoid code repetition.
--- target/riscv/tcg/tcg-cpu.c | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-)
target/riscv/tcg/tcg-cpu.c +23 -21
@@ -42,6 +42,20 @@ static bool cpu_cfg_ext_is_user_set(uint32_t ext_offset) GUINT_TO_POINTER(ext_offset)); } +static void riscv_cpu_write_misa_bit (RISCVCPU *cpu,uint32_t bit, +bool enabled) +{ +CPURISCVState *env = &cpu->env; + +if (enabled) { + env->misa_ext |= bit; + env->misa_ext_mask |= bit; + }else { + env->misa_ext &= ~bit; + env->misa_ext_mask &= ~bit; + } +} +static void riscv_cpu_synchronize_from_tb (CPUState *cs,const TranslationBlock *tb) {
@@ -692,20 +706,14 @@ static void cpu_set_misa_ext_cfg(Object *obj, Visitor *v, const char *name,return ; } -if (value) { -if (!generic_cpu) { - g_autofree char *cpuname = riscv_cpu_get_name(cpu); -error_setg (errp,"'%s' CPU does not allow enabling extensions" , - cpuname); -return ; - } - - env->misa_ext |= misa_bit; - env->misa_ext_mask |= misa_bit; - }else { - env->misa_ext &= ~misa_bit; - env->misa_ext_mask &= ~misa_bit; +if (value && !generic_cpu) { + g_autofree char *cpuname = riscv_cpu_get_name(cpu); +error_setg (errp,"'%s' CPU does not allow enabling extensions" , + cpuname); +return ; } + +riscv_cpu_write_misa_bit (cpu, misa_bit, value); } static void cpu_get_misa_ext_cfg(Object *obj, Visitor *v, const char *name,
@@ -749,7 +757,6 @@ static const RISCVCPUMisaExtConfig misa_ext_cfgs[] = {*/ static void riscv_cpu_add_misa_properties (Object *cpu_obj) { -CPURISCVState *env = &RISCV_CPU (cpu_obj)->env;bool use_def_vals =riscv_cpu_is_generic (cpu_obj);int i;
@@ -770,13 +777,8 @@ static void riscv_cpu_add_misa_properties(Object *cpu_obj) NULL, (void *)misa_cfg);object_property_set_description (cpu_obj, name, desc);if (use_def_vals) { -if (misa_cfg->enabled) { - env->misa_ext |= bit; - env->misa_ext_mask |= bit; - }else { - env->misa_ext &= ~bit; - env->misa_ext_mask &= ~bit; - } +riscv_cpu_write_misa_bit (RISCV_CPU (cpu_obj), bit, + misa_cfg->enabled); } } }
Signature · 1 line
2.41.0
Re: [PATCH v4 5/9] target/riscv/tcg: add riscv_cpu_write_misa_bit()
Quoted 4 lines · Daniel Henrique Barboza
We have two instances of the setting/clearing a MISA bit from
env->misa_extandenv->misa_ext_maskpattern. And the next patch will end up adding one more.
Quoted 9 lines
Create a helper to avoid code repetition.
Signed-off-by Daniel Henrique Barboza <[email protected]>Reviewed-by Alistair Francis <[email protected]>Reviewed-by LIU Zhiwei <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-)
PATCH v4 6/9 target/riscv/tcg: handle profile MISA bits
In reply to Daniel Henrique BarbozaThe profile support is handling multi-letter extensions only. Let's add support for MISA bits as well.
We'll go through every known MISA bit. If the profile doesn't declare the bit as mandatory, ignore it. Otherwise, set or clear the bit in env->misa_ext and env->misa_ext_mask depending on whether the profile was set to 'true' or 'false'.
--- target/riscv/tcg/tcg-cpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
target/riscv/tcg/tcg-cpu.c +13 -0
@@ -804,6 +804,19 @@ static void cpu_set_profile(Object *obj, Visitor *v, const char *name, profile->user_set = true; profile->enabled = value; +for (i =0 ; misa_bits[i] !=0 ; i++) { +uint32_t bit = misa_bits[i]; + +if (!(profile->misa_ext & bit)) { +continue ; + } + +g_hash_table_insert (misa_ext_user_opts, +GUINT_TO_POINTER (bit), + (gpointer )value); +riscv_cpu_write_misa_bit (cpu, bit, profile->enabled); + } +for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { ext_offset = profile->ext_offsets[i];
Signature · 1 line
2.41.0
Re: [PATCH v4 6/9] target/riscv/tcg: handle profile MISA bits
Quoted 42 lines · Daniel Henrique Barboza
The profile support is handling multi-letter extensions only. Let's add support for MISA bits as well.
We'll go through every known MISA bit. If the profile doesn't declare the bit as mandatory, ignore it. Otherwise, set or clear the bit in
env->misa_extandenv->misa_ext_maskdepending on whether the profile was set to 'true' or 'false'.Signed-off-by Daniel Henrique Barboza <[email protected]>Reviewed-by LIU Zhiwei <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)target/riscv/tcg/tcg-cpu.c +13
-0@@ -804,6 +804,19 @@ static void cpu_set_profile(Object *obj, Visitor *v, const char *name, profile->user_set = true; profile->enabled = value; +for (i =0 ; misa_bits[i] !=0 ; i++) { +uint32_t bit = misa_bits[i]; + +if (!(profile->misa_ext & bit)) { +continue ; + } + +g_hash_table_insert (misa_ext_user_opts, +GUINT_TO_POINTER (bit), + (gpointer )value); +riscv_cpu_write_misa_bit (cpu, bit, profile->enabled); + } +for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { ext_offset = profile->ext_offsets[i];Signature · 1 line
2.41.0
PATCH v4 7/9 target/riscv/tcg: add hash table insert helpers
In reply to Daniel Henrique BarbozaLatest patches added several g_hash_table_insert() patterns. Add two helpers, one for each user hash, to make the code cleaner.
--- target/riscv/tcg/tcg-cpu.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
target/riscv/tcg/tcg-cpu.c +16 -12
@@ -42,6 +42,18 @@ static bool cpu_cfg_ext_is_user_set(uint32_t ext_offset) GUINT_TO_POINTER(ext_offset)); } +static void cpu_cfg_ext_add_user_opt (uint32_t ext_offset,bool value) +{ +g_hash_table_insert (multi_ext_user_opts,GUINT_TO_POINTER (ext_offset), + (gpointer )value); +} + +static void cpu_misa_ext_add_user_opt (uint32_t bit,bool value) +{ +g_hash_table_insert (misa_ext_user_opts,GUINT_TO_POINTER (bit), + (gpointer )value); +} +static void riscv_cpu_write_misa_bit (RISCVCPU *cpu,uint32_t bit,bool enabled) {
@@ -696,9 +708,7 @@ static void cpu_set_misa_ext_cfg(Object *obj, Visitor *v, const char *name,return ; } -g_hash_table_insert (misa_ext_user_opts, -GUINT_TO_POINTER (misa_bit), - (gpointer )value); +cpu_misa_ext_add_user_opt (misa_bit, value); prev_val = env->misa_ext & misa_bit;
@@ -811,18 +821,14 @@ static void cpu_set_profile(Object *obj, Visitor *v, const char *name,continue ; } -g_hash_table_insert (misa_ext_user_opts, -GUINT_TO_POINTER (bit), - (gpointer )value); +cpu_misa_ext_add_user_opt (bit, profile->enabled);riscv_cpu_write_misa_bit (cpu, bit, profile->enabled); }for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { ext_offset = profile->ext_offsets[i]; -g_hash_table_insert (multi_ext_user_opts, -GUINT_TO_POINTER (ext_offset), - (gpointer )profile->enabled); +cpu_cfg_ext_add_user_opt (ext_offset, profile->enabled);isa_ext_update_enabled (cpu, ext_offset, profile->enabled); } }
@@ -885,9 +891,7 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name, multi_ext_cfg->name, lower); } -g_hash_table_insert (multi_ext_user_opts, -GUINT_TO_POINTER (multi_ext_cfg->offset), - (gpointer )value); +cpu_cfg_ext_add_user_opt (multi_ext_cfg->offset, value); prev_val =isa_ext_is_enabled (cpu, multi_ext_cfg->offset);
Signature · 1 line
2.41.0
Re: [PATCH v4 7/9] target/riscv/tcg: add hash table insert helpers
Quoted 8 lines · Daniel Henrique Barboza
Latest patches added several
g_hash_table_insert()patterns. Add two helpers, one for each user hash, to make the code cleaner.Signed-off-by Daniel Henrique Barboza <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
PATCH v4 8/9 target/riscv/tcg: honor user choice for G MISA bits
In reply to Daniel Henrique BarbozaRVG behaves like a profile: a single flag enables a set of bits. Right now we're considering user choice when handling RVG and zicsr/zifencei and ignoring user choice on MISA bits.
We'll add user warnings for profiles when the user disables its mandatory extensions in the next patch. We'll do the same thing with RVG now to keep consistency between RVG and profile handling.
First and foremost, create a new RVG only helper to avoid clogging riscv_cpu_validate_set_extensions(). We do not want to annoy users with RVG warnings like we did in the past (see 9b9741c38f), thus we'll only warn if RVG was user set and the user disabled a RVG extension in the command line.
For every RVG MISA bit (IMAFD), zicsr and zifencei, the logic then becomes:
- if enabled, do nothing;
- if disabled and not user set, enable it;
- if disabled and user set, throw a warning that it's a RVG mandatory extension.
This same logic will be used for profiles in the next patch.
Note that this is a behavior change, where we would error out if the user disabled either zicsr or zifencei. As long as users are explicitly disabling things in the command line we'll let them have a go at it, at least in this step. We'll error out later in the validation if needed.
Other notable changes from the previous RVG code:
- use riscv_cpu_write_misa_bit() instead of manually updating both env->misa_ext and env->misa_ext_mask;
- set zicsr and zifencei directly. We're already checking if they were user set and priv version will never fail for these extensions, making cpu_cfg_ext_auto_update() redundant.
--- target/riscv/tcg/tcg-cpu.c | 73 +++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 25 deletions(-)
target/riscv/tcg/tcg-cpu.c +48 -25
@@ -42,6 +42,12 @@ static bool cpu_cfg_ext_is_user_set(uint32_t ext_offset) GUINT_TO_POINTER(ext_offset)); } +static bool cpu_misa_ext_is_user_set (uint32_t misa_bit) +{ +return g_hash_table_contains (misa_ext_user_opts, +GUINT_TO_POINTER (misa_bit)); +} +static void cpu_cfg_ext_add_user_opt (uint32_t ext_offset,bool value) { g_hash_table_insert(multi_ext_user_opts, GUINT_TO_POINTER(ext_offset),
@@ -291,6 +297,46 @@ static void riscv_cpu_disable_priv_spec_isa_exts(RISCVCPU *cpu) } } +static void riscv_cpu_validate_g (RISCVCPU *cpu) +{ +const char *warn_msg ="RVG mandates disabled extension %s" ; +uint32_t g_misa_bits[] = {RVI ,RVM ,RVA ,RVF ,RVD }; +bool send_warn =cpu_misa_ext_is_user_set (RVG ); + +for (int i =0 ; i <ARRAY_SIZE (g_misa_bits); i++) { +uint32_t bit = g_misa_bits[i]; + +if (riscv_has_ext (&cpu->env, bit)) { +continue ; + } + +if (!cpu_misa_ext_is_user_set (bit)) { +riscv_cpu_write_misa_bit (cpu, bit, true); +continue ; + } + +if (send_warn) { +warn_report (warn_msg,riscv_get_misa_ext_name (bit)); + } + } + +if (!cpu->cfg.ext_zicsr) { +if (!cpu_cfg_ext_is_user_set (CPU_CFG_OFFSET (ext_zicsr))) { + cpu->cfg.ext_zicsr = true; + }else if (send_warn) { +warn_report (warn_msg,"zicsr" ); + } + } + +if (!cpu->cfg.ext_zifencei) { +if (!cpu_cfg_ext_is_user_set (CPU_CFG_OFFSET (ext_zifencei))) { + cpu->cfg.ext_zifencei = true; + }else if (send_warn) { +warn_report (warn_msg,"zifencei" ); + } + } +} +/* * Check consistency between chosen extensions while setting * cpu->cfg accordingly.
@@ -300,31 +346,8 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)CPURISCVState *env = &cpu->env;Error *local_err =NULL ; -/* Do some ISA extension error checking */ -if (riscv_has_ext (env,RVG ) && - !(riscv_has_ext (env,RVI ) &&riscv_has_ext (env,RVM ) && -riscv_has_ext (env,RVA ) &&riscv_has_ext (env,RVF ) && -riscv_has_ext (env,RVD ) && - cpu->cfg.ext_zicsr && cpu->cfg.ext_zifencei)) { - -if (cpu_cfg_ext_is_user_set (CPU_CFG_OFFSET (ext_zicsr)) && - !cpu->cfg.ext_zicsr) { -error_setg (errp,"RVG requires Zicsr but user set Zicsr to false" ); -return ; - } - -if (cpu_cfg_ext_is_user_set (CPU_CFG_OFFSET (ext_zifencei)) && - !cpu->cfg.ext_zifencei) { -error_setg (errp,"RVG requires Zifencei but user set " -"Zifencei to false" ); -return ; - } - -cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zicsr), true); -cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zifencei), true); - - env->misa_ext |=RVI |RVM |RVA |RVF |RVD ; - env->misa_ext_mask |=RVI |RVM |RVA |RVF |RVD ; +if (riscv_has_ext (env,RVG )) { +riscv_cpu_validate_g (cpu); }if (riscv_has_ext (env,RVI ) &&riscv_has_ext (env,RVE )) {
Signature · 1 line
2.41.0
Re: [PATCH v4 8/9] target/riscv/tcg: honor user choice for G MISA bits
Quoted 34 lines · Daniel Henrique Barboza
RVG behaves like a profile: a single flag enables a set of bits. Right now we're considering user choice when handling RVG and zicsr/zifencei and ignoring user choice on MISA bits.
We'll add user warnings for profiles when the user disables its mandatory extensions in the next patch. We'll do the same thing with RVG now to keep consistency between RVG and profile handling.
First and foremost, create a new RVG only helper to avoid clogging
riscv_cpu_validate_set_extensions(). We do not want to annoy users with RVG warnings like we did in the past (see9b9741c38f), thus we'll only warn if RVG was user set and the user disabled a RVG extension in the command line.For every RVG MISA bit (IMAFD), zicsr and zifencei, the logic then becomes:
- if enabled, do nothing;
- if disabled and not user set, enable it;
- if disabled and user set, throw a warning that it's a RVG mandatory extension.This same logic will be used for profiles in the next patch.
Note that this is a behavior change, where we would error out if the user disabled either zicsr or zifencei. As long as users are explicitly disabling things in the command line we'll let them have a go at it, at least in this step. We'll error out later in the validation if needed.
Other notable changes from the previous RVG code:
- use
riscv_cpu_write_misa_bit()instead of manually updating bothenv->misa_extandenv->misa_ext_mask;
Quoted 9 lines
- set zicsr and zifencei directly. We're already checking if they were user set and priv version will never fail for these extensions, making
cpu_cfg_ext_auto_update()redundant.Signed-off-by Daniel Henrique Barboza <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 73 +++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 25 deletions(-)
PATCH v4 9/9 target/riscv/tcg: warn if profile exts are disabled
In reply to Daniel Henrique BarbozaEnabling a profile and then disabling some of its mandatory extensions is a valid use. It can be useful for debugging and testing. But the common expected use of enabling a profile is to enable all its mandatory extensions.
Add an user warning when mandatory extensions from an enabled profile are disabled in the command line, like we're already doing with RVG.
After this patch, this will throw warnings:
-cpu rv64,rva22u64=true,zihintpause=false,zicbom=false,zicboz=false
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zihintpause
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zicbom
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zicboz
Note that the following will NOT throw warnings because the profile is being enabled last, hence all its mandatory extensions will be enabled:
-cpu rv64,zihintpause=false,zicbom=false,zicboz=false,rva22u64=true
--- target/riscv/tcg/tcg-cpu.c | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+)
target/riscv/tcg/tcg-cpu.c +57 -0
@@ -147,6 +147,22 @@ static int cpu_cfg_ext_get_min_version(uint32_t ext_offset)g_assert_not_reached (); } +static const char *cpu_cfg_ext_get_name (uint32_t ext_offset) +{ +const RISCVIsaExtData *edata; + +for (edata = isa_edata_arr; edata && edata->name; edata++) { +if (edata->ext_enable_offset != ext_offset) { +continue ; + } + +return edata->name; + } + +g_assert_not_reached (); +} + +static void cpu_cfg_ext_auto_update (RISCVCPU *cpu,uint32_t ext_offset,bool value) {
@@ -619,11 +635,52 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)riscv_cpu_disable_priv_spec_isa_exts (cpu); } +static void riscv_cpu_validate_profile (RISCVCPU *cpu, +RISCVCPUProfile *profile) +{ +const char *warn_msg ="Profile %s mandates disabled extension %s" ; +int i; + +for (i =0 ; misa_bits[i] !=0 ; i++) { +uint32_t bit = misa_bits[i]; + +if (!(profile->misa_ext & bit)) { +continue ; + } + +if (!riscv_has_ext (&cpu->env, bit)) { +warn_report (warn_msg, profile->name,riscv_get_misa_ext_name (bit)); + } + } + +for (i =0 ; profile->ext_offsets[i] !=RISCV_PROFILE_EXT_LIST_END ; i++) { +int ext_offset = profile->ext_offsets[i]; + +if (!isa_ext_is_enabled (cpu, ext_offset)) { +warn_report (warn_msg, profile->name, +cpu_cfg_ext_get_name (ext_offset)); + } + } +} + +static void riscv_cpu_validate_profiles (RISCVCPU *cpu) +{ +for (int i =0 ; riscv_profiles[i] !=NULL ; i++) { +RISCVCPUProfile *profile = riscv_profiles[i]; + +if (profile->user_set && profile->enabled) { +riscv_cpu_validate_profile (cpu, profile); + } + } +} +void riscv_tcg_cpu_finalize_features (RISCVCPU *cpu,Error **errp) {CPURISCVState *env = &cpu->env;Error *local_err =NULL ; +riscv_cpu_validate_profiles (cpu); +riscv_cpu_validate_priv_spec (cpu, &local_err);if (local_err !=NULL ) {error_propagate (errp, local_err);
Signature · 1 line
2.41.0
Re: [PATCH v4 9/9] target/riscv/tcg: warn if profile exts are disabled
Quoted 19 lines · Daniel Henrique Barboza
Enabling a profile and then disabling some of its mandatory extensions is a valid use. It can be useful for debugging and testing. But the common expected use of enabling a profile is to enable all its mandatory extensions.
Add an user warning when mandatory extensions from an enabled profile are disabled in the command line, like we're already doing with RVG.
After this patch, this will throw warnings:
-cpu rv64,rva22u64=true,zihintpause=false,zicbom=false,zicboz=false
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zihintpause
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zicbom
qemu-system-riscv64: warning: Profile rva22u64 mandates disabled extension zicbozNote that the following will NOT throw warnings because the profile is being enabled last, hence all its mandatory extensions will be enabled:
Quoted 7 lines
-cpu rv64,zihintpause=false,zicbom=false,zicboz=false,rva22u64=true
Signed-off-by Daniel Henrique Barboza <[email protected]>--- target/riscv/tcg/tcg-cpu.c | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+)