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=-16.0 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 E2A15C433E0 for ; Wed, 3 Feb 2021 16:00:55 +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 8300F64F8C for ; Wed, 3 Feb 2021 16:00:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8300F64F8C 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=xwUpt0iAb6k07uhYuBOdkLhz+MNDda6X2t3mrxyvAjA=; b=O0aym0Ks1dT5NbZqwNHi09Z+B wQtuNRerTc6JNq1qQ1nu7H/XW5bJzgnaM/M1WxfWYlKm50vym1eN0OE0W1pUxAEGs09fe9tUU5D9h WSgxq//2MpMY6uIlEM6o/bR7LdkEZ/IlkGRPOfgFwY3Y56iRrZxFVvKWl4iXcQ2js5dn2eqHPnVC9 4yKjMrwI9C0tA7mGsfTOqCr6RbS+iZf5bYQulW+yVfCoBcTP2lWWW971a2VRKsrPOwkKA8284KoMb YALOyZP3n6Vqt3vXP2stzCC/AsRhdTbJs9OsiyQk9uwQ60bNmjpQtgPD4E/j1abztJSCy7+EuXwMt AdBG2xAAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7KZN-00076R-JY; Wed, 03 Feb 2021 15:59:53 +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 1l7KZL-000762-F8 for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 15:59:52 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E6AF64F65; Wed, 3 Feb 2021 15:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612367990; bh=vd0JgwFi9SFygRPs6uJBA5IlqSHA0J4/viQnsdxbe6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XwgRTmY+wbR2AWWneR+QRJ+VxZOq50HCSKKrgH5Ecgmq4c+MJskCHQNeDrpF1IQGq APHOyD709mozvFdQurnEctqaf5sR8hTJFQxdJH9/B7y7cIBkVdQjdZ1Qbof8UzG987 BQazpTejCHkc1coZ1E/4d0ZGeFNwC9SZYr1l0ixSgILWhLjE45A+GbmW34Q0VgN6Zl k4kxRTSM6m9ocPQNOAuiHsoQG1tMMotCPw2k+NGSot83udwo4MSjZ5KJHmJpjBhUBo WIw9nqDlqBmjXY0m58gAS3DSUXRXzpFzWrkpGSpJuI7zrgVkZrnXF9Fg+Ob5UNyDm1 Mr4VG7u9YtZYw== Date: Wed, 3 Feb 2021 15:59:44 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [RFC PATCH v2 24/26] KVM: arm64: Make memcache anonymous in pgtable allocator Message-ID: <20210203155944.GH18974@willie-the-truck> References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-25-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210108121524.656872-25-qperret@google.com> 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-20210203_105951_602982_01BD7105 X-CRM114-Status: GOOD ( 17.96 ) 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 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. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel