On Mon, May 9, 2011 at 8:43 AM, Catalin Marinas <catalin.marinas at arm.com> wrote: > On Mon, 2011-05-09 at 16:31 +0100, Hollis Blanchard wrote: >> > +/* >> > + * Change the current processor mode to Hyp mode. >> > + * You should never return to user space or enable interrupts before calling >> > + * kvm_arm_hyp_return. >> > + */ >> > +static inline void kvm_arm_hyp_mode(void) >> > +{ >> > + ? ? ? __asm__ ( >> > + ? ? ? ? ? ? ? "push ? {lr}\n\t" >> > + ? ? ? ? ? ? ? "hvc ? ?#0\n\t" >> > + ? ? ? ? ? ? ? "pop ? ?{lr}\n\t"); >> > +} >> > + >> > +/* >> > + * Return from Hyp mode to Svc mode. >> > + */ >> > +static inline void kvm_arm_hyp_return(void) >> > +{ >> > + ? ? ? __asm__ ( >> > + ? ? ? ? ? ? ? "push ? {lr}\n\t" >> > + ? ? ? ? ? ? ? "hvc ? ?#0\n\t" >> > + ? ? ? ? ? ? ? "pop ? ?{lr}\n\t"); >> > +} >> >> Are these hypercalls that return in a new processor privilege level? >> (Also, I don't see them being used anywhere.) > > The HVC makes the switch to the Hypervisor mode (similar to how SVC > switches from User to Supervisor mode). OK, so the push/pop is actually the parameter passing ABI. Fine. >> Is the A15 ISA documentation available anywhere yet? > > The A15 consists of the standard ARMv7 ISA plus the virtualisation > extensions. These are described in: > > http://infocenter.arm.com/help/topic/com.arm.doc.ddi0406b_virtualization_extns/index.html Thanks. -Hollis