From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAA9EC48BE5 for ; Tue, 15 Jun 2021 09:51:33 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 1CCCA60FF1 for ; Tue, 15 Jun 2021 09:51:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CCCA60FF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AED644A551; Tue, 15 Jun 2021 05:51:32 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rE8k+s00GHMQ; Tue, 15 Jun 2021 05:51:30 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 488CD4B0A3; Tue, 15 Jun 2021 05:51:30 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9669A4A551 for ; Tue, 15 Jun 2021 05:51:29 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3uMAsIciJShQ for ; Tue, 15 Jun 2021 05:51:26 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 0D0594A418 for ; Tue, 15 Jun 2021 05:51:26 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16B3D6143E; Tue, 15 Jun 2021 09:51:25 +0000 (UTC) Received: from [185.219.108.64] (helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lt5j9-007eKe-0g; Tue, 15 Jun 2021 10:51:23 +0100 Date: Tue, 15 Jun 2021 10:51:22 +0100 Message-ID: <87mtrrihgl.wl-maz@kernel.org> From: Marc Zyngier To: Yanan Wang Subject: Re: [PATCH] KVM: arm64: Fix inconsistency from function comment of __unmap_stage2_range In-Reply-To: <20210615090436.13916-1-wangyanan55@huawei.com> References: <20210615090436.13916-1-wangyanan55@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangyanan55@huawei.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, yuzenghui@huawei.com, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Tue, 15 Jun 2021 10:04:36 +0100, Yanan Wang wrote: > > Commit 'b5331379bc626' > (KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set) > has converted the original function name 'unmap_stage2_range' to > '__unmap_stage2_range', but leaving the corresponding function comment > unadjusted. So fix it for code readability. > > Incidentally, we also tewak some comment identation by using tabs instead > of spaces to be consistent with the other functions. > > Signed-off-by: Yanan Wang Same as the previous patch. The first hunk is OK, as it fixes an actual defect (wrong documentation), and adjusting the alignment is OK as your changing the context. However, the last 3 are just noise. Please drop them. Thanks, M. > --- > arch/arm64/kvm/mmu.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 5742ba765ff9..80040af147a2 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -151,11 +151,11 @@ static void *kvm_host_va(phys_addr_t phys) > * does. > */ > /** > - * unmap_stage2_range -- Clear stage2 page table entries to unmap a range > - * @mmu: The KVM stage-2 MMU pointer > - * @start: The intermediate physical base address of the range to unmap > - * @size: The size of the area to unmap > - * @may_block: Whether or not we are permitted to block > + * __unmap_stage2_range -- Clear stage2 page table entries to unmap a range > + * @mmu: The KVM stage-2 MMU pointer > + * @start: The intermediate physical base address of the range to unmap > + * @size: The size of the area to unmap > + * @may_block: Whether or not we are permitted to block > * > * Clear a range of stage-2 mappings, lowering the various ref-counts. Must > * be called while holding mmu_lock (unless for freeing the stage2 pgd before > @@ -190,7 +190,7 @@ static void stage2_flush_memslot(struct kvm *kvm, > > /** > * stage2_flush_vm - Invalidate cache for pages mapped in stage 2 > - * @kvm: The struct kvm pointer > + * @kvm: The struct kvm pointer > * > * Go through the stage 2 page tables and invalidate any cache lines > * backing memory already mapped to the VM. > @@ -527,7 +527,7 @@ static void stage2_unmap_memslot(struct kvm *kvm, > > /** > * stage2_unmap_vm - Unmap Stage-2 RAM mappings > - * @kvm: The struct kvm pointer > + * @kvm: The struct kvm pointer > * > * Go through the memregions and unmap any regular RAM > * backing memory already mapped to the VM. > @@ -578,7 +578,7 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu) > * @guest_ipa: The IPA at which to insert the mapping > * @pa: The physical address of the device > * @size: The size of the mapping > - * @writable: Whether or not to create a writable mapping > + * @writable: Whether or not to create a writable mapping > */ > int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, > phys_addr_t pa, unsigned long size, bool writable) > @@ -616,7 +616,7 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, > > /** > * stage2_wp_range() - write protect stage2 memory region range > - * @mmu: The KVM stage-2 MMU pointer > + * @mmu: The KVM stage-2 MMU pointer > * @addr: Start address of range > * @end: End address of range > */ > -- > 2.23.0 > > -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A49C48BE5 for ; Tue, 15 Jun 2021 14:13:53 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 993316140B for ; Tue, 15 Jun 2021 14:13:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 993316140B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C6OI/JhJFnY+MM8TJA3Z/RWStt1qdfhG+Exx4kkGj0w=; b=aps9Phtu3CkVvM HkzV/IE6sFGiwLpWe66qN/eQW+ElCAC58/o0dkqThsj6unVjSd2GVrhqZtYHDLKZJPboQaJRv4w9c gKmXaBR9ybf/avKllFNjQlnBVklzH/deoid1HGO942ooDOgfLOhnEdGWID9XiZFNQ1ZOTCAwW28Cc 36v4IP6w4K15sTwLevV4/N3SBAIgzAcGW2EBLjG5EY+pvsohRy1JZjUANrLL4fedNyLHT3R7eddPc oEp2GkjLdXeHMS+1V6KnfeQpS87JMx1ybv7uy9E70xcGw+RoouF5zcxjDpB7mJYnDmaG0Sjk9vOP7 5aOS+4MG9S0f65dD4fjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9i0-000RrE-Bl; Tue, 15 Jun 2021 14:06:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9HD-000E8e-J2 for linux-arm-kernel@bombadil.infradead.org; Tue, 15 Jun 2021 13:38:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uSaSFOP5hW6TEpmvcpCfoc+tEKJxlCnCinqNhJC2OKA=; b=d3m9FJmb7Nv6PgaLm+OLgaKv1G DKTH87+XwzTs3vFVNcaHhIjo3bE5m+tdSRFgfPC1+H8IKbfL554JUcnXtkII64UWaO3/A+mFDolL/ H9EOBBHubSaVE6PW8wBJm1ltmxV611ZYUqmOwbtzCMVpilV3EbA37SAsljRCOXdruMjfOz5fNwsTD PLy4Q2HkNwiK/ZoqFpyNCQ+GL05M5EvZYG0NXWGHYOlojO/5yEDk8pIK/wbqNW/TGROiO0tGay2OP HGeZtl2Q5SAs3Y3fgL+ph7ezui0skZHYFng4tv+4KtS84HRKKhzGA0mts1xWCFFNS2Q4NDXYi18rg hf2GIh3g==; Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt5j5-007gQ8-Ul for linux-arm-kernel@lists.infradead.org; Tue, 15 Jun 2021 09:51:28 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16B3D6143E; Tue, 15 Jun 2021 09:51:25 +0000 (UTC) Received: from [185.219.108.64] (helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lt5j9-007eKe-0g; Tue, 15 Jun 2021 10:51:23 +0100 Date: Tue, 15 Jun 2021 10:51:22 +0100 Message-ID: <87mtrrihgl.wl-maz@kernel.org> From: Marc Zyngier To: Yanan Wang Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , "Will\ Deacon" , , , , , Subject: Re: [PATCH] KVM: arm64: Fix inconsistency from function comment of __unmap_stage2_range In-Reply-To: <20210615090436.13916-1-wangyanan55@huawei.com> References: <20210615090436.13916-1-wangyanan55@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangyanan55@huawei.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, yuzenghui@huawei.com, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_105127_091062_1CEDCDB3 X-CRM114-Status: GOOD ( 29.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 15 Jun 2021 10:04:36 +0100, Yanan Wang wrote: > > Commit 'b5331379bc626' > (KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set) > has converted the original function name 'unmap_stage2_range' to > '__unmap_stage2_range', but leaving the corresponding function comment > unadjusted. So fix it for code readability. > > Incidentally, we also tewak some comment identation by using tabs instead > of spaces to be consistent with the other functions. > > Signed-off-by: Yanan Wang Same as the previous patch. The first hunk is OK, as it fixes an actual defect (wrong documentation), and adjusting the alignment is OK as your changing the context. However, the last 3 are just noise. Please drop them. Thanks, M. > --- > arch/arm64/kvm/mmu.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 5742ba765ff9..80040af147a2 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -151,11 +151,11 @@ static void *kvm_host_va(phys_addr_t phys) > * does. > */ > /** > - * unmap_stage2_range -- Clear stage2 page table entries to unmap a range > - * @mmu: The KVM stage-2 MMU pointer > - * @start: The intermediate physical base address of the range to unmap > - * @size: The size of the area to unmap > - * @may_block: Whether or not we are permitted to block > + * __unmap_stage2_range -- Clear stage2 page table entries to unmap a range > + * @mmu: The KVM stage-2 MMU pointer > + * @start: The intermediate physical base address of the range to unmap > + * @size: The size of the area to unmap > + * @may_block: Whether or not we are permitted to block > * > * Clear a range of stage-2 mappings, lowering the various ref-counts. Must > * be called while holding mmu_lock (unless for freeing the stage2 pgd before > @@ -190,7 +190,7 @@ static void stage2_flush_memslot(struct kvm *kvm, > > /** > * stage2_flush_vm - Invalidate cache for pages mapped in stage 2 > - * @kvm: The struct kvm pointer > + * @kvm: The struct kvm pointer > * > * Go through the stage 2 page tables and invalidate any cache lines > * backing memory already mapped to the VM. > @@ -527,7 +527,7 @@ static void stage2_unmap_memslot(struct kvm *kvm, > > /** > * stage2_unmap_vm - Unmap Stage-2 RAM mappings > - * @kvm: The struct kvm pointer > + * @kvm: The struct kvm pointer > * > * Go through the memregions and unmap any regular RAM > * backing memory already mapped to the VM. > @@ -578,7 +578,7 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu) > * @guest_ipa: The IPA at which to insert the mapping > * @pa: The physical address of the device > * @size: The size of the mapping > - * @writable: Whether or not to create a writable mapping > + * @writable: Whether or not to create a writable mapping > */ > int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, > phys_addr_t pa, unsigned long size, bool writable) > @@ -616,7 +616,7 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, > > /** > * stage2_wp_range() - write protect stage2 memory region range > - * @mmu: The KVM stage-2 MMU pointer > + * @mmu: The KVM stage-2 MMU pointer > * @addr: Start address of range > * @end: End address of range > */ > -- > 2.23.0 > > -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel