[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6] xen/arm : emulation of arm's PSCI v0.2 standard



On Wed, 2014-07-30 at 12:14 +0100, Ian Campbell wrote:
> > +register_t do_psci_0_2_cpu_suspend(uint32_t power_state, register_t 
> > entry_point,
> > +                            register_t context_id)
> > +{
> > +    struct vcpu *v = current;
> > +
> > +    /* affinity values are ignored in this implementation as
> > +     * at present xen does not supports affinity level greater
> > +     * than 0, for all  affinity values passed we power down/ standby
> > +     * the current core */
> > +
> > +    vcpu_block_unless_event_pending(v);
> > +
> > +    /* if power down is requested context_id must be returned in x0/r0
> > +     * as the function return will be written in x0/r0 we return context_id
> > +     * instead os success value */
> 
> The spec isn't clear on this, but I don't think this can be correct.
> 
> I expect the requirement is that you either return PSCI_SUCCESS to the
> instruction after the smc or you return to entry_point with
> x0==context_id. I don't think it makes sense to return after the smc
> with the x0==context_id. This is implied by section 5.4.2 bullet #4
> which talks about handling PSCI return codes.
> 
> I'm going to ask ARM for clarification, please stand by.

ARM have confirmed. If you are returning to the instruction after the
smc then you should return a PSCI error code in x0, not context_id.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.