The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Borislav Petkov <bp@suse.de>,
	"Chang S. Bae" <chang.seok.bae@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org, luto@kernel.org, mingo@kernel.org,
	tglx@linutronix.de, len.brown@intel.com,
	ravi.v.shankar@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/fpu: Use consistent test for X86_FEATURE_XSAVES
Date: Wed, 3 Feb 2021 07:40:07 -0800	[thread overview]
Message-ID: <87e436d0-d2ca-8c28-442b-1b45111b6081@intel.com> (raw)
In-Reply-To: <20210203112340.GA11823@zn.tnic>

On 2/3/21 3:23 AM, Borislav Petkov wrote:
>> -/*
>> - * 'XSAVES' implies two different things:
>> - * 1. saving of supervisor/system state
>> - * 2. using the compacted format
>> - *
>> - * Use this function when dealing with the compacted format so
>> - * that it is obvious which aspect of 'XSAVES' is being handled
>> - * by the calling code.
> @dhansen, are you still hung up on that "obvious aspect" or can we kill
> this?

I still want the compacted-format handling code to be marked.  You can
do that with new comments:

	/* Note: XSAVES always uses compacted format: */
	if (boot_cpu_has(X86_FEATURE_XSAVES)) {

or, leave it as-is:

	if (using_compacted_format()) {
	...

Otherwise, we assume that every human being that looks at this code
*KNOWS* that XSAVES==compacted.  That's not a great assumption.

  reply	other threads:[~2021-02-03 15:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  2:40 [PATCH] x86/fpu: Use consistent test for X86_FEATURE_XSAVES Chang S. Bae
2021-02-03 11:23 ` Borislav Petkov
2021-02-03 15:40   ` Dave Hansen [this message]
2021-02-03 15:54     ` Borislav Petkov

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=87e436d0-d2ca-8c28-442b-1b45111b6081@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@suse.de \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox