From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A9BAD1A0174 for ; Mon, 4 Jan 2016 22:43:00 +1100 (AEDT) Message-ID: <568A5830.9000501@citrix.com> Date: Mon, 4 Jan 2016 11:32:00 +0000 From: David Vrabel MIME-Version: 1.0 To: "Michael S. Tsirkin" , CC: , , , Peter Zijlstra , , "H. Peter Anvin" , , Boris Ostrovsky , , , Arnd Bergmann , , , Ingo Molnar , , , Stefano Stabellini , , Thomas Gleixner , , , Andrew Cooper , David Vrabel , , David Miller Subject: Re: [Xen-devel] [PATCH v2 33/34] xenbus: use virt_xxx barriers References: <1451572003-2440-1-git-send-email-mst@redhat.com> <1451572003-2440-34-git-send-email-mst@redhat.com> In-Reply-To: <1451572003-2440-34-git-send-email-mst@redhat.com> Content-Type: text/plain; charset="windows-1252" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 31/12/15 19:10, Michael S. Tsirkin wrote: > drivers/xen/xenbus/xenbus_comms.c uses > full memory barriers to communicate with the other side. > > For guests compiled with CONFIG_SMP, smp_wmb and smp_mb > would be sufficient, so mb() and wmb() here are only needed if > a non-SMP guest runs on an SMP host. > > Switch to virt_xxx barriers which serve this exact purpose. Acked-by: David Vrabel If you're feeling particularly keen there's a rmb() consume_one_event() in drivers/xen/events/events_fifo.c that can be converted to virt_rmb() as well. David