On Mon, Jul 24 2023, Gavin Shan <gshan@xxxxxxxxxx> wrote: > Hi Connie, > > On 7/18/23 21:14, Cornelia Huck wrote: >> We can neaten the code by switching to the kvm_set_one_reg function. >> >> Signed-off-by: Cornelia Huck <cohuck@xxxxxxxxxx> >> --- >> target/arm/kvm.c | 13 +++------ >> target/arm/kvm64.c | 66 +++++++++++++--------------------------------- >> 2 files changed, 21 insertions(+), 58 deletions(-) >> > > Some wrong replacements to be fixed in kvm_arch_put_fpsimd() as below. > Apart from that, LGTM: > > Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx> > @@ -725,19 +721,17 @@ static void kvm_inject_arm_sea(CPUState *c) >> static int kvm_arch_put_fpsimd(CPUState *cs) >> { >> CPUARMState *env = &ARM_CPU(cs)->env; >> - struct kvm_one_reg reg; >> int i, ret; >> >> for (i = 0; i < 32; i++) { >> uint64_t *q = aa64_vfp_qreg(env, i); >> #if HOST_BIG_ENDIAN >> uint64_t fp_val[2] = { q[1], q[0] }; >> - reg.addr = (uintptr_t)fp_val; >> + ret = kvm_set_one_reg(cs, AARCH64_SIMD_CORE_REG(fp_regs.vregs[i]), >> + &fp_val); > ^^^^^^^ > s/&fp_val/fp_val >> #else >> - reg.addr = (uintptr_t)q; >> + ret = kvm_set_one_reg(cs, AARCH64_SIMD_CORE_REG(fp_regs.vregs[i]), &q); > ^^^ > s/&q/q > >> #endif Whoops, I thought I had double-checked these...