Re: [PATCH v8 07/43] arm64: RME: ioctls to create and configure realms
From: Steven Price
Date: Thu May 01 2025 - 11:11:56 EST
On 30/04/2025 06:39, Gavin Shan wrote:
> On 4/16/25 11:41 PM, Steven Price wrote:
[...]
>> diff --git a/arch/arm64/kvm/rme.c b/arch/arm64/kvm/rme.c
>> index 67cf2d94cb2d..dbb6521fe380 100644
>> --- a/arch/arm64/kvm/rme.c
>> +++ b/arch/arm64/kvm/rme.c
[...]
>> +
>> +static int kvm_create_realm(struct kvm *kvm)
>> +{
>> + struct realm *realm = &kvm->arch.realm;
>> + int ret;
>> +
>> + if (!kvm_is_realm(kvm))
>> + return -EINVAL;
>
> This check is duplicate because the only caller kvm_realm_enable_cap()
> already
> has the check. So it can be dropped.
Ah, good spot - thanks!
Steve