From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754235AbcAMQxg (ORCPT ); Wed, 13 Jan 2016 11:53:36 -0500 Received: from mail.skyhub.de ([78.46.96.112]:53719 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752807AbcAMQxf (ORCPT ); Wed, 13 Jan 2016 11:53:35 -0500 Date: Wed, 13 Jan 2016 17:53:20 +0100 From: Borislav Petkov To: "Michael S. Tsirkin" Cc: Linus Torvalds , "H. Peter Anvin" , Andy Lutomirski , Andy Lutomirski , Davidlohr Bueso , Davidlohr Bueso , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , virtualization , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar Subject: Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Message-ID: <20160113165319.GJ12897@pd.tnic> References: <56956276.1090705@kernel.org> <20160113001824-mutt-send-email-mst@redhat.com> <56958467.6010808@zytor.com> <20160113161704.GA13146@pd.tnic> <20160113182505-mutt-send-email-mst@redhat.com> <20160113163331.GG12897@pd.tnic> <20160113184003-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160113184003-mutt-send-email-mst@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2016 at 06:42:48PM +0200, Michael S. Tsirkin wrote: > Oh, I think this means we need a "cc" clobber. Btw, does your microbenchmark do it too? Because, the "cc" clobber should cause additional handling of flags, depending on the context. It won't matter if the context doesn't need rFLAGS handling in the benchmark but if we start using LOCK; ADD in the kernel, I can imagine some places where mb() is used and rFLAGS are live, causing gcc to either reorder code or stash them away... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() Date: Wed, 13 Jan 2016 17:53:20 +0100 Message-ID: <20160113165319.GJ12897@pd.tnic> References: <56956276.1090705@kernel.org> <20160113001824-mutt-send-email-mst@redhat.com> <56958467.6010808@zytor.com> <20160113161704.GA13146@pd.tnic> <20160113182505-mutt-send-email-mst@redhat.com> <20160113163331.GG12897@pd.tnic> <20160113184003-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160113184003-mutt-send-email-mst@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "Michael S. Tsirkin" Cc: Davidlohr Bueso , Davidlohr Bueso , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , Andy Lutomirski , Andy Lutomirski , "H. Peter Anvin" , "Paul E. McKenney" , Thomas Gleixner , virtualization , Linus Torvalds , Ingo Molnar List-Id: virtualization@lists.linuxfoundation.org On Wed, Jan 13, 2016 at 06:42:48PM +0200, Michael S. Tsirkin wrote: > Oh, I think this means we need a "cc" clobber. Btw, does your microbenchmark do it too? Because, the "cc" clobber should cause additional handling of flags, depending on the context. It won't matter if the context doesn't need rFLAGS handling in the benchmark but if we start using LOCK; ADD in the kernel, I can imagine some places where mb() is used and rFLAGS are live, causing gcc to either reorder code or stash them away... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.