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 D6242C5321D for ; Mon, 26 Aug 2024 10:04:08 +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=Jq1F6Hs+dUyFngqzgvwBCSaL+RiMgr2Cg9guXY0t8d4=; b=EsdwRrCLE/VhLu8VkX1idvX27b cKQMJU382SOC2Kiq7nO4IB/SW3UCGVMD/AQNAfDhwUCpzIJWE6ENMSxO4UNeWU5h7YjniwyOEQi1r H6XsPqHw9xj4EpV3owtT4U/K7X3PACRN3uhSfI+q8HO2VvfWgMlrJ4lAyZqubIDDZ/aFSAGUeWjkS ll6mGxJ9OxuLpeHOmB+l5LhPt6tz1GWAFgk1XsMI3FReJx1iASAPwlLwR/2+1CRAZpUXE8RhT6amG c5Rp2ZDD14SKLLO2hlUF8Xtz/PlT28Uq7Js/B4+8rxBA9V67Et6WWR/V+f9C/0kx412ijZ1beb313 ePohD2JQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siWZp-00000006pqf-1lJn; Mon, 26 Aug 2024 10:03:57 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siWXh-00000006pGo-0FS0 for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 10:01:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 57AAEA42141; Mon, 26 Aug 2024 10:01:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E4D2C51411; Mon, 26 Aug 2024 10:01:39 +0000 (UTC) Date: Mon, 26 Aug 2024 13:01:47 +0300 From: Catalin Marinas To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Marc Zyngier , 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 , Gavin Shan , Shanker Donthineni , Alper Gun Subject: Re: [PATCH v5 03/19] arm64: rsi: Add RSI definitions Message-ID: References: <20240819131924.372366-1-steven.price@arm.com> <20240819131924.372366-4-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240819131924.372366-4-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_030145_182690_7910997A X-CRM114-Status: GOOD ( 13.47 ) 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 Mon, Aug 19, 2024 at 02:19:08PM +0100, Steven Price wrote: > From: Suzuki K Poulose > > The RMM (Realm Management Monitor) provides functionality that can be > accessed by a realm guest through SMC (Realm Services Interface) calls. > > The SMC definitions are based on DEN0137[1] version 1.0-rel0-rc1. > > [1] https://developer.arm.com/-/cdn-downloads/permalink/PDF/Architectures/DEN0137_1.0-rel0-rc1_rmm-arch_external.pdf > > Signed-off-by: Suzuki K Poulose > Signed-off-by: Steven Price Acked-by: Catalin Marinas (I did cross-check the definitions with the spec) > +struct realm_config { > + union { > + struct { > + unsigned long ipa_bits; /* Width of IPA in bits */ > + unsigned long hash_algo; /* Hash algorithm */ > + }; > + u8 pad[0x200]; > + }; > + union { > + u8 rpv[64]; /* Realm Personalization Value */ > + u8 pad2[0xe00]; > + }; > + /* > + * The RMM requires the configuration structure to be aligned to a 4k > + * boundary, ensure this happens by aligning this structure. > + */ > +} __aligned(0x1000); It might have been easier to just write the pad sizes in decimal (trying to figure out what 0xe00 is ;)). Anyway, it's fine like this as well. -- Catalin