* Re: port kvm to arm
[not found] ` <454c71700904190518o66a286f6s5425c177cdb7b048@mail.gmail.com>
@ 2009-04-19 13:05 ` Avi Kivity
0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2009-04-19 13:05 UTC (permalink / raw)
To: sen wang; +Cc: Linus Torvalds, linux-kernel, kvm-devel
(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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-19 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <454c71700904180641p764d13afyd42c753c37bda2cf@mail.gmail.com>
[not found] ` <alpine.LFD.2.00.0904181202030.4042@localhost.localdomain>
[not found] ` <49EAE219.5040002@redhat.com>
[not found] ` <454c71700904190518o66a286f6s5425c177cdb7b048@mail.gmail.com>
2009-04-19 13:05 ` port kvm to arm Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).