qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yang Zhong <yang.zhong@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: yang.zhong@intel.com, kevin.tian@intel.com, seanjc@google.com,
	jing2.liu@linux.intel.com, qemu-devel@nongnu.org,
	wei.w.wang@intel.com, guang.zeng@intel.com
Subject: Re: [PATCH 6/7] x86: add support for KVM_CAP_XSAVE2 and AMX state migration
Date: Thu, 27 Jan 2022 21:47:56 +0800	[thread overview]
Message-ID: <20220127134756.GC8954@yangzhon-Virtual> (raw)
In-Reply-To: <e4ee8710-acdb-62ad-0273-f7ad44ac0c5c@redhat.com>

On Mon, Jan 24, 2022 at 11:15:25AM +0100, Paolo Bonzini wrote:
> On 1/24/22 08:55, Yang Zhong wrote:
> >
> >+    if (buflen > sizeof(struct kvm_xsave)) {
> >+        e = &x86_ext_save_areas[XSTATE_XTILE_DATA_BIT];
> >+
> >+        if (e->size && e->offset) {
> >+            const XSaveXTILEDATA *tiledata = buf + e->offset;
> >+
> >+            memcpy(&env->xtiledata, tiledata, sizeof(env->xtiledata));
> >+        }
> >+    }
> 
> Slightly nicer:
> 
>     e = &x86_ext_save_areas[XSTATE_XTILE_DATA_BIT];
>     if (e->size && e->offset && buflen >= e->size + e->offset) {
>         ...
>     }
> 
> Same for xsave.

     Thanks Paolo, new version will change this.

     Yang
> 
> Paolo


  reply	other threads:[~2022-01-27 14:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  7:55 [PATCH 0/7] AMX support in Qemu Yang Zhong
2022-01-24  7:55 ` [PATCH 1/7] x86: Fix the 64-byte boundary enumeration for extended state Yang Zhong
2022-01-24  7:55 ` [PATCH 2/7] x86: Add AMX XTILECFG and XTILEDATA components Yang Zhong
2022-01-24  7:55 ` [PATCH 3/7] x86: Grant AMX permission for guest Yang Zhong
2022-01-24 10:16   ` Paolo Bonzini
2022-01-27 13:45     ` Yang Zhong
2022-01-28 11:09       ` Paolo Bonzini
2022-01-24  7:55 ` [PATCH 4/7] x86: Add XFD faulting bit for state components Yang Zhong
2022-01-24  7:55 ` [PATCH 5/7] x86: Add AMX CPUIDs enumeration Yang Zhong
2022-01-24 10:13   ` Paolo Bonzini
2022-01-27 13:46     ` Yang Zhong
2022-01-24  7:55 ` [PATCH 6/7] x86: add support for KVM_CAP_XSAVE2 and AMX state migration Yang Zhong
2022-01-24 10:15   ` Paolo Bonzini
2022-01-27 13:47     ` Yang Zhong [this message]
2022-01-24  7:55 ` [PATCH 7/7] x86: Support XFD and AMX xsave data migration Yang Zhong
2022-01-24 10:17 ` [PATCH 0/7] AMX support in Qemu Paolo Bonzini

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=20220127134756.GC8954@yangzhon-Virtual \
    --to=yang.zhong@intel.com \
    --cc=guang.zeng@intel.com \
    --cc=jing2.liu@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seanjc@google.com \
    --cc=wei.w.wang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).