On 16/9/25 16:22, Richard Henderson wrote:
Signed-off-by: Richard Henderson <[email protected]>
---
target/arm/hvf/hvf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index b043eac8c6..99d8672b9b 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -925,6 +925,9 @@ int hvf_arch_init_vcpu(CPUState *cpu)
arm_cpu->cpreg_array_len = sregs_cnt;
arm_cpu->cpreg_vmstate_array_len = sregs_cnt;
+ /* cpreg tuples must be in strictly ascending order */
I don't get the "why". If this is related to a previous change,
maybe better to squash there?
Anyhow,
Tested-by: Philippe Mathieu-Daudé <[email protected]>
+ qsort(arm_cpu->cpreg_indexes, sregs_cnt, sizeof(uint64_t), compare_u64);
+
assert(write_cpustate_to_list(arm_cpu, false));
/* Set CP_NO_RAW system registers on init */