All of lore.kernel.org
 help / color / mirror / Atom feed
* Structure of the Xen source code
@ 2007-02-19 14:31 Pradeep Singh, TLS-Chennai
  2007-02-19 14:49 ` Petersson, Mats
  2007-02-19 15:17 ` Daniel Stodden
  0 siblings, 2 replies; 6+ messages in thread
From: Pradeep Singh, TLS-Chennai @ 2007-02-19 14:31 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/html, Size: 1695 bytes --]

[-- Attachment #2: Type: text/plain, Size: 984 bytes --]

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Structure of the Xen source code
  2007-02-19 14:31 Structure of the Xen source code Pradeep Singh, TLS-Chennai
@ 2007-02-19 14:49 ` Petersson, Mats
       [not found]   ` <66E8AEE9980BB44CA5FCAD39EBA56AC67EDF3C@CHN-HCLT-EVS02.HCLT.CORP.HCL.IN>
  2007-02-19 15:17 ` Daniel Stodden
  1 sibling, 1 reply; 6+ messages in thread
From: Petersson, Mats @ 2007-02-19 14:49 UTC (permalink / raw)
  To: Pradeep Singh, TLS-Chennai, xen-devel

 

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 
> Pradeep Singh, TLS-Chennai
> Sent: 19 February 2007 14:32
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] Structure of the Xen source code
> 
> 
> 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
> 2. pristine-linux-2.6.16.29
> 3. linux-2.6.16.29-xen
> 4. ref-linux-2.6.16.29
> 5. linux-2.6.16.29-xen0
> 6. linux-2.6.16.29-xenU
> 7. xen
> 8. unmodified_drivers
> 
> 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-2.6.16.29-xen0 
> directory and that of patched xen domU in linux-2.6.16.29-xen0.
> Am i right? or i am missing something?

Yes, those are correct. 

The pristine directory is a "direct copy of kernel.org sources" (or
whatever sources where used to generate the patched version of Linux).
This is used if you want to "make patches" to port to a different
version of Linux. 

The sparse directory contains the xen-modified source-code, which is
"merged" with pristine to create the patched source-code. 

Linux-2.6.19.29-xen is another version of ...-xenU and ...-xen0 which is
a "universal variant". The xenU and xen0 versions are "stripped down" to
make them as small as possible, but you have TWO of them. The -xen
version is a unified version which contains drivers and code for both
DomU and Dom0 usage, and thus you can have ONE kernel to install
everywhere. [Don't worry, the security of Dom0 and DomU is managed by
the Xen hypervisor anyways - it's just a case of "if you know it's going
to be DomU, don't put the code that it can't use in there" (and likewise
for Dom0 not being able to use some code needed in DomU)]. 

The xen directory contains the hypervisor itself. 

> 
> What exactly does the other directories signify?
> 
> 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?

Depends on what you want to achieve... Understanding ALL of Xen is a LOT
of effort. Understanding enough to be able to do what you need to do may
be a lot less. What is the target of your "studying the code"?
> 
> 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
> 
> 
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Structure of the Xen source code
  2007-02-19 14:31 Structure of the Xen source code Pradeep Singh, TLS-Chennai
  2007-02-19 14:49 ` Petersson, Mats
@ 2007-02-19 15:17 ` Daniel Stodden
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Stodden @ 2007-02-19 15:17 UTC (permalink / raw)
  To: Xen Developers


[-- Attachment #1.1: Type: text/plain, Size: 3585 bytes --]

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

hi.

> 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-2.6.16.29

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

> 3. linux-2.6.16.29-xen

the hybrid kernel. see ./README

> 4. ref-linux-2.6.16.29

pristine, patched up to hold xen subarches.

> 5. linux-2.6.16.29-xen0

dom0 source + build

> 6. linux-2.6.16.29-xenU

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
yet.

> 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-2.6.16.29-xen0 directory and that
> of patched xen domU in linux-2.6.16.29-xen0.
> 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?

docs/
	obvious.

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

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

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

extra/mini-os
	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
> 
regards,
daniel

-- 
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@cs.tum.edu
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Structure of the Xen source code
       [not found]   ` <66E8AEE9980BB44CA5FCAD39EBA56AC67EDF3C@CHN-HCLT-EVS02.HCLT.CORP.HCL.IN>
@ 2007-02-20  3:40     ` Pradeep Singh, TLS-Chennai
  2007-02-20 10:08       ` Petersson, Mats
  0 siblings, 1 reply; 6+ messages in thread
From: Pradeep Singh, TLS-Chennai @ 2007-02-20  3:40 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/html, Size: 5042 bytes --]

