lkml.org 
[lkml]   [2022]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 06/21] KVM: arm64: Support SDEI_EVENT_CONTEXT hypercall
From


On 2021/8/15 8:13, Gavin Shan wrote:
> +static unsigned long kvm_sdei_hypercall_context(struct kvm_vcpu *vcpu)
> +{
> + struct kvm *kvm = vcpu->kvm;
> + struct kvm_sdei_kvm *ksdei = kvm->arch.sdei;
> + struct kvm_sdei_vcpu *vsdei = vcpu->arch.sdei;
> + struct kvm_sdei_vcpu_regs *regs;
> + unsigned long index = smccc_get_arg1(vcpu);
> + unsigned long ret = SDEI_SUCCESS;
> +
> + /* Sanity check */
> + if (!(ksdei && vsdei)) {
> + ret = SDEI_NOT_SUPPORTED;
> + goto out;
> + }
Maybe we could move these common sanity check codes to
kvm_sdei_hypercall to save some lines.

Thanks,
Shannon

\
 
 \ /
  Last update: 2022-01-11 10:44    [W:0.392 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site