Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753120AbcLFTfg (ORCPT ); Tue, 6 Dec 2016 14:35:36 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39572 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751633AbcLFTfe (ORCPT ); Tue, 6 Dec 2016 14:35:34 -0500 Subject: Re: [Xen-devel] [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self To: Jan Beulich , Andy Lutomirski References: <584688FD02000078001257BB@prv-mh.provo.novell.com> Cc: Borislav Petkov , Andrew Cooper , Brian Gerst , Matthew Whitehead , Henrique de Moraes Holschuh , Peter Zijlstra , x86@kernel.org, xen-devel , One Thousand Gnomes , Boris Ostrovsky , Juergen Gross , "linux-kernel@vger.kernel.org" From: "H. Peter Anvin" Message-ID: <32e056b6-378f-a461-dfcd-442b582763a9@zytor.com> Date: Tue, 6 Dec 2016 11:32:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <584688FD02000078001257BB@prv-mh.provo.novell.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 504 Lines: 21 On 12/06/16 00:46, Jan Beulich wrote: >> + >> +#ifdef CONFIG_X86_32 >> + 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)? > Not to mention "cc" doesn't do anything on x86 at all. -hpa