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

Re: [Xen-devel] Structure of the Xen source code

  • To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Daniel Stodden <stodden@xxxxxxxxxx>
  • Date: Mon, 19 Feb 2007 16:17:27 +0100
  • Delivery-date: Mon, 19 Feb 2007 07:17:01 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On Mon, 2007-02-19 at 20:01 +0530, Pradeep Singh, TLS-Chennai wrote:
> hi all,


> I installed Xen on my Gentoo machine successfully from source.
> Now i am going through the code.
> instead of banging aimlessly for a week or so i thought i should ask
> the mailing list the following small doubts.
> I noticed that following directories are there in my
> xen-3.0.3_0-src directories.
> 1. linux-2.6.-xen-sparse

'sparse tree' patched into the

> 2. pristine-linux-

plain, vanilla, well, pristine linux-2.6. renamed to this after untar.

> 3. linux-

the hybrid kernel. see ./README

> 4. ref-linux-

pristine, patched up to hold xen subarches.

> 5. linux-

dom0 source + build

> 6. linux-

domU source + build

> 7. xen

the hypervisor itself

> 8. unmodified_drivers

got me. i've been asking this myself lately and didn't really bother

> only these directories look like holding the source.
> As it looks from the directories i assumed that the xen dom0 patched
> code must be residing in the linux- directory and that
> of patched xen domU in linux-
> Am i right? or i am missing something?

unless you build a hybrid domO/U kernel (-xen), true. again, see
the ./README.

but these are not really source trees, i.e. rebuilt after distribution.

> What exactly does the other directories signify?


        run 'make pdf' in there, or whatever your preferred format
        is. watch out for missing tools. (latex, etc.)

                supplementary pytyon code, xend, xm.
                simple language made hard to read. >:)

                xenctrl. domain control from dom0 userland.
                supplementing xend et al.
                important stuff for studies.

        a very small operating system,
        used for verifying/testing/demo purposes

> Secondly , if i want to start studying the Xen code what would be the
> correct path to follow.
> By path i mean is which the directory i should start digging first?

start with docs/. no, really :) reading the interface manual should get
you a good introduction.

follow the xen code, presumably by tracking some hypercall paths from
arch/x86//entry.S. branch from there to whatever you see fit. for
hypercalls, see docs//interface.pdf.

before or after, see tools/console/daemon for a considerably simple
example on how domains and xen are typically wired in between.

learn about the basic data structures. see what a vcpu and a domain
means. then follow common/event_channel.c from some point of signal
emission down to reception by the domain handling.

if you know linux, lookup the entries in the linux kernel (path layout
should be stunningly similar). if you prefer a more comprehensive
example, take a look around mini-os.

these all assume paravirtual guests are your focus. if you need to learn
about hardware VMs, the path might look different, but i suppose i'd
recommend to see paravirtualization first in any case.

> If a doc about code organisation of the Xen can be given that will be
> great.
> Any other links or pointer'll be appreciated.
> Thanks in Advance
> pradeep

Daniel Stodden
LRR     -      Lehrstuhl fÃr Rechnertechnik und Rechnerorganisation
Institut fÃr Informatik der TU MÃnchen             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B

Attachment: signature.asc
Description: This is a digitally signed message part

Xen-devel mailing list



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