WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] How to write DomU from an existing Linux kernel (Paravirtualization)
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Sat, 10 Mar 2007 19:02:14 +0000
Cc: suyash jape <suyashjape@xxxxxxxxx>
Delivery-date: Sat, 10 Mar 2007 11:00:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <16314edc0703100249l44de0607i86cf0770c222951e@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <16314edc0703100249l44de0607i86cf0770c222951e@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
>         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

<Prev in Thread] Current Thread [Next in Thread>