target/arm/hvf: Sort the cpreg_indexes array
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
98c2af435e
commit
bffe756ea1
1 changed files with 3 additions and 0 deletions
|
|
@ -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 */
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue