[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19650d71-2421-4cef-a858-9639a5537dbe@arm.com>
Date: Fri, 31 May 2024 17:29:24 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: Steven Price <steven.price@....com>,
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>, 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 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 <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.
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
Powered by blists - more mailing lists