Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp56642pxb; Tue, 12 Apr 2022 16:41:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNFJG3z14P6SOhGt5Wr33wVAd6r6wQuo/Pb9AgDoSmn3uZDmOZI9gZZBoFgd518hkPmnAN X-Received: by 2002:a17:90b:1004:b0:1cd:510d:c1c1 with SMTP id gm4-20020a17090b100400b001cd510dc1c1mr324390pjb.56.1649806907117; Tue, 12 Apr 2022 16:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649806907; cv=none; d=google.com; s=arc-20160816; b=dHSi6WdBpVcuBlO+u8n3FJjiZ2kZzD+Y6Atr8X9OFxWsHp03/5tuRd61Fn6UO7I8BV nLlZR2aHzjzfESR9CAfDjZPBeyrEu6m9WTz6FYdzU5uyVK2Q6Cag+AeWLt1GoVidVW5s lrtXfKUpoEc2Uy4GTI0O963EzqBfouPF9fXFUoTu6Ix5XeNC2qubBB2ASbPgLr7H0fZy zTBUIiQC0S2WK0iDuXsBSqdN8k5/d1/VF0CQVdoDxhDmcfeEGvJD9viGGWqHRxGh6Srj z2liehJjbhW0vyh5YO6fG6+lwI/WNQ38QfFr2UOLY9/G36+94s1jbhFOqpTj7p9BFBOB Bsug== 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=jUl0ZdBPfixTYEiX/Sr9brIE5qSuy74KuMcLWCIw4dI=; b=VH+KPBV+RYwmRiXJ2lyjL9Ie/1to3yYQuxglHJprXKVRMpRYf95EwtOP83V0iU9OQC zFzRA8MnPhenM6b7R5NCIERfccOByn3qB2wRA6d9c23Y3BeOCIb2m7UJH4aDSflA2KJk 23QxR8MNK9oGWAYxJ8L4UNZtxqvEJ06YM/n8kSUQpg/eP2DIaCHMjprNKc8tROcvBYRg DkjCpGxv6LRN5ig1leE+8y6EhxAjTZ/vI2DwhT71aXPp+qVoHzffVIlyylBcbcCcTvLv XYTuhiEtCTCRQ4gh3Z/34J1mzZqpGhRlCWLxzCvYIu+wTlaTiMNUhfqxp+qYDw7W0EHG ERMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="c+o/iUxB"; 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 1-20020a630c41000000b003829d4cd1c8si4044033pgm.696.2022.04.12.16.41.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:41:47 -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="c+o/iUxB"; 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 C1A471C6EC0; Tue, 12 Apr 2022 14:33:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244736AbiDLG7B (ORCPT + 99 others); Tue, 12 Apr 2022 02:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351446AbiDLGxh (ORCPT ); Tue, 12 Apr 2022 02:53:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84EA53DA48; Mon, 11 Apr 2022 23:40:44 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2F3EBB81B29; Tue, 12 Apr 2022 06:40:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80B43C385A6; Tue, 12 Apr 2022 06:40:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649745641; bh=oDImVcA9cfPt7E/z+vtoCCvZwDU3/Nit5GS/d6jmwkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c+o/iUxBf/zyiA1NSu7553Z+g9BEM58UBnEyI1I5EVGNwD7e3LKsaTmal7Yx7fbYZ Jb9gDHgkOVcA3wPmlTYagxTr0eWIX2GCvtw1dwH0JqDrWA+hsurWSnHLVjitVSK6yk GbtX9ciUVV7rzmbqCi5ULJ8BnxJ6YqLIfikUS/tk= 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.10 168/171] Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb() Date: Tue, 12 Apr 2022 08:30:59 +0200 Message-Id: <20220412062932.761365844@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062927.870347203@linuxfoundation.org> References: <20220412062927.870347203@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 @@ -350,7 +350,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 @@ -362,14 +362,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); }