On 2018-03-01 09:44, Claudio Scordino wrote:
> Hi Jan,
> 
>     >>>
>     >>> -   if (!IS_PSCI_32(regs[0]) && !IS_PSCI_64(regs[0]))
>     >>> +   if (IS_PSCI_32(regs[0]) || IS_PSCI_64(regs[0])) {
>     >>> +           regs[0] = psci_dispatch(ctx);
>     >>> +   } else if (IS_SIP_32(regs[0]) || IS_SIP_64(regs[0])) {
>     >>> +           /* Nothing */
>     >>> +           //printk("SIP service\n");
>     >>> +           //regs[0] = sip_dispatch(ctx);
>     >>
>     >> Hmm. What is SIP? Why can we simply ignore the calls? Why no
>     returning
>     >> of some code in regs[0])? And are these function call ID
>     >> architecture-wide reserved, just like PSCI?
>     >
>     > See here for SIP.
>     >
>     
> https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/arm-sip-service.rst
>     
> <https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/arm-sip-service.rst>
>     >
>     > on i.MX8MQ, SIP is mainly used for Low Power related controll. The
>     > previous patch is a hack method. Per my understanding, jailhouse is
>     > for real time case, low power feature will introduce lots latency,
>     > so ignore them here no harm for me, the previous patch is a hack.
>     >
>     > Since SIP is silicon provider service, it is better to provide a
>     callback
>     > function for different SoCs.
>     >
> 
>     Thanks for the pointer! From reading through it and studying the SMC
>     calling convention again, I guess we should at least return -1 on
>     ignored calls.
> 
> 
> You mean, returning TRAP_FORBIDDEN ? Wouldn't TRAP_UNHANDLED be more
> meaningful ?

No, I mean the return code to the guest in X0. TRAP_HANDLED has to stay
in order to continue execution.

Jan

> 
> In both cases, we should also modify the behavior of arch_handle_trap()
> to not panic (the SMC must be just ignored).
> 
> What about adding also a TRAP_IGNORED flag ?
> 
> Thanks,
> 
>              Claudio
> 
-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to