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 E7DF5CF8572 for ; Thu, 3 Oct 2024 09:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lI0CvpthXy17QloUZ+wql60FsYs5uuc/rldmCMsWuB0=; b=cU/C0oSsIEYtywNYlr/51eQ8F3 YYKKXqycWU5zd77vRUObo6bpyl40IyYRJqDubD6vk2fZZCQbk8Dsrt+r/HNc6NDX27Fm+QtvOqxfI IdPcpf9YPe3ILfCNMFpoSd6FYwe8F11rlPhhxNa2dwattBCoqO9LOUXcGTvSvU5Er8WdMx/g9HibC XHkYunmWxKxzgNztrve6JPhUVmhBRXRU9qj3+fURnjTgfDlN14p0WYZ8m0aoinW6gc0tnbvLY0hqO mL6/EzkZTaVUfz7XkVBGAUlErtni4xHjFdy7m0Zp2r07zxsH1CKKDLBpYU1UU0SjocpdYOdc/BODm /pCKVhnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swIM0-00000008hI8-1C98; Thu, 03 Oct 2024 09:42:36 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swIKk-00000008h6c-1ZY3 for linux-arm-kernel@lists.infradead.org; Thu, 03 Oct 2024 09:41:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 90B295C5B53; Thu, 3 Oct 2024 09:41:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9CA6C4CEC7; Thu, 3 Oct 2024 09:41:15 +0000 (UTC) Date: Thu, 3 Oct 2024 10:41:13 +0100 From: Catalin Marinas To: Steven Price Cc: Marc Zyngier , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , Suzuki K Poulose , Michael Kelley Subject: Re: [PATCH v2 1/2] irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor Message-ID: References: <20241002141630.433502-1-steven.price@arm.com> <20241002141630.433502-2-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241002141630.433502-2-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241003_024118_480998_6A791027 X-CRM114-Status: GOOD ( 14.37 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 02, 2024 at 03:16:29PM +0100, Steven Price wrote: > Within a realm guest the ITS is emulated by the host. This means the > allocations must have been made available to the host by a call to > set_memory_decrypted(). Introduce an allocation function which performs > this extra call. > > For the ITT use a custom genpool-based allocator that calls > set_memory_decrypted() for each page allocated, but then suballocates > the size needed for each ITT. Note that there is no mechanism > implemented to return pages from the genpool, but it is unlikely the > peak number of devices will so much larger than the normal level - so > this isn't expected to be an issue. > > Co-developed-by: Suzuki K Poulose > Signed-off-by: Suzuki K Poulose > Tested-by: Will Deacon > Reviewed-by: Marc Zyngier > Signed-off-by: Steven Price Reviewed-by: Catalin Marinas