[Android-virt] [PATCH] ARM: KVM: Monitor-Hypervisor API

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

 



On Mon, 2011-05-09 at 16:31 +0100, Hollis Blanchard wrote:
> On Sun, May 8, 2011 at 7:00 AM, Christoffer Dall <cdall at cs.columbia.edu> wrote:
> > This patch contains the KVM code including the simple version of the
> > initialization API that we discussed.
> 
> I missed the discussion, so I'm not really sure what the context is,
> but just a quick question:

That was some private discussion around getting the Linux KVM to execute
some code in Hypervisor mode on ARM processors with such extension
(Cortex-A15).

> > +/*
> > + * 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).

> 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

(they are free to access with a click-through license)

-- 
Catalin





[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux