From: Peter Zijlstra <peterz@infradead.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Brian Gerst <brgerst@gmail.com>,
Matthew Whitehead <tedheadster@gmail.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
x86@kernel.org, xen-devel <Xen-devel@lists.xen.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <JGross@suse.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [Xen-devel] [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self
Date: Tue, 6 Dec 2016 10:25:20 +0100 [thread overview]
Message-ID: <20161206092520.GX3092@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <584688FD02000078001257BB@prv-mh.provo.novell.com>
On Tue, Dec 06, 2016 at 01:46:37AM -0700, Jan Beulich wrote:
> > + asm volatile (
> > + "pushfl\n\t"
> > + "pushl %%cs\n\t"
> > + "pushl $1f\n\t"
> > + "iret\n\t"
> > + "1:"
> > + : "+r" (__sp) : : "cc", "memory");
>
> I don't thing EFLAGS (i.e. "cc") gets modified anywhere here. And
> the memory clobber would perhaps better be pulled out into an
> explicit barrier() invocation (making it more obvious what it's needed
> for)?
EVerything that implies a memory barrier (and I think serializing
instructions do that) also imply a compiler barrier.
Not doing the memory clobber gets you inconsistency wrt everything else.
next prev parent reply other threads:[~2016-12-06 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 21:32 [PATCH v3 0/4] CPUID-less CPU/sync_core fixes and improvements Andy Lutomirski
2016-12-05 21:32 ` [PATCH v3 1/4] x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit kernels Andy Lutomirski
2016-12-05 21:32 ` [PATCH v3 2/4] Revert "x86/boot: Fail the boot if !M486 and CPUID is missing" Andy Lutomirski
2016-12-05 21:32 ` [PATCH v3 3/4] x86/microcode/intel: Replace sync_core() with native_cpuid() Andy Lutomirski
2016-12-05 21:32 ` [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self Andy Lutomirski
2016-12-06 7:52 ` Borislav Petkov
2016-12-06 17:49 ` Andy Lutomirski
2016-12-06 8:46 ` [Xen-devel] " Jan Beulich
2016-12-06 9:25 ` Peter Zijlstra [this message]
[not found] ` <584697BA0200007800125855@prv-mh.provo.novell.com>
2016-12-06 17:46 ` Andy Lutomirski
2016-12-06 19:32 ` H. Peter Anvin
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=20161206092520.GX3092@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=JBeulich@suse.com \
--cc=JGross@suse.com \
--cc=Xen-devel@lists.xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=hmh@hmh.eng.br \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=tedheadster@gmail.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;
as well as URLs for NNTP newsgroup(s).