Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1042774imw; Thu, 14 Jul 2022 16:10:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0xEuN31j0Uw6oYHSRcblb/1VDrHYyPzPMV0QSnVTNQ4MV/fCpNmiVNEG4NZIXOlkkiWKq X-Received: by 2002:a17:902:ba91:b0:16c:6b8e:cd06 with SMTP id k17-20020a170902ba9100b0016c6b8ecd06mr10324503pls.33.1657840206037; Thu, 14 Jul 2022 16:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657840206; cv=none; d=google.com; s=arc-20160816; b=ZV7mu97dpEz19V1dF871v+F7DPy3lzGNKzEXioeh6uszxAX83YW2JY8qD21HWadSRI A6SOI0WkEHCtse8lsYt3nB19cuNgXiSelEYcvzRnnAJzX2mDS7stR+hd6G3MhCHpXfmG GaxexPzCUG+k4Ac0cfYDs5+hfHdAftZoj4fDw+g01rwzUtDT8D7oKiq9kkHH49gyiLXa WRu0fl8S5V5SzK/3FtioofNL6EPTE4Vx6tQRq2zfzlrg800GqvS7ty3OgjuhkOE2EDhV SbeZveHRy+9+QNPXr92neGVm+iJ6Mi+s8BTRFUH9ssjhKt9+INQCDCMPAhmiJH1ONdHd Mscw== 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=Gqge0mk3/xGYFTh18E2jnpKtnW4CjHppw+t99itaHzo=; b=zkur/zxCZs/4Z9KfDeC8083PK/NgQDK8AD5ovNFr50K5SxI1sJw9pb97ftrX+0B8E4 QFSDm6bjaBAgScb6+KC1KQodJ1tzm3AK5FsEEKd8l5Na/MQmt3djclHvG+Sf/HXUnCBf mocodG5DlbVPNhVskvqiI15ngyYpmvaB6oUACMpFV9UdEhNwGqwwA9Z00HHcvq/DmhuY 5NiflQQEVulCtdkIXi980pmmobw1HRHABnQOsU51Qnih04DL8jxDBC4s/kaqlvrpnECt aLffaGsApRiSbZt8DnI8LlV2p5A1LbhXGAow9DA6+LjAiek+vfLkKulCsW1VK3PKKqGE RDkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=IMntXprR; 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 h10-20020a65638a000000b00412b6dd0cd0si3051558pgv.603.2022.07.14.16.09.51; Thu, 14 Jul 2022 16:10:06 -0700 (PDT) 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=IMntXprR; 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 S240713AbiGNWKu (ORCPT + 99 others); Thu, 14 Jul 2022 18:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232678AbiGNWKs (ORCPT ); Thu, 14 Jul 2022 18:10:48 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6B0F6B260 for ; Thu, 14 Jul 2022 15:10:47 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 89-20020a17090a09e200b001ef7638e536so9872673pjo.3 for ; Thu, 14 Jul 2022 15:10:47 -0700 (PDT) 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=Gqge0mk3/xGYFTh18E2jnpKtnW4CjHppw+t99itaHzo=; b=IMntXprRgReVScC//+y80pFgCc5MMVibbsZtQEZJg6HqR11EtdVB+kbCApjzGcSgUI KpYSs7FXzbPfmEhNZ5PeUE3imhuNiSuRZptjybJjAaeiA5sKXlPON6l7jkzFo8zE6kGJ l7Ko1DscobPRMkGhwCC++PlH3qeF7iZdJC3aQpEeiMsmp3x4YoGORLSdF7Jk32IA82Ke l7PfQkyKwplVjKTIm//Po39RsVp0i5ParOzep+s1WTx5cjZLDDNwqnRkO7DdPU3J+2TO VRuFj9N6aX544MBVjDRWKy6pHYMS12d/PzosZ/fE/B5Mfdzuzn9RJde4GO9wS7eLHm0v dd3A== 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=Gqge0mk3/xGYFTh18E2jnpKtnW4CjHppw+t99itaHzo=; b=Tv2FfvV0dnCSpA2h6miYkqsyQ633xcu2kRz9rwiKeo9QcZMIJgmIqWI9/Sbrfn1zi4 3sClcpoqzT1PNXOguDDVTYUrgxboRXIUoFN1o77X+hQLMXfzZmejbCzOz7PkjhUkjSFJ lSGl67QMMlkDTufm9o2TSZVtq5GmTlxCfTTIBBch5J+euN/WtU/Wzxzlo3cJLXb1FqEy SJrDBFBOev9/pKeXZGAfSUIdgmVPMFQ3b2ApCUmVNdf624Cgn0tjAjdF7f9XFau3LqD/ 6XrwYSlk5I4MAIngH84EdCsmov0weqgX93yhIFnq48XPHIfJrBlJ1uaj8rgPjXo2nl8a Dpyg== X-Gm-Message-State: AJIora90qeBg1DnRJa3FWjuq1PSyD0mWbb2+c2HCHSxrANxLVFQWYDuY VlSvQwN8Q653vI38xTtpgTgJvQ== X-Received: by 2002:a17:902:c10a:b0:16c:5b27:9d30 with SMTP id 10-20020a170902c10a00b0016c5b279d30mr10007801pli.32.1657836647059; Thu, 14 Jul 2022 15:10:47 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id m5-20020a170902db0500b0016bebb0cb96sm1971563plx.266.2022.07.14.15.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 15:10:46 -0700 (PDT) Date: Thu, 14 Jul 2022 22:10:43 +0000 From: Sean Christopherson To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov , Maxim Levitsky , Lai Jiangshan Subject: Re: [PATCH 02/12] KVM: X86/MMU: Rename kvm_unlink_unsync_page() to kvm_mmu_page_clear_unsync() Message-ID: References: <20220605064342.309219-1-jiangshanlai@gmail.com> <20220605064342.309219-3-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220605064342.309219-3-jiangshanlai@gmail.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=unavailable 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 On Sun, Jun 05, 2022, Lai Jiangshan wrote: > From: Lai Jiangshan > > "Unlink" is ambiguous, the function does not disconnect any link. > > Use "clear" instead which is an antonym of "mark" in the name of the > function mark_unsync() or kvm_mmu_mark_parents_unsync(). Hmm, but "clearing a page" is a common operation. Might not be proper English, but my vote is to use "unmark". KVM already uses link+unlink, account+unaccount, etc..., so mark+unmark should be intuitive for readers. > Signed-off-by: Lai Jiangshan > --- > arch/x86/kvm/mmu/mmu.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > index f61416818116..c20981dfc4fd 100644 > --- a/arch/x86/kvm/mmu/mmu.c > +++ b/arch/x86/kvm/mmu/mmu.c > @@ -1825,7 +1825,7 @@ static int mmu_unsync_walk(struct kvm_mmu_page *sp, > return __mmu_unsync_walk(sp, pvec); > } > > -static void kvm_unlink_unsync_page(struct kvm *kvm, struct kvm_mmu_page *sp) > +static void kvm_mmu_page_clear_unsync(struct kvm *kvm, struct kvm_mmu_page *sp) > { > WARN_ON(!sp->unsync); > trace_kvm_mmu_sync_page(sp); > @@ -1987,7 +1987,7 @@ static int mmu_sync_children(struct kvm_vcpu *vcpu, > } > > for_each_sp(pages, sp, parents, i) { > - kvm_unlink_unsync_page(vcpu->kvm, sp); > + kvm_mmu_page_clear_unsync(vcpu->kvm, sp); > flush |= kvm_sync_page(vcpu, sp, &invalid_list) > 0; > mmu_pages_clear_parents(&parents); > } > @@ -2326,7 +2326,7 @@ static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, > unaccount_shadowed(kvm, sp); > > if (sp->unsync) > - kvm_unlink_unsync_page(kvm, sp); > + kvm_mmu_page_clear_unsync(kvm, sp); > if (!sp->root_count) { > /* Count self */ > (*nr_zapped)++; > -- > 2.19.1.6.gb485710b >