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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C3E6C27C53 for ; Fri, 7 Jun 2024 16:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=YnrLFDLzhO5TC3R/mVxc3/pH0I/yiOr6x3OUacm/Jus=; b=LBxwK5Q2VhTYDi oexapskt/Kw6GJ+EfU0TVFyuwvf070DvLs7j6KyRC5rqw7iNnU+BK9qdfaFIRiqAis4oGhLVtxG24 jwduGsOoMQm3iSVZBHvL01/Bn7FaDDgkUQbKoSlLWrOAhKBsf2YJDZ55y6eZVyTc9NIrfupGe2qOs NyYivblOvCAuauUV237lE9AjtnmKyim6zrKwvQFIADiJwMGg4jdMh96vSL11Fu44RupUsmXJWM1YU O2wcfrqo3xXOBBwL8YvIfh5jOoSd9Sn3bB+ublrM2hmJtYs0tXNNgo99SG3XftdC5XURz1I4aRGov z9ttzjFZsEUpb/ouV+iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFcjr-0000000EzPl-3SE2; Fri, 07 Jun 2024 16:46:51 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFcjp-0000000EzP4-0yVR for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 16:46:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5782361FF8; Fri, 7 Jun 2024 16:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 216AEC2BBFC; Fri, 7 Jun 2024 16:46:44 +0000 (UTC) Date: Fri, 7 Jun 2024 17:46:42 +0100 From: Catalin Marinas To: Steven Price Cc: Marc Zyngier , kvm@vger.kernel.org, kvmarm@lists.linux.dev, Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni Subject: Re: [PATCH v3 12/14] arm64: realm: Support nonsecure ITS emulation shared Message-ID: References: <20240605093006.145492-1-steven.price@arm.com> <20240605093006.145492-13-steven.price@arm.com> <86a5jzld9g.wl-maz@kernel.org> <4c363476-e5b5-42ff-9f30-a02a92b6751b@arm.com> <867cf2l6in.wl-maz@kernel.org> <0ea597d3-6520-4ab3-8050-d967c173bc23@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0ea597d3-6520-4ab3-8050-d967c173bc23@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_094649_341318_C3092083 X-CRM114-Status: GOOD ( 18.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, Jun 07, 2024 at 04:45:14PM +0100, Steven Price wrote: > On 06/06/2024 19:38, Catalin Marinas wrote: > > Anyway, we could do some hacking around gen_pool as a temporary solution > > (maybe as a set of patches on top of this series to be easier to revert) > > and start investigating a proper decrypted page allocator in parallel. > > We just need to find a victim that has the page allocator fresh in mind > > (Ryan or Alexandru ;)). > > Thanks for the suggestions Catalin. I had a go at implementing something > with gen_pool - the below (very lightly tested) hack seems to work. This > is on top of the current series. > > I *think* it should also be safe to drop the whole alignment part with > this custom allocator, which could actually save memory. But I haven't > quite got my head around that yet. Thanks Steven. It doesn't look too complex and it solves the memory wasting. We don't actually free the pages from gen_pool but I don't think it matters much, the memory would get reused if devices are removed and re-added. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel