[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe1e3793-a413-42b6-b368-619aae277cb6@arm.com>
Date: Wed, 22 May 2024 16:52:47 +0100
From: Steven Price <steven.price@....com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: kvm@...r.kernel.org, kvmarm@...ts.linux.dev,
Sami Mujawar <sami.mujawar@....com>, Marc Zyngier <maz@...nel.org>,
Will Deacon <will@...nel.org>, James Morse <james.morse@....com>,
Oliver Upton <oliver.upton@...ux.dev>,
Suzuki K Poulose <suzuki.poulose@....com>, Zenghui Yu
<yuzenghui@...wei.com>, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Joey Gouly <joey.gouly@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Christoffer Dall <christoffer.dall@....com>, Fuad Tabba <tabba@...gle.com>,
linux-coco@...ts.linux.dev,
Ganapatrao Kulkarni <gankulkarni@...amperecomputing.com>
Subject: Re: [PATCH v2 13/14] arm64: rsi: Interfaces to query attestation
token
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 <asm/rsi_smc.h>
>>
>> +#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
Powered by blists - more mailing lists