lkml.org 
[lkml]   [2022]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 04/18] KVM: arm64: Support SDEI_EVENT_REGISTER hypercall
On Mon, May 02, 2022 at 10:55:51AM +0800, Gavin Shan wrote:
> > > + unsigned long route_mode = smccc_get_arg(vcpu, 4);
> >
> > This is really 'flags'. route_mode is bit[0]. I imagine we don't want to
> > support relative mode, so bit[1] is useless for us in that case too.
> >
> > The spec is somewhat imprecise on what happens for reserved flags. The
> > prototype in section 5.1.2 of [1] suggests that reserved bits must be
> > zero, but 5.1.2.3 'Client responsibilities' does not state that invalid
> > flags result in an error.
> >
> > Arm TF certainly rejects unexpected flags [2].
> >
> > [1]: DEN0054C https://developer.arm.com/documentation/den0054/latest
> > [2]: https://github.com/ARM-software/arm-trusted-firmware/blob/66c3906e4c32d675eb06bd081de8a3359f76b84c/services/std_svc/sdei/sdei_main.c#L260
> >
>
> Yes, This chunk of code is still stick to old specification. Lets
> improve in next respin:
>
> - Rename @route_mode to @flags
> - Reject if the reserved bits are set.
> - Reject if relative mode (bit#1) is selected.
> - Reject if routing mode (bit#0) isn't RM_ANY (0).

Bit[0] is ignored for private events, actually. So we really just reject
if any of bit[63:1] are set.

--
Thanks,
Oliver

\
 
 \ /
  Last update: 2022-05-02 05:44    [W:0.068 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site