From: Pengfei Xu <pengfei.xu@intel.com>
To: "Chang S. Bae" <chang.seok.bae@intel.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
linux-kselftest <linux-kselftest@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Heng Su <heng.su@intel.com>, Hansen Dave <dave.hansen@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>, Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v8 1/1] selftests/x86/xstate: Add xstate test cases for XSAVE feature
Date: Thu, 24 Mar 2022 19:37:13 +0800 [thread overview]
Message-ID: <YjxX6dnTTQD+Rq9C@xpf.sh.intel.com> (raw)
In-Reply-To: <eb0c4940-569b-656f-424c-4248929cc74c@intel.com>
On 2022-03-24 at 03:06:50 -0700, Chang S. Bae wrote:
> On 3/16/2022 5:40 AM, Pengfei Xu wrote:
> >
> > +static inline void check_cpuid_xsave_availability(void)
> > +{
> > + uint32_t eax, ebx, ecx, edx;
> > +
> > + /*
> > + * CPUID.1:ECX.XSAVE[bit 26] enumerates general
> > + * support for the XSAVE feature set, including
> > + * XGETBV.
> > + */
> > + __cpuid_count(1, 0, eax, ebx, ecx, edx);
> > + if (!(ecx & CPUID_LEAF1_ECX_XSAVE_MASK))
> > + fatal_error("cpuid: no CPU xsave support");
> > + if (!(ecx & CPUID_LEAF1_ECX_OSXSAVE_MASK))
> > + fatal_error("cpuid: no OS xsave support");
>
> We need to skip the test when XSAVE is not available. See the point here:
> https://lore.kernel.org/lkml/8735j8aa9g.ffs@tglx/
>
Yes, it's better, will skip and exit if CPU doesn't support XSAVE or OS
XSAVE.
Thanks for suggestion!
BR.
-- Pengfei
> Thanks,
> Chang
>
>
next prev parent reply other threads:[~2022-03-24 11:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 12:40 [PATCH v8 0/1] Introduce XSAVE feature self-test Pengfei Xu
2022-03-16 12:40 ` [PATCH v8 1/1] selftests/x86/xstate: Add xstate test cases for XSAVE feature Pengfei Xu
2022-03-24 10:06 ` Chang S. Bae
2022-03-24 11:37 ` Pengfei Xu [this message]
2022-04-08 16:58 ` Dave Hansen
2022-04-11 10:14 ` Pengfei Xu
2022-04-11 14:42 ` Dave Hansen
2022-04-12 14:01 ` 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=YjxX6dnTTQD+Rq9C@xpf.sh.intel.com \
--to=pengfei.xu@intel.com \
--cc=bp@suse.de \
--cc=chang.seok.bae@intel.com \
--cc=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=skhan@linuxfoundation.org \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--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 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.