Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3094830pxf; Mon, 15 Mar 2021 00:50:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFUd/12uBh8bc/A+KMDewe/h+NcdalI+n9T5chEyyxk4GnOXeBTKrrHn4JBWgdAki7CvMy X-Received: by 2002:a17:907:6005:: with SMTP id fs5mr22190368ejc.184.1615794653464; Mon, 15 Mar 2021 00:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615794653; cv=none; d=google.com; s=arc-20160816; b=Q9AsJhoMTA5aR7nvQphSYadbvnx2CxsS/booLkuGRCJSOPcVVdtUVDLEBYjCT84+e4 FkRiW7Jg8N8pNLPiWArlWskUA4kGfFxomntSSidxAU1bhJHkiXQt/e6vYSNJ2VABB/cG 2w05hUtnLzQBGfpb2PQikcpTDiwEGJ9GuxAoyauT30mgGoPqmdoB7y2W3tgZTfqSnUoy C2E1G1UbtUDvzN3wUH40dRgPfMrZDM1ymh381bK59hcs0h8zKT5flyCxmBUCCgBnWMMv JwF13lQSKTfo2S9lBpACk8qQL58L9cT1Fa7mI+ZaorNwh/OJjD3PbfjqR9Ro0hjnl6dC c2LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=L4QM6fU0WPGzgL7yIb19qtkPQBgf4yLwEb89nNPLt+E=; b=duhcgx8e5Nm2tvjed+YEsd7icHR1rSWw7xQDPumFC0B0WpUBXbTjL+x/q/SaqQDrs1 j9k04/IxnNIw7ld/mDDUufIDVFs0UaN+7xAnE87EOzSE+jFYolKLFaojKOZA6ImH3DP3 7a593Fw6nKY91PsGJAD6s6QM7+jhb7WaeDE9bu0GRRZI/5Y9JpBcQmxsE5ZTDPHfDb1y AODLnUbOMrT4K3JQPPgmgu9ChiM0ifYVjs5W7QffLV42qlwU1qXZkuexMKMjm5Icocq4 6/jYyEl9TUVgR6qMW+lz3wxoefngquL8OePf5lDlnebkwkx6V+u4gdwTKp1i3BtJ9lsu UeLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o21si10093702ejc.724.2021.03.15.00.50.30; Mon, 15 Mar 2021 00:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbhCOHt2 (ORCPT + 99 others); Mon, 15 Mar 2021 03:49:28 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:13927 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbhCOHtH (ORCPT ); Mon, 15 Mar 2021 03:49:07 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DzT6F5WH2zlVnM; Mon, 15 Mar 2021 15:47:33 +0800 (CST) Received: from [10.174.184.42] (10.174.184.42) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Mon, 15 Mar 2021 15:49:02 +0800 Subject: Re: [PATCH 1/4] KVM: arm64: Hide kvm_mmu_wp_memory_region() To: Gavin Shan , References: <20210315041844.64915-1-gshan@redhat.com> <20210315041844.64915-2-gshan@redhat.com> CC: , , , From: Keqian Zhu Message-ID: Date: Mon, 15 Mar 2021 15:49:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20210315041844.64915-2-gshan@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.184.42] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gavin, This function is only used by mmu.c in the first commit c64735554c0a, so please feel free to add: Reviewed-by: Keqian Zhu Thanks, Keqian On 2021/3/15 12:18, Gavin Shan wrote: > We needn't expose the function as it's only used by mmu.c. > > Signed-off-by: Gavin Shan > --- > arch/arm64/include/asm/kvm_host.h | 1 - > arch/arm64/kvm/mmu.c | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h > index 3d10e6527f7d..688f2df1957b 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -632,7 +632,6 @@ void kvm_arm_resume_guest(struct kvm *kvm); > }) > > void force_vm_exit(const cpumask_t *mask); > -void kvm_mmu_wp_memory_region(struct kvm *kvm, int slot); > > int handle_exit(struct kvm_vcpu *vcpu, int exception_index); > void handle_exit_early(struct kvm_vcpu *vcpu, int exception_index); > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 77cb2d28f2a4..84e70f953de6 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -555,7 +555,7 @@ static void stage2_wp_range(struct kvm_s2_mmu *mmu, phys_addr_t addr, phys_addr_ > * Acquires kvm_mmu_lock. Called with kvm->slots_lock mutex acquired, > * serializing operations for VM memory regions. > */ > -void kvm_mmu_wp_memory_region(struct kvm *kvm, int slot) > +static void kvm_mmu_wp_memory_region(struct kvm *kvm, int slot) > { > struct kvm_memslots *slots = kvm_memslots(kvm); > struct kvm_memory_slot *memslot = id_to_memslot(slots, slot); >