From: Dave Hansen <dave.hansen@intel.com>
To: Pengfei Xu <pengfei.xu@intel.com>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kselftest <linux-kselftest@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Heng Su <heng.su@intel.com>, Luck Tony <tony.luck@intel.com>,
Mehta Sohil <sohil.mehta@intel.com>,
Chen Yu C <yu.c.chen@intel.com>,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [RFC PATCH v5 1/2] selftests/x86: add xsave test during and after signal handling
Date: Thu, 9 Dec 2021 10:22:42 -0800 [thread overview]
Message-ID: <3f59a9d9-27e6-e6b2-98ff-c18924979cc4@intel.com> (raw)
In-Reply-To: <3f02d300118abfb581d85519b733a2db2bb44b10.1638513720.git.pengfei.xu@intel.com>
On 12/2/21 11:32 PM, Pengfei Xu wrote:
> +void populate_xstate_regs(void)
> +{
> + set_fpu_reg();
> + set_avx2_ymm();
> + set_avx512_opmask();
> + set_pkru_xstate();
> +}
Pengfei, as I mentioned several times, XMM and YMM registers are not
preserved across function calls. This only works by chance. The
compiler is free to clobber them at basically any time between when they
are populated and the XSAVE happens.
next prev parent reply other threads:[~2021-12-09 18:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 7:32 [RFC PATCH v5 0/2] Introduce XSAVE feature self-test Pengfei Xu
2021-12-03 7:32 ` [RFC PATCH v5 1/2] selftests/x86: add xsave test during and after signal handling Pengfei Xu
2021-12-09 18:22 ` Dave Hansen [this message]
2021-12-10 4:47 ` Pengfei Xu
2021-12-10 16:48 ` Dave Hansen
2021-12-11 8:02 ` Pengfei Xu
2021-12-13 4:19 ` Pengfei Xu
2021-12-03 7:32 ` [RFC PATCH v5 2/2] selftests/x86: add xsave test after process switch Pengfei Xu
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=3f59a9d9-27e6-e6b2-98ff-c18924979cc4@intel.com \
--to=dave.hansen@intel.com \
--cc=heng.su@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=pengfei.xu@intel.com \
--cc=skhan@linuxfoundation.org \
--cc=sohil.mehta@intel.com \
--cc=tony.luck@intel.com \
--cc=yu.c.chen@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