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=-15.8 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,URIBL_BLOCKED,USER_AGENT_SANE_1 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 C0DD7C433E0 for ; Thu, 4 Feb 2021 14:37:43 +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 7B2A764EE2 for ; Thu, 4 Feb 2021 14:37:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B2A764EE2 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=ekvM8f+XXMpNVjmK6cQDikm9ix8OHX3PCeWTvYHkNH8=; b=xjjshCK3JIa7cJXO4eHr0j++R upElG0BHG1912ZBPjFevflvuna/1Aey1h0PQ5X/ZW59NXdXbKKNhOeU07/aEZdjUNG6IJEPZfPndB nMNhRGpbYxwRBiM/47v+yexEe1v7upeAOSPd9mI/w4lvGCPtDEHldXiz2gA621K3gpYPFQCjEtS+h P/tRJST1VezX9U0pl8FaGO6eBbkHjM8ML58llLges8pxtevc+Z1Hb0c8UV7Lc9R7yocoC/nYAAOH0 Vxi/yX6TxPk5UhQH1wfYnDgI33hFnGwPGmbcNjE/lrN3ejfDiWRBC3QZFdBeOQeZdNsk0gEoe6JSf YmgPmGdKQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7fkD-0003dF-N1; Thu, 04 Feb 2021 14:36:29 +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 1l7fkA-0003cb-2b for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 14:36:28 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7490864F5E; Thu, 4 Feb 2021 14:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612449385; bh=q+Q5OcQ6akzkt/aKtlVLcbW3FULf1J4eGOwrszsVCug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rTmic4TMup6IFFAFKWQx3xr963WJyxq5iq7OlxQrCxnv+5bTzGvamdKhsPYWYiAel Q1+7Gz821B0byhtUOHN+nyWHIHJdvJVh6hgjatpUO3UWjbwV+vzppDXMNokGZDJaq6 OGiBFaBMHIjRKRQPKbks6XQQpvM86D+PpgnmeKddLybIn5TYJDK3qYLPouOt9iSYBN ZPJt0EsmandHOY1E4gWEPJJTQIqCfDK/gxBfBpt6vx+bWwTOKNkLd6jBWA8pWutj/2 SKHhmaVDyEQaaKBdiwI3vkRVxAMyZOeeAgETPxMweukOqAFYQzYwMU8Xcdq0Wjk1vi 2fs8AS0XL5X0w== Date: Thu, 4 Feb 2021 14:36:19 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [RFC PATCH v2 24/26] KVM: arm64: Make memcache anonymous in pgtable allocator Message-ID: <20210204143618.GA20815@willie-the-truck> References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-25-qperret@google.com> <20210203155944.GH18974@willie-the-truck> 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-20210204_093626_198890_17F4E1FF X-CRM114-Status: GOOD ( 22.60 ) 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: Mark Rutland , devicetree@vger.kernel.org, kernel-team@android.com, Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , David Brazdil , Frank Rowand , kvmarm@lists.cs.columbia.edu, Julien Thierry 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 Thu, Feb 04, 2021 at 02:24:44PM +0000, Quentin Perret wrote: > On Wednesday 03 Feb 2021 at 15:59:44 (+0000), Will Deacon wrote: > > On Fri, Jan 08, 2021 at 12:15:22PM +0000, Quentin Perret wrote: > > > The current stage2 page-table allocator uses a memcache to get > > > pre-allocated pages when it needs any. To allow re-using this code at > > > EL2 which uses a concept of memory pools, make the memcache argument to > > > kvm_pgtable_stage2_map() anonymous. and let the mm_ops zalloc_page() > > > callbacks use it the way they need to. > > > > > > Signed-off-by: Quentin Perret > > > --- > > > arch/arm64/include/asm/kvm_pgtable.h | 6 +++--- > > > arch/arm64/kvm/hyp/pgtable.c | 4 ++-- > > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h > > > index 8e8f1d2c5e0e..d846bc3d3b77 100644 > > > --- a/arch/arm64/include/asm/kvm_pgtable.h > > > +++ b/arch/arm64/include/asm/kvm_pgtable.h > > > @@ -176,8 +176,8 @@ void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt); > > > * @size: Size of the mapping. > > > * @phys: Physical address of the memory to map. > > > * @prot: Permissions and attributes for the mapping. > > > - * @mc: Cache of pre-allocated GFP_PGTABLE_USER memory from which to > > > - * allocate page-table pages. > > > + * @mc: Cache of pre-allocated memory from which to allocate page-table > > > + * pages. > > > > We should probably mention that this memory must be zeroed, since I don't > > think the page-table code takes care of that. > > OK, though I think this is unrelated to this change -- this is already > true today I believe. Anyhow, I'll pile a change on top. It is, but GFP_PGTABLE_USER implies __GFP_ZERO, so the existing comment captures that. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel