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

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator





On 12/6/17 4:31 PM, Julien Grall wrote:
Hi Stuart,

On 12/05/2017 03:36 PM, Stuart Yoder wrote:

There are limit on pCPUs, though. But this is not a problem, because
XEN scheduler will decide which guest will access OP-TEE right now.
OP-TEE don't have own scheduler at all, by the way. It is scheduled
by normal world.

Do you mind to give a bit more explanation here? Do you plan to add knowledge 
of OP-TEE in the scheduler?

Regarding scheduling-- OP-TEE runs with interrupts enabled (generally). So when 
an SMC
is in process in OP-TEE and the normal OS or hypervisor timer tick fires, 
OP-TEE halts
the current the in-progress thread, saves states, and returns to the normal 
world to
let the normal world timer interrupt handler and scheduler do its normal 
thing.  Eventually
when the normal world thread is re-scheduled and the in-progress thread 
restarts the
SMC.  That process continues until the SMC is completely done. So the OS/VMM 
scheduler
needs no awareness of OP-TEE since OP-TEE is cooperating with the normal world.

Thank you for the explanation. I see you specifically mention the hypervisor 
timer tick. How about the other interrupts? Will OP-TEE halts the current 
in-progress thread and then return to Xen/OS?

Yes, that is my understanding.  There are a few "fast" SMC calls that run with 
interrupts
disabled, but other than that any other normal world interrupt will cause
OP-TEE to halt/exit and return to normal world.

Stuart

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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