Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp42765lfv; Tue, 12 Apr 2022 16:30:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIwCu83d9WDyWrivRdgBZo31SrzM+RIU8vhUZ2GjM0NOsa4tf+ZjtmgK1R0ariJArK4BxN X-Received: by 2002:a63:e051:0:b0:382:6aff:229a with SMTP id n17-20020a63e051000000b003826aff229amr32485609pgj.493.1649806256551; Tue, 12 Apr 2022 16:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649806256; cv=none; d=google.com; s=arc-20160816; b=ZBlEBr54rh6MM1z54C2vzpYU2VetYFy4gKepzZR2pUmWFNAP556iq3bRlVg1mkDZhw Ol2bcCIi+/Ls13rOM6t4n2iefnoLW1OTn/33yzg4qC0y2vnI1+3gaiqv783Fz01+Ivsr t8dbIy1BxJknEIIj/GP8U0TcwT/pTWSJxrSzPTpKRFhpr9j4ibRxdWC5CjV65vNSOGGh IUje5vaTj5qmseY3vbBWnxs6XnjFwtx4iZfPWVfPsrM73j7cQZs5g7+unoShgY7YCunR e4Q5hV5zNwoJ2WlVctUteLFBfILlt49kW0Z/rWXJWmXwxlVdj6hIxDaqsEz3KtqoheQt C1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fe0ch3bjhtPrVPYak6C9ptRFd9Gi+qMxNYNJ9f8W8kw=; b=VuILSCv2MykfoabZpEdsdKMyo2YoOiAkJdj36/81JMsM5U0vztoA1plrCzC3TxY3Zv rDuftTKcIpW7PynlwsnloAvFY6FKgvB1ySL+/PgEG5dlQ9AHq+fGVeGp5pHFV9E1tfRl rTZTPaKnibIH5uDlMhGDtnXWZf0sh0MqbPholerfAIE92f6N12zR+CIQCB/4q06ZyTGG TAcZrcHHJWLLz+QsvCFkRv7Mc0Im/C64iEdqWVP6Adj+ryk2R8WSUZB3Ca30NF4FpUED pNOY4jPQxO7mmYNr4MDCLKCToFGEM16znlV7ENAbg+iXj9yvtCgeJ3kq5VhQm3SfUyk/ KJng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QgoSZt2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13-20020a170903228d00b00158897b40e5si3210543plh.48.2022.04.12.16.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QgoSZt2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C1FF10CF17; Tue, 12 Apr 2022 14:22:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386142AbiDLIyY (ORCPT + 99 others); Tue, 12 Apr 2022 04:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359412AbiDLHnB (ORCPT ); Tue, 12 Apr 2022 03:43:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2AA82C11A; Tue, 12 Apr 2022 00:22:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4DD1C6153F; Tue, 12 Apr 2022 07:22:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5552CC385A1; Tue, 12 Apr 2022 07:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649748174; bh=x51UV5VOPeaHL0AME3MQUuSQK78drrrzIIMbVhno/eE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QgoSZt2yx/nUEWRB/dAtvPP9HC/spPT2hxd17slgmhfK55Q8GbKDAffxJt8mTOj1W fZgimVp46z1P+fNdkd0EoW5qVx8w35AIHpaj7B+sCYHpA/yTvgbcUQ+52Ox8Mb3VhB LRJ6WZvFtnp5+TcPTmehDJn60CKizNVJQfnXfsnM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Andrea Parri (Microsoft)" , Wei Liu Subject: [PATCH 5.17 326/343] Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb() Date: Tue, 12 Apr 2022 08:32:24 +0200 Message-Id: <20220412063000.730479830@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062951.095765152@linuxfoundation.org> References: <20220412062951.095765152@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrea Parri (Microsoft) commit eaa03d34535872d29004cb5cf77dc9dec1ba9a25 upstream. Following the recommendation in Documentation/memory-barriers.txt for virtual machine guests. Fixes: 8b6a877c060ed ("Drivers: hv: vmbus: Replace the per-CPU channel lists with a global array of channels") Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20220328154457.100872-1-parri.andrea@gmail.com Signed-off-by: Wei Liu Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel_mgmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -380,7 +380,7 @@ void vmbus_channel_map_relid(struct vmbu * execute: * * (a) In the "normal (i.e., not resuming from hibernation)" path, - * the full barrier in smp_store_mb() guarantees that the store + * the full barrier in virt_store_mb() guarantees that the store * is propagated to all CPUs before the add_channel_work work * is queued. In turn, add_channel_work is queued before the * channel's ring buffer is allocated/initialized and the @@ -392,14 +392,14 @@ void vmbus_channel_map_relid(struct vmbu * recv_int_page before retrieving the channel pointer from the * array of channels. * - * (b) In the "resuming from hibernation" path, the smp_store_mb() + * (b) In the "resuming from hibernation" path, the virt_store_mb() * guarantees that the store is propagated to all CPUs before * the VMBus connection is marked as ready for the resume event * (cf. check_ready_for_resume_event()). The interrupt handler * of the VMBus driver and vmbus_chan_sched() can not run before * vmbus_bus_resume() has completed execution (cf. resume_noirq). */ - smp_store_mb( + virt_store_mb( vmbus_connection.channels[channel->offermsg.child_relid], channel); }