This supports SDEI_VERSION hypercall by returning v1.1, which is the specification version we're following. The vendor is set to 'KVM'. Signed-off-by: Gavin Shan <gshan@xxxxxxxxxx> --- arch/arm64/kvm/sdei.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c index 8a9b477b8977..5a3a64cd6e84 100644 --- a/arch/arm64/kvm/sdei.c +++ b/arch/arm64/kvm/sdei.c @@ -118,6 +118,14 @@ static bool remove_all_vcpu_events(struct kvm_vcpu *vcpu, return pending; } +static unsigned long hypercall_version(struct kvm_vcpu *vcpu) +{ + /* v1.1 and the vendor is KVM */ + return (1UL << SDEI_VERSION_MAJOR_SHIFT) | + (1UL << SDEI_VERSION_MINOR_SHIFT) | + 0x4b564d; +} + int kvm_sdei_hypercall(struct kvm_vcpu *vcpu) { struct kvm *kvm = vcpu->kvm; @@ -142,6 +150,8 @@ int kvm_sdei_hypercall(struct kvm_vcpu *vcpu) switch (func) { case SDEI_1_0_FN_SDEI_VERSION: + ret = hypercall_version(vcpu); + break; case SDEI_1_0_FN_SDEI_EVENT_REGISTER: case SDEI_1_0_FN_SDEI_EVENT_ENABLE: case SDEI_1_0_FN_SDEI_EVENT_DISABLE: -- 2.23.0 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm