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 2B728C25B7E for ; Fri, 31 May 2024 16:29:49 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dHjWMdnD103XJjnC9zdI1HlfY7gq5twneYY8wPzabyk=; b=qQDoZqw4qmJcB+ z02hlvf+9BpQfmPCemGdYcRcmhq1IxE64k3M/XCYlWvgbpaAesdT4BNexYtlfypSB7qq2N7jHFQ4Z JNgFAChhQDJ5cL/ksa70bToDwlqVghadPeTWZlymgtXgEGeGWFS1a/uBL6ewmQKgO2aznJZCtfERP 6L47jfXep86fpBgF6xeVd1Of1IWPztZE799uJaz6bJYCyfsK9KF8LnKziv/7TSjs4Zs7VoYBpw2Mw OfJtUB5m6GlwQjbg4ePbGat8XuV5FVC7hMGnWthvPU6v3HnjgmVzHvoKV4TRHvn4RCLibvJzcqbBb 4AFTmg6MrMi4jk++A+IQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD58J-0000000Aqhm-3nhR; Fri, 31 May 2024 16:29:35 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD58G-0000000AqgR-1mvw for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 16:29:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5EBEE1424; Fri, 31 May 2024 09:29:53 -0700 (PDT) Received: from [10.57.40.150] (unknown [10.57.40.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5C07F3F792; Fri, 31 May 2024 09:29:26 -0700 (PDT) Message-ID: <19650d71-2421-4cef-a858-9639a5537dbe@arm.com> Date: Fri, 31 May 2024 17:29:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 13/14] arm64: rsi: Interfaces to query attestation token Content-Language: en-GB To: Steven Price , Catalin Marinas Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Sami Mujawar , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , 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 References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-14-steven.price@arm.com> From: Suzuki K Poulose In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_092932_560484_A07B2A8C X-CRM114-Status: GOOD ( 16.33 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/05/2024 16:52, Steven Price wrote: > On 15/05/2024 12:10, Catalin Marinas wrote: >> On Fri, Apr 12, 2024 at 09:42:12AM +0100, Steven Price wrote: >>> diff --git a/arch/arm64/include/asm/rsi_cmds.h b/arch/arm64/include/asm/rsi_cmds.h >>> index b4cbeafa2f41..c1850aefe54e 100644 >>> --- a/arch/arm64/include/asm/rsi_cmds.h >>> +++ b/arch/arm64/include/asm/rsi_cmds.h >>> @@ -10,6 +10,9 @@ >>> >>> #include >>> >>> +#define GRANULE_SHIFT 12 >>> +#define GRANULE_SIZE (_AC(1, UL) << GRANULE_SHIFT) >> >> The name is too generic and it goes into a header file. Also maybe move >> it to rsi.h, and use it for other definitions like rsi_config struct >> size and alignment. >> > > The realm config structure although it 'happens to be' granule sized > isn't really required to be - so I think it would be a bit confusing to > specify that. The struct realm_config must be aligned to GRANULE_SIZE and the argument must be as such aligned. > > There are only two other interfaces that require this: > * RSI_IPA_STATE_GET - completely unused so far > * RSI_ATTESTATION_TOKEN_CONTINUE - the buffer has to be contained with > a granule, so it affects the maximum length per operation. > > I'll rename to RSI_GRANULE_{SHIFT,SIZE}, but I'm not sure it really That looks good to me. Suzuki > belongs in rsi.h because none of that functionality cares about the > granule size (indeed the driver in the following patch doesn't include > rsi.h). > > Thanks, > Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel