From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0aPx-00016D-Na for qemu-devel@nongnu.org; Wed, 11 May 2016 16:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0aPs-00031F-Hc for qemu-devel@nongnu.org; Wed, 11 May 2016 16:07:36 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:32967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0aPs-00030o-95 for qemu-devel@nongnu.org; Wed, 11 May 2016 16:07:32 -0400 Received: by mail-wm0-x243.google.com with SMTP id r12so11653149wme.0 for ; Wed, 11 May 2016 13:07:32 -0700 (PDT) Sender: Paolo Bonzini References: <1462988574-30590-1-git-send-email-rjones@redhat.com> <1462988574-30590-3-git-send-email-rjones@redhat.com> From: Paolo Bonzini Message-ID: <573390FF.8010409@redhat.com> Date: Wed, 11 May 2016 22:07:27 +0200 MIME-Version: 1.0 In-Reply-To: <1462988574-30590-3-git-send-email-rjones@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 2/2] Add optionrom compatible with fw_cfg DMA version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" , qemu-devel@nongnu.org Cc: stefanha@gmail.com, marc.mari.barcelo@gmail.com, ehabkost@redhat.com, mst@redhat.com, kraxel@redhat.com, rth@twiddle.net, lersek@redhat.com On 11/05/2016 19:42, Richard W.M. Jones wrote: > + > +#ifdef __clang__ > +#define ADDR32 > +#else > +#define ADDR32 "addr32 " > +#endif > + > +static inline uint16_t readw_es(uint16_t offset) > +{ > + uint16_t val; > + asm(ADDR32"movw %%es:(%1), %0" : "=r"(val) : "r"((uint32_t)offset)); > + barrier(); > + return val; > +} Please check that the output is the same byte-by-byte for this asm. I guess this is okay if we have a guarantee from clang that the asm block stays at the beginning. Perhaps check for the 0x55 0xaa signature in signrom.py? Thanks, Paolo