From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753518AbcADLcL (ORCPT ); Mon, 4 Jan 2016 06:32:11 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:65176 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbcADLcG (ORCPT ); Mon, 4 Jan 2016 06:32:06 -0500 X-IronPort-AV: E=Sophos;i="5.20,520,1444694400"; d="scan'208";a="328829991" Message-ID: <568A5830.9000501@citrix.com> Date: Mon, 4 Jan 2016 11:32:00 +0000 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 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" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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