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=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,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 E23CAC433E2 for ; Wed, 2 Sep 2020 11:50:04 +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 A134920758 for ; Wed, 2 Sep 2020 11:50:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V32gcyBK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="aHfhY8rf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A134920758 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JGxKFxO7+wXYx0kmksBAiRgrcrnBWXhV4K24IHZ0MZM=; b=V32gcyBK9zDHqcreRwjAwGivF mM8rq20CkDGQMPtDkLQtC27Mp9hSiBsXEkohMp6HgGKek58k3nJ8xBte4qtE4wIHTDNkavbiAa21y CBnSiPOKTpjmexWSc+PzFOEmqnmlvpshpWas+xN4gVEcA/lp3QR2POanTANakJp4/RSx77ngBB4sx rWL7Jscimf8lc8AfS/FWVoCZt5k5DLOQ6WGDWpkNIk8qKw+nUxi3FCfiKSFVdcmHhwEvPVJdY3j42 jdTB1H+s7Zyg62SVfUf3BeYIA+bmXbF9R7RBE698yWdFXaSWOihfHGt4MOh2XbyCxvb8p3alDa3Xm 3ZU8MxZDQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDRFx-000620-JR; Wed, 02 Sep 2020 11:48:49 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDRFu-00061T-GE for linux-arm-kernel@lists.infradead.org; Wed, 02 Sep 2020 11:48:47 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 6C90D20758; Wed, 2 Sep 2020 11:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599047325; bh=P62K1vfQj5A37QVdWfe9HPv5BxM/jUb/63hAe70okfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aHfhY8rfyzhtxxkMsmvHf/VaTt4PxP5A4xfH4Em4oz076NRp0bou0fr6DumiAr5QB DW4r5bIRgS3xRR3hqavOQlN7ElUV6Vf6DAK+VFwpuuClzgsGlDuXxhstaN8YDwew6M bg7gcP5imj70+aWERIR5fDn3xMo66BqkH47ljykI= Date: Wed, 2 Sep 2020 12:48:41 +0100 From: Will Deacon To: Alexandru Elisei Subject: Re: [PATCH v3 07/21] KVM: arm64: Convert kvm_phys_addr_ioremap() to generic page-table API Message-ID: <20200902114841.GD5838@willie-the-truck> References: <20200825093953.26493-1-will@kernel.org> <20200825093953.26493-8-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200902_074846_606472_4C752ED3 X-CRM114-Status: GOOD ( 22.00 ) 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: , Cc: Marc Zyngier , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Catalin Marinas 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, Sep 01, 2020 at 06:08:01PM +0100, Alexandru Elisei wrote: > On 8/25/20 10:39 AM, Will Deacon wrote: > > Convert kvm_phys_addr_ioremap() to use kvm_pgtable_stage2_map() instead > > of stage2_set_pte(). > > > > Cc: Marc Zyngier > > Cc: Quentin Perret > > Signed-off-by: Will Deacon > > --- > > arch/arm64/kvm/hyp/pgtable.c | 14 +------------- > > arch/arm64/kvm/mmu.c | 29 ++++++++++++----------------- > > 2 files changed, 13 insertions(+), 30 deletions(-) > > > > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c > > index 41ee8f3c0369..6f65d3841ec9 100644 > > --- a/arch/arm64/kvm/hyp/pgtable.c > > +++ b/arch/arm64/kvm/hyp/pgtable.c > > @@ -439,18 +439,6 @@ struct stage2_map_data { > > struct kvm_mmu_memory_cache *memcache; > > }; > > > > -static kvm_pte_t *stage2_memcache_alloc_page(struct stage2_map_data *data) > > -{ > > - kvm_pte_t *ptep = NULL; > > - struct kvm_mmu_memory_cache *mc = data->memcache; > > - > > - /* Allocated with GFP_PGTABLE_USER, so no need to zero */ > > - if (mc && mc->nobjs) > > - ptep = mc->objects[--mc->nobjs]; > > - > > - return ptep; > > -} > > - > > static int stage2_map_set_prot_attr(enum kvm_pgtable_prot prot, > > struct stage2_map_data *data) > > { > > @@ -531,7 +519,7 @@ static int stage2_map_walk_leaf(u64 addr, u64 end, u32 level, kvm_pte_t *ptep, > > if (WARN_ON(level == KVM_PGTABLE_MAX_LEVELS - 1)) > > return -EINVAL; > > > > - childp = stage2_memcache_alloc_page(data); > > + childp = kvm_mmu_memory_cache_alloc(data->memcache); > > I think this hunk and the above could have been squashed in the previous patch, I > think we could have used kvm_mmu_memory_cache_alloc directly from the start. Urgh, looks like I squashed into the wrong patch when I rebased this before. Thanks, I'll fix that (but damn, rebasing this series sucks rocks). Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel