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,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 97687C433E1 for ; Wed, 19 Aug 2020 04:47:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 64E1220738 for ; Wed, 19 Aug 2020 04:47:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lVazUQaY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BepHXZHl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64E1220738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DlVbdaynDUayhiuvk7ssHDxcoslHqvKQAsVcHVeSVHM=; b=lVazUQaYTZh8CV HqUJhPi7S6iSJkFgAgC9EMKP3KxUhKnBrER7tnnm/RZ53ruwypcJWRCI9EGjNZkzbyxZt1NdYtns8 AVz6CNOYNpwMf/g6nAa8RdY296hvQwvlgBlSUOJhk36dlcA9du+AtTzjtdnO4mlKONTzareDKcx6w cjao+DqH3vzlSAx8OPMmgxGUI7U1JmuVqsrfw38YRmIa7zwIcvHPBiQxqJudMZCMj+FSjh2otIbHp R8b+nxpMtJqzT+rrRKK9ma/E6Hbj6kQfzFSPeZa8utM8OzxFbRuodG/jFOkkSpXt1J+0nC66tpyO/ lVgNHjgPEPY3VOcI1eCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8FzF-0002rg-8k; Wed, 19 Aug 2020 04:46:09 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8FzB-0002r8-2C for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2020 04:46:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597812364; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bAI+D7Juob+Rkh/t1AsQW5cDL0ypfVqXCo1MpBwkMH0=; b=BepHXZHlZKBixlngqkaCvJTtnituWCHtMpnzouVM5BhI0AxO98GWLiYeydw9vmv7qIijMD zY93DcZ1dHa0ELGt+ExEFftIGf5SPDLadpaqncj8F+HBiYsf1zTqaAVLsc/f2nclvd1+cN QeMmRbjQd0ZP+QziDK/kqIkxJsVqO9s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-356-1uuMC1XROSex1D2bP05B-w-1; Wed, 19 Aug 2020 00:45:58 -0400 X-MC-Unique: 1uuMC1XROSex1D2bP05B-w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 979B0186A561; Wed, 19 Aug 2020 04:45:57 +0000 (UTC) Received: from [10.64.54.198] (vpn2-54-198.bne.redhat.com [10.64.54.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D2795756C3; Wed, 19 Aug 2020 04:45:55 +0000 (UTC) Subject: Re: [PATCH v2 02/22] KVM: arm64: Remove kvm_mmu_free_memory_caches() To: Will Deacon , kvmarm@lists.cs.columbia.edu References: <20200818132818.16065-1-will@kernel.org> <20200818132818.16065-3-will@kernel.org> From: Gavin Shan Message-ID: <32fa5558-862b-554e-1325-24bab7c9bfec@redhat.com> Date: Wed, 19 Aug 2020 14:45:52 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200818132818.16065-3-will@kernel.org> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=gshan@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200819_004605_226398_80ADEBC7 X-CRM114-Status: GOOD ( 18.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Gavin Shan Cc: Marc Zyngier , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, Catalin Marinas Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/18/20 11:27 PM, Will Deacon wrote: > kvm_mmu_free_memory_caches() is only called by kvm_arch_vcpu_destroy(), > so inline the implementation and get rid of the extra function. > > Cc: Marc Zyngier > Cc: Quentin Perret > Signed-off-by: Will Deacon > --- > arch/arm64/include/asm/kvm_mmu.h | 2 -- > arch/arm64/kvm/arm.c | 2 +- > arch/arm64/kvm/mmu.c | 5 ----- > 3 files changed, 1 insertion(+), 8 deletions(-) > Reviewed-by: Gavin Shan > diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h > index 189839c3706a..0f078b1920ff 100644 > --- a/arch/arm64/include/asm/kvm_mmu.h > +++ b/arch/arm64/include/asm/kvm_mmu.h > @@ -141,8 +141,6 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, > > int kvm_handle_guest_abort(struct kvm_vcpu *vcpu); > > -void kvm_mmu_free_memory_caches(struct kvm_vcpu *vcpu); > - > phys_addr_t kvm_mmu_get_httbr(void); > phys_addr_t kvm_get_idmap_vector(void); > int kvm_mmu_init(void); > diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c > index 691d21e4c717..c958c8f03144 100644 > --- a/arch/arm64/kvm/arm.c > +++ b/arch/arm64/kvm/arm.c > @@ -283,7 +283,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) > if (vcpu->arch.has_run_once && unlikely(!irqchip_in_kernel(vcpu->kvm))) > static_branch_dec(&userspace_irqchip_in_use); > > - kvm_mmu_free_memory_caches(vcpu); > + kvm_mmu_free_memory_cache(&vcpu->arch.mmu_page_cache); > kvm_timer_vcpu_terminate(vcpu); > kvm_pmu_vcpu_destroy(vcpu); > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index 4a24ebdc6fc6..9bc1a5d5a310 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -2322,11 +2322,6 @@ int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) > kvm_test_age_hva_handler, NULL); > } > > -void kvm_mmu_free_memory_caches(struct kvm_vcpu *vcpu) > -{ > - kvm_mmu_free_memory_cache(&vcpu->arch.mmu_page_cache); > -} > - > phys_addr_t kvm_mmu_get_httbr(void) > { > if (__kvm_cpu_uses_extended_idmap()) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel