Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1459420pxb; Fri, 18 Feb 2022 08:11:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvGbZ7sFbpsr1jfqe8WRv6Q750lhXL5VTLxQJRzIoKQ3nEcr6Ftp7Y4SZAXEvBRtGY7g4D X-Received: by 2002:a17:902:f687:b0:14d:6bde:d192 with SMTP id l7-20020a170902f68700b0014d6bded192mr8037182plg.133.1645200690315; Fri, 18 Feb 2022 08:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645200690; cv=none; d=google.com; s=arc-20160816; b=GH1jOfsULlRHBHAq+bknrTIJMq7i3bDJYmfCRN3vZIhnM0xeBwworjI9Q7n9zMflxO Gl/lSwZyd0yk3pzqMtDflr3ka7WKLfIURRLtvov8cYBdnEjUKVdbI0b9SAZD7nXbQO3y JmcGpTKRxfCfQRGAoExMPnCrJZBdrS+m3qYqJLiCAod6yNG8bCyL4HLv79aRTqsvyhyZ zAX1i74NIedl0/X1XFpSnfMNGH/A5s5SK2Ckx6sMOfAiGDc5CSgpqsVSRUmtDbKXa0c+ 16GatPX15A6knIVgbdBIdG2Oe63AC1kfkzGpgGg1ARqPviU3TWSk9SG7g3vze3dNfoX1 VY+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WDCu5fW0jU66ysKsVUGrCitGNsiEZTA+NVb+oahcLwA=; b=yv9TtPMWi4HaxUoyHbbrrlmDPHmcTxIMV6rLd93ptB3LgzokejFmgkOFS54puaPzhK 2QspckX1i5ZXqMEX6/pPTk7nVo/SwWan2kRIxHPEH1m2zIVlZC4nOUySjBSIKzh0lD8F /tW9eHey45U0QwWsz/gPfoZvsfGAnwqDavQHpn7sPmcWqHSPpB7bgjDqnzf74rW0ZvZ/ diWj67NIcY0Ggsi5bhm/N6wZ30SwbsR2ImidhhfqgYLcBf0JMxlETzTsiJuaS/oybQZh JzqhBusHRykjOcoZESOODn5CwbTWtszGXgSqCMtT5IQmaF37A3Kmh67McrRVvjQluAp/ WTVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=LXDx8icF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u15si11455593pgh.699.2022.02.18.08.11.12; Fri, 18 Feb 2022 08:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=LXDx8icF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237403AbiBRQFD (ORCPT + 99 others); Fri, 18 Feb 2022 11:05:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233019AbiBRQFC (ORCPT ); Fri, 18 Feb 2022 11:05:02 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196B9532FC for ; Fri, 18 Feb 2022 08:04:46 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id c4so2642791pfl.7 for ; Fri, 18 Feb 2022 08:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WDCu5fW0jU66ysKsVUGrCitGNsiEZTA+NVb+oahcLwA=; b=LXDx8icFsWFPMdF/g01b4gSchKGaC2RcBtXtf4DrUEw3t5xt4m7ZPlXIYKBxC4e7Ub Qd7R+6JNu13TapP/gJmnVnpBwUs0I+fiPNRTy9aIzKEEJdLXmqwROwUL6hBCncRKywW9 8AvV3xi6aYtB42zirKim6PrWOMPK7bB1j41JRV68B8HvQa95E+mwiiG1PgEEgOpmgWMF h33tPRQY2315I8lczu0a/qLAjNkMvRguMkRPLTGsdDGNajduA6X8/xfLnAyQbFuPyPkj 9qeh8O2uxYR/MgnK/noxfEWh/4i8ORQzF6PfcJ04CAxA2jBWjFflZvonmOP9BxSG8Dgf MeHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WDCu5fW0jU66ysKsVUGrCitGNsiEZTA+NVb+oahcLwA=; b=RGjiJSHLbvuH5KBiEsNILEasUcwZw9kl2hxY32CC+CtBJPdK9j9gUu6PPD3d1x5RmV nM70yezDS1QIXFdwgHIFSLgDF1G9sOhs06N+cQ47nc8JBLYIC6rHHx0NGMCtpist9M7w 5hZOX3vdi9b/qfgGrSWUJ57R+PKNijIolpvyHaPaJvzO0D+kBt727YkhgGbXm54ZH1Eu 1Mknn16bfMtOZgjhjnU7witpKr4ICWN3BSnZ7WTDEApZj+926YdpOeoHrxdnDFXW6+ln 5K9tVwRCmH92Edis3opf2zw5QBaaMfl/NPtu3dZKWH+y1LSnkLc6YcYIw55aLWpOm90a pWGw== X-Gm-Message-State: AOAM531mSYby8DRdAoWckYFEkVQe89R8bo7CbYzPDBWLsRuItskPv+7c zjKCXjlkaqMezawdSwxUYcnd2w== X-Received: by 2002:a62:65c6:0:b0:4d1:6354:e8e6 with SMTP id z189-20020a6265c6000000b004d16354e8e6mr8190211pfb.64.1645200285419; Fri, 18 Feb 2022 08:04:45 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id mg24sm5112105pjb.4.2022.02.18.08.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 08:04:44 -0800 (PST) Date: Fri, 18 Feb 2022 16:04:41 +0000 From: Sean Christopherson To: Peng Hao Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kvm: correct comment description issue Message-ID: References: <20220218110547.11249-1-flyingpeng@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220218110547.11249-1-flyingpeng@tencent.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 "KVM: VMX:" for the scope. A more specific shortlog would also be helfpul, stating that a comment is being modified doesn't provide any info about what comment. On Fri, Feb 18, 2022, Peng Hao wrote: > loaded_vmcs does not have this field 'vcpu', modify this comment. It would be helpful to state that loaded_vmcs has 'cpu', not 'vcpu'. It's hard to identify what's being changed. Something like this? KVM: VMX: Fix typos above smp_wmb() comment in __loaded_vmcs_clear() Fix a comment documenting the memory barrier related to clearing a loaded_vmcs; loaded_vmcs tracks the host CPU the VMCS is loaded on via the field 'cpu', it doesn't have a 'vcpu' field. With a tweaked shortlog/changelog (doesn't have to be exactly the above), Reviewed-by: Sean Christopherson > Signed-off-by: Peng Hao > --- > arch/x86/kvm/vmx/vmx.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > index 7dce746c175f..0ffcfe54eea5 100644 > --- a/arch/x86/kvm/vmx/vmx.c > +++ b/arch/x86/kvm/vmx/vmx.c > @@ -644,10 +644,10 @@ static void __loaded_vmcs_clear(void *arg) > > /* > * Ensure all writes to loaded_vmcs, including deleting it from its > - * current percpu list, complete before setting loaded_vmcs->vcpu to > - * -1, otherwise a different cpu can see vcpu == -1 first and add > - * loaded_vmcs to its percpu list before it's deleted from this cpu's > - * list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs(). > + * current percpu list, complete before setting loaded_vmcs->cpu to > + * -1, otherwise a different cpu can see loaded_vmcs->cpu == -1 first > + * and add loaded_vmcs to its percpu list before it's deleted from this > + * cpu's list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs(). > */ > smp_wmb(); > > -- > 2.27.0 >