suyash jape
2007-Mar-10 10:49 UTC
[Xen-users] How to write DomU from an existing Linux kernel (Paravirtualization)
Hi all Just out of curiousity,what would i have to do to write a DomU from an existing Linux kernel? (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..... _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Mar-10 11:55 UTC
Re: [Xen-users] How to write DomU from an existing Linux kernel(Paravirtualization)
----- Original Message ----- From: suyash jape To: xen-users@lists.xensource.com Sent: Saturday, March 10, 2007 10:49 AM Subject: [Xen-users] How to write DomU from an existing Linux kernel(Paravirtualization) Hi all Just out of curiousity,what would i have to do to write a DomU from an existing Linux kernel? (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.... You can review the contents of the source for the Xen kernel, and especially the config files, to look for the changes. For the RPM''s, for example, they do install a /boot/config-[kernelname] which can be compared to that of a default kernel. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Mar-10 19:02 UTC
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@lists.xensource.com http://lists.xensource.com/xen-users