Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Linux-Kernel Archive: Re: [PATCH v6 06/18] KVM: arm64: Support SDEI_EVENT_CONTEXT hypercall Re: [PATCH v6 06/18] KVM: arm64: Support SDEI_EVENT_CONTEXT hypercall From: Oliver Upton Date: Sat Apr 30 2022 - 11:03:45 EST Next message: Maciej W. Rozycki: "[PATCH v2 0/2] MIPS: Remove incorrect `cpu_has_fpu' overrides" Previous message: Greg KH: "Re: [PATCH v3 1/2] module: update dependencies at try_module_get()" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] On Sun, Apr 03, 2022 at 11:38:59PM +0800, Gavin Shan wrote: > This supports SDEI_EVENT_CONTEXT hypercall. It's used by the guest > to retrieve the registers (x0 - x17) from the interrupted or preempted > context in the event handler. The interrupted or preempted context > is saved prior to handling the event by executing its handler and > restored after that. > > Signed-off-by: Gavin Shan > --- > arch/arm64/kvm/sdei.c | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/arch/arm64/kvm/sdei.c b/arch/arm64/kvm/sdei.c > index 941263578b30..af5d11b8eb2f 100644 > --- a/arch/arm64/kvm/sdei.c > +++ b/arch/arm64/kvm/sdei.c > @@ -140,6 +140,37 @@ static unsigned long hypercall_enable(struct kvm_vcpu *vcpu, bool enable) > return ret; > } > > +static unsigned long hypercall_context(struct kvm_vcpu *vcpu) > +{ > + struct kvm_sdei_vcpu *vsdei = vcpu->arch.sdei; > + struct kvm_sdei_vcpu_context *context; > + unsigned long param_id = smccc_get_arg(vcpu, 1); > + unsigned long ret = SDEI_SUCCESS; > + > + spin_lock(&vsdei->lock); > + > + /* Check if we have events are being handled */ > + context = &vsdei->context[SDEI_EVENT_PRIORITY_CRITICAL]; > + context = context->event ? context : NULL; > + context = context ? : &vsdei->context[SDEI_EVENT_PRIORITY_NORMAL]; > + context = context->event ? context : NULL; > + if (!context) { > + ret = SDEI_DENIED; > + goto unlock; > + } Eek! You'll probably be able to drop all of this and just check the SDEI active flag. -- Thanks, Oliver Next message: Maciej W. Rozycki: "[PATCH v2 0/2] MIPS: Remove incorrect `cpu_has_fpu' overrides" Previous message: Greg KH: "Re: [PATCH v3 1/2] module: update dependencies at try_module_get()" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]