Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp787200pxb; Tue, 12 Apr 2022 13:27:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwFgBCcbAB40FM5Z3hwNj7gHtxLuC/tM+ailDxZ/+WEr9WpzmWOgAUeqDi3zzouEw6Qkob X-Received: by 2002:a17:902:d511:b0:158:3be2:6637 with SMTP id b17-20020a170902d51100b001583be26637mr17225842plg.107.1649795219917; Tue, 12 Apr 2022 13:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649795219; cv=none; d=google.com; s=arc-20160816; b=hHVzoGgLlGZUCIDevat3tB0M+pO+Jq24KNUxaNPLVYuTptXnRmA/AKHn7s9XQMkrzD 8ZOdoTKWOv0hGU5fKFebIeAi7DtnjLGE6zZIh+2wB7iGMPo8gotKed0uixDfxbIK7X/W xkN3oQmpPyPp6ik5mKv8wv5vVcj4LDUlDEfMrsrwEwSTUDC58nvEDLrj9kDA5311XM6a ZVXIt1p3UETYzyJUl2n4GuLWZZPj08hBGqj514r/I3dHRgHAunGQdVHD0doRr3nxqBxH o3P3EwwIKOKGED6kX43OU2dVclOE4q0LTtXkuOfYXXypd7GtmXrysBfdCYqhkgAU0L63 eFdQ== 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=G/VkFkazWAaujEo1mfbtQljXc/rjIR4tVqkrAMPdyGXbDtYju3XEz/ZSZimvMMdGsN mywbMPXLzbwVnus5v+F2V3Rf+mhj6T6haT/coJPWw/DlStVcFRH6dh1sC4poCm3wBNk2 uTUXNa/I2P8H4CdsHL6xkRWZeiUUySE75/RFz+sNOnGcwhY3R5sjodZKS64LxfUHvRI9 zBieJShqCz0pAKBBCjbUsPeY3fvZUK9+Mn2XSrD2+sywr7oe4jxGWBYx+xn5u9s6+jgK vV4XQSvsNv+E28u9cEf0Vencae4ESwmEoO8Hvhp7ROv/B0f/CypjDFlag5zU917vkY/K Ex5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g+WQj+Di; 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 g2-20020a056a001a0200b004fb04dde469si12828557pfv.23.2022.04.12.13.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:26:59 -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=g+WQj+Di; 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 63430A66D0; Tue, 12 Apr 2022 13:06:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379051AbiDLITg (ORCPT + 99 others); Tue, 12 Apr 2022 04:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354747AbiDLH0l (ORCPT ); Tue, 12 Apr 2022 03:26:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7199246B29; Tue, 12 Apr 2022 00:06:33 -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 B3FBD616CA; Tue, 12 Apr 2022 07:06:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C058DC385A1; Tue, 12 Apr 2022 07:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649747192; bh=x51UV5VOPeaHL0AME3MQUuSQK78drrrzIIMbVhno/eE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g+WQj+DiD9N2ZxtKsdo3dvC9ymbivUXRPj8WOzDs7PbRp9oqV5Ia+P3moKV0FZP4v UYIyScoDHkU4f9qJ+IPz3oVoPeHXK47S+LO/cNb84/LRoJ4URwwM9ipwk9U5+2bv5x u3pHt5hPEVxdb84Z09+7S7SfTKYy8D8rtY7NHxl0= 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.16 275/285] Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb() Date: Tue, 12 Apr 2022 08:32:12 +0200 Message-Id: <20220412062951.593154677@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062943.670770901@linuxfoundation.org> References: <20220412062943.670770901@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); }