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 F24A4C25B79 for ; Wed, 22 May 2024 15:53:05 +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: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=XZyEcV8yXdvmFHdjLjAANNXT228fu4IQ4bBpX/h6YUU=; b=cKYi55IKcPCZZV w0zXgyamkv7OsPmQd4keqxJ/zeLYWKfD/sAdgAZiduoLCEXrCg8CaB35b7xHis7AcGrLK/1olIRok JzBmOeyse60YFf7v4R/w9Uwuq+bf5sIWzIbsksHNGQ+a+WT4vAqdY5M90St4is/kyHOXMRvNU5jNi 0GdG4ch+UTdK+mI/uYxTzLdReTPsOSjib6gTKO8h2xV9p87v8OpWDktalnZBfds8vZ1EZ2rplxvVD IlAoLTppsUHQiEU3hdrcbIqUhYxmT0Ppmizifs/bQqG9If5Ljz8Pf4sNcg/aR6F5kYSOKxep9ndqf Yj+VnNHM77EcOFgzsmag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9oGv-00000003RWY-0r3X; Wed, 22 May 2024 15:52:57 +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 1s9oGq-00000003RUM-3axx for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2024 15:52:54 +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 2005DDA7; Wed, 22 May 2024 08:53:13 -0700 (PDT) Received: from [10.57.35.73] (unknown [10.57.35.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 750243F766; Wed, 22 May 2024 08:52:45 -0700 (PDT) Message-ID: Date: Wed, 22 May 2024 16:52:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 13/14] arm64: rsi: Interfaces to query attestation token To: Catalin Marinas Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Sami Mujawar , 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 References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-14-steven.price@arm.com> From: Steven Price Content-Language: en-GB In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240522_085252_992368_39FC1000 X-CRM114-Status: GOOD ( 12.20 ) 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 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. 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 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