All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Gavin Shan <gshan@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org
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	[thread overview]
Message-ID: <87bkg1g0hg.fsf@redhat.com> (raw)
In-Reply-To: <a5b93992-5576-04cf-3af0-2c237831f5c6@redhat.com>

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...


  reply	other threads:[~2023-07-24  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 11:14 [PATCH for-8.2 0/2] arm/kvm: use kvm_{get,set}_one_reg Cornelia Huck
2023-07-18 11:14 ` [PATCH for-8.2 1/2] arm/kvm: convert to kvm_set_one_reg Cornelia Huck
2023-07-24  2:26   ` Gavin Shan
2023-07-24  8:47     ` Cornelia Huck [this message]
2023-07-18 11:14 ` [PATCH for-8.2 2/2] arm/kvm: convert to kvm_get_one_reg Cornelia Huck
2023-07-24  2:35   ` Gavin Shan
2023-07-24  8:48     ` Cornelia Huck
2023-07-25  0:01       ` Gavin Shan
2023-07-27  9:55         ` Cornelia Huck
2023-10-10 10:09           ` Cornelia Huck
2023-07-31  7:15   ` Gavin Shan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkg1g0hg.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=gshan@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.