From: "Jan Beulich" Subject: Re: [Patch 1/3 v2] x86/irq: local_irq_restore() should not blindly popf Date: Tue, 29 Oct 2013 14:53:19 +0000 Message-ID: <526FD9EF02000078000FDABD@nat28.tlf.novell.com> References: <526572B6.3030803@citrix.com> <526654FC02000078000FC9FC@nat28.tlf.novell.com> <52663DD3.8040309@citrix.com> <5266616F02000078000FCA45@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5266616F02000078000FCA45@nat28.tlf.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 22.10.13 at 11:28, "Jan Beulich" wrote: >>>> On 22.10.13 at 10:56, Andrew Cooper wrote: >> On 22/10/13 09:35, Jan Beulich wrote: >>> Further I have a hard time seeing how the "orw" used above >>> can even have built successfully: If a register gets picked >>> (which ought to be the common case), opcode suffix and >>> register name ought to collide. And "orw" is a bad choice here >>> anyway, in that this is a 2-byte write following an 8-byte one. >> >> GCC correctly picks a 2-byte register given the orw. Looking at the >> disassembly, it usually chooses %r12w > > Try compiling this > > void test(unsigned long x) { > asm volatile("orw %0, (%0)" :: "ri" (x)); > } > > with a 32-bit gcc (or with -m32). In fact I'm surprised the assembler > doesn't generate a warning (or even error) in the 64-bit case - this > very much smells like a bug (and I looked at that code the other day > and got the impression that the 64-bit one would be _less_ forgiving > here). See http://www.sourceware.org/ml/binutils/2013-10/msg00358.html. Jan