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

Re: [Xen-users] How to write DomU from an existing Linux kernel (Paravirtualization)



>         Just out of curiousity,what would i have to do to write a DomU from
> an existing Linux kernel?

1) Fix memory management.  In particular, most OSes are designed with the 
assumption that they'll run on a machine where they are in (mostly) 
contiguous memory.  On Xen, the real ("machine") pages owned by a domain can 
come from anywhere in the real host's memory.  The memory management of the 
guest is modified to accommodate this, usually by adding an abstraction of 
pseudophysical (usually just referred to as "physical") memory.  Guest memory 
is then indexed in a contiguous physical address space, which keeps the core 
OS code that makes contiguity assumptions happy.  The Xen architecture 
support code is responsible for translating those into machine addresses that 
have meaning to the host (e.g. taking a pseudophysical address and 
translating it to a host machine address for use in a pagetable).

2) Paravirtual device drivers.  These talk to dom0 using a shared memory 
protocol that is designed for high performance on a virtualised system.  This 
is in contrast to fully virtualized guests which see emulations of real IO 
devices.  Console, block and network drivers are the most important; 
framebuffer and TPM device drivers are also supported by some guests.  In 
order to support paravirtualised drivers you'd need to support Event 
Channels, Grant Tables and Xenstore/Xenbus plus perhaps a few other things.

3) Various other tweaks.  Task switching code is different on Xen.  Time 
management is different in Xen domains.   If you want your PV OS to be able 
to run as dom0 or a Driver Domain then you also need support for various 
physical IO operations and the management of other domains.

There are certainly things I've forgotten to mention but these are some of the 
most important modifications.

The Xen Interface Manual describes some of the interfaces that guests use and 
the Xen research papers describe some of the principles behind the 
paravirtualised interface in more detail.  There is also probably some 
information on the Wiki that you might find useful.

I hope this helps you somewhat.

Cheers,
Mark

> (Paravirtualization). I mean DomU of most distros are already available
> ,but i  want to understand what all parts of the kernel are to be changed
> so that it can be used as a DomU in a Paravirtualization mode.
> Can someone give me a link which can explain the modifications required in
> some detail ?(other than just saying the memory management code has to be
> changed)
>
> Thanks.....

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

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