Re: [PATCH v4 20/21] KVM: arm64: Export SDEI capability

Gavin Shan
2022-01-12T07:22:45Z

On 11/10/21 9:55 PM, Eric Auger wrote:
> On 8/15/21 2:13 AM, Gavin Shan wrote:
>> The SDEI functionality is ready to be exported so far. This adds
>> new capability (KVM_CAP_ARM_SDEI) and exports it.
>
> Need to be documented in
> kvm/api.rst
> as the rest of the API
>

Ok, Thanks, Eric :)

>>
>> Signed-off-by: Gavin Shan <gshan@redhat.com>
>> ---
>> arch/arm64/kvm/arm.c | 3 +++
>> include/uapi/linux/kvm.h | 1 +
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
>> index 215cdbeb272a..7d9bbc888ae5 100644
>> --- a/arch/arm64/kvm/arm.c
>> +++ b/arch/arm64/kvm/arm.c
>> @@ -278,6 +278,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>> case KVM_CAP_ARM_PTRAUTH_GENERIC:
>> r = system_has_full_ptr_auth();
>> break;
>> + case KVM_CAP_ARM_SDEI:
>> + r = 1;
>> + break;
>> default:
>> r = 0;
>> }
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 8cf41fd4bf86..2aa748fd89c7 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -1112,6 +1112,7 @@ struct kvm_ppc_resize_hpt {
>> #define KVM_CAP_BINARY_STATS_FD 203
>> #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
>> #define KVM_CAP_ARM_MTE 205
>> +#define KVM_CAP_ARM_SDEI 206
>>
>> #ifdef KVM_CAP_IRQ_ROUTING
>>
>>
> Eric
>