[-- Attachment #2: Type: text/plain, Size: 983 bytes --]

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Structure of the Xen source code
  2007-02-20  3:40     ` Pradeep Singh, TLS-Chennai
@ 2007-02-20 10:08       ` Petersson, Mats
  2007-02-20 10:22         ` Pradeep Singh, TLS-Chennai
  0 siblings, 1 reply; 6+ messages in thread
From: Petersson, Mats @ 2007-02-20 10:08 UTC (permalink / raw)
  To: Pradeep Singh, TLS-Chennai, xen-devel

> Depends on what you want to achieve... Understanding ALL of 
> Xen is a LOT
> of effort. Understanding enough to be able to do what you 
> need to do may
> be a lot less. What is the target of your "studying the code"?
> 
> Target to understand how exactly Xen is booted and initialized.

Boot consists of:
Grub loads and decompresses Xen.gz + Linux-kernel [+ optional ramdisk +
optional security features]

It then jumps to the entry-point in xen.gz, which will do some
initialization before it jumps to the entry point of the Linux kernel
(Dom0 or "host"). 

> On second thought this is what i understood from my study.
> Xen binary sits with the patched xen dom0 kernel above hardware.
> Am i right?

Yes, that's pretty much it. 
> 
> When we say Xen binary i.e the first line of the Xen entry in 
> Grub(e.g xen.gz), this is different from the patched dom0 
> kernel, right?

Yes, those are two different binaries, with different purposes. Xen.gz
is the hypervisor, the linux kernel is a (modified) Linux operating
system kernel. The hypervisor is used by all guests (in this case Dom0
is also considered a guest, it's just a "special" guest). 

> 
> I look at this as
> 
> xen.gz -> hypervisor
Yes. 
> linux.2.6.x.-xen.dom0 -> patched host kernel
Yes. 
> linux.2.6.x-xen.domU -> patched/unpatched guest kernel we 
> want to boot.
If it's an "unpatched kernel" then it's not supplied in the source-code
of Xen. Unpatced kernels come from the guest-OS install CD (or similar).


As Daniel Stodden explained, there are also tools and other directorys
with "parts of Xen", including a documentation directory. 

--
Mats

> 
> Please CMIIW.
> 
> TIA
> Pradeep
> 
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Structure of the Xen source code
  2007-02-20 10:08       ` Petersson, Mats
@ 2007-02-20 10:22         ` Pradeep Singh, TLS-Chennai
  0 siblings, 0 replies; 6+ messages in thread
From: Pradeep Singh, TLS-Chennai @ 2007-02-20 10:22 UTC (permalink / raw)
  To: Petersson, Mats, xen-devel

[-- Attachment #1: Type: text/html, Size: 2710 bytes --]

[-- Attachment #2: Type: text/plain, Size: 984 bytes --]

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-20 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 14:31 Structure of the Xen source code Pradeep Singh, TLS-Chennai
2007-02-19 14:49 ` Petersson, Mats
     [not found]   ` <66E8AEE9980BB44CA5FCAD39EBA56AC67EDF3C@CHN-HCLT-EVS02.HCLT.CORP.HCL.IN>
2007-02-20  3:40     ` Pradeep Singh, TLS-Chennai
2007-02-20 10:08       ` Petersson, Mats
2007-02-20 10:22         ` Pradeep Singh, TLS-Chennai
2007-02-19 15:17 ` Daniel Stodden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.