From: Paolo Bonzini <pbonzini@redhat.com>
To: Yang Zhong <yang.zhong@intel.com>, qemu-devel@nongnu.org
Cc: seanjc@google.com, kevin.tian@intel.com,
jing2.liu@linux.intel.com, 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: Mon, 24 Jan 2022 11:15:25 +0100 [thread overview]
Message-ID: <e4ee8710-acdb-62ad-0273-f7ad44ac0c5c@redhat.com> (raw)
In-Reply-To: <20220124075523.108875-7-yang.zhong@intel.com>
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.
Paolo
next prev parent reply other threads:[~2022-01-24 10:19 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 [this message]
2022-01-27 13:47 ` Yang Zhong
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=e4ee8710-acdb-62ad-0273-f7ad44ac0c5c@redhat.com \
--to=pbonzini@redhat.com \
--cc=guang.zeng@intel.com \
--cc=jing2.liu@linux.intel.com \
--cc=kevin.tian@intel.com \
--cc=qemu-devel@nongnu.org \
--cc=seanjc@google.com \
--cc=wei.w.wang@intel.com \
--cc=yang.zhong@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).