[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40d818a2-0c91-e06e-6ce8-ac8123b8d1d4@gmail.com>
Date: Tue, 11 Jan 2022 17:43:39 +0800
From: Shannon Zhao <shannon.zhaosl@...il.com>
To: Gavin Shan <gshan@...hat.com>, kvmarm@...ts.cs.columbia.edu
Cc: maz@...nel.org, linux-kernel@...r.kernel.org,
Jonathan.Cameron@...wei.com, pbonzini@...hat.com, will@...nel.org
Subject: Re: [PATCH v4 06/21] KVM: arm64: Support SDEI_EVENT_CONTEXT hypercall
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
Powered by blists - more mailing lists