[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-8.2 1/2] arm/kvm: convert to kvm_set_one_reg
From: |
Cornelia Huck |
Subject: |
Re: [PATCH for-8.2 1/2] arm/kvm: convert to kvm_set_one_reg |
Date: |
Mon, 24 Jul 2023 10:47:07 +0200 |
User-agent: |
Notmuch/0.37 (https://notmuchmail.org) |
On Mon, Jul 24 2023, Gavin Shan <gshan@redhat.com> 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@redhat.com>
>> ---
>> 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@redhat.com>
> @@ -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...