public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: sen wang <wangsen.linux@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, kvm-devel <kvm@vger.kernel.org>
Subject: Re: port kvm to arm
Date: Sun, 19 Apr 2009 16:05:20 +0300	[thread overview]
Message-ID: <49EB2190.2020503@redhat.com> (raw)
In-Reply-To: <454c71700904190518o66a286f6s5425c177cdb7b048@mail.gmail.com>

(copying kvm@vger.kernel.org, where most kvm development happens)

sen wang wrote:
> I have some idea about the ARM KVM.
>
> I have register a project ,named"arm-kvm", to port KVM to arm.
> I'll kick off the ARM KVM porting next week.
>
> This is my plan:
>
> step 1   Make a guest linux run on the Hypervisor-linux.
>
> From the Hypervisor-linux's viewpoint, The guest is a thread of him. 
> which is like the X86 KVM.But,In this step,the guest-linux has no IO. 
> It is based on roofs. The physical memroy is allocated to the guest os 
> at creating time. The guest-linux still run in the privileged 
> mode,which handle the user mode memory exeception ,SWI system call ... 
> But the guest-linux will not touch the hardware devices.The physical 
> interrupt should be controlled by Hypervisor-linux. So the 
> Hypervisor-linux can switch it off when interrupt happens. And the 
> Hypervisor-linux will provide some vitual system devices like system 
> timer and interrupt controller for guest.
>
> Because lack of hardware support,The guest linux should know when to 
> exit,for exemple the idle time,the kernel panic, the guest should 
> voluntarily exit VM --which is like a thread switch.
>
> so there is another job: modification of Hypervisor-linux to support 
> arm,and modification of qemu for arm KVM

You'll can hook read[bwl]() and similar functions to use hypercalls, 
which will allow you to use emulated devices in qemu, even without  full 
mmu virtualization.

>
> step 2   Make guest IO work
>
> The guest should have IO functions.Of course, IT is the virtIO. we 
> should make the virtIO work on the arm kvm.The arm has no hardware 
> virtualization extension like intel VT. But,In the guest virtIO 
> driver, when need start IO,the guest should voluntarily exit VM--so it 
> like IO-exit of the intel VT.

If you make emulated devices work, then you can defer this to the last 
step.  virtio is only an optimization.

>
>
> step 3   add memory virtualization for guest
>
> just make the guest run in the user mode,porting the x86 kvm memory 
> virtualization function for arm kvm,and so on. But I think we should 
> keep the work mode of step 1 as a option for user. sometime, I think 
> the guest handle the physical memory directly is not a bad thing.
>
>
> step 4   use the trustzone
>
> from arm V6, there is a hardware extension of trustzone. We can make 
> use of it. let the Hypervisor-linux run int the monitor state,the 
> guest run in the non-security state. But,the guest os run as 
> normal--linux kernel in the privileged mode,the user program in the 
> user mode.So architecture is more elegant.

Does the monitor state have its own userspace?  If not, how are you 
going to run qemu?

>
> step5   more guest os
> the work mode of step 1 has the advantage: we don't need modify the 
> guest much,which make port wince,symbain possible. for, you know,we 
> don't have so much source codes for those os.
>
> welcome join the "arm-kvm" team. thanks

Good luck :)

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


           reply	other threads:[~2009-04-19 13:06 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <454c71700904190518o66a286f6s5425c177cdb7b048@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49EB2190.2020503@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wangsen.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox