mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: hpa@zytor.com
To: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>,
	Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
	x86@kernel.org, "Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Dave Hansen <dave.hansen@intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Cathy Zhang <cathy.zhang@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Kyung Min Park <kyung.min.park@intel.com>,
	"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	linux-kernel@vger.kernel.org,
	Ricardo Neri <ricardo.neri@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-edac@vger.kernel.org
Subject: Re: [PATCH v2] x86/cpu: Use SERIALIZE in sync_core() when available
Date: Tue, 04 Aug 2020 22:10:22 -0700	[thread overview]
Message-ID: <2511352F-5D28-4337-A4A2-1B54073F1F72@zytor.com> (raw)
In-Reply-To: <20200805050808.GC9127@nazgul.tnic>

On August 4, 2020 10:08:08 PM PDT, Borislav Petkov <bp@alien8.de> wrote:
>On Tue, Aug 04, 2020 at 09:58:25PM -0700, hpa@zytor.com wrote:
>> Because why use an alternative to jump over one instruction?
>>
>> I personally would prefer to have the IRET put out of line
>
>Can't yet - SERIALIZE CPUs are a minority at the moment.
>
>> and have the call/jmp replaced by SERIALIZE inline.
>
>Well, we could do:
>
>	alternative_io("... IRET bunch", __ASM_SERIALIZE,
>X86_FEATURE_SERIALIZE, ...);
>
>and avoid all kinds of jumping. Alternatives get padded so there
>would be a couple of NOPs following when SERIALIZE gets patched in
>but it shouldn't be a problem. I guess one needs to look at what gcc
>generates...

I didn't say behind a trap. IRET is a control transfer instruction, and slow, so putting it out of line really isn't unreasonable. Can even do a call to a common handler.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

  reply	other threads:[~2020-08-05  5:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  2:10 Ricardo Neri
2020-08-05  4:48 ` Borislav Petkov
2020-08-05  4:58   ` hpa
2020-08-05  5:08     ` Borislav Petkov
2020-08-05  5:10       ` hpa [this message]
2020-08-05 17:07       ` Ricardo Neri
2020-08-05 18:28         ` Andy Lutomirski
2020-08-05 19:11           ` Ricardo Neri
2020-08-05 20:30             ` Andy Lutomirski
2020-08-05 22:19               ` Luck, Tony
2020-08-05 15:54   ` Ricardo Neri

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=2511352F-5D28-4337-A4A2-1B54073F1F72@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=cathy.zhang@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=kyung.min.park@intel.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=ricardo.neri@intel.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --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

all inboxes | Powered by JetHome®