xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Andrew Lyon <andrew.lyon@gmail.com>
Cc: Guillaume Rousse <Guillaume.Rousse@inria.fr>,
	xen-devel@lists.xensource.com
Subject: Re: status of PV drivers in Xen 4.0
Date: Mon, 12 Apr 2010 19:51:32 +0300	[thread overview]
Message-ID: <20100412165132.GC1878@reaktio.net> (raw)
In-Reply-To: <s2qf4527be1004120905lc38f7b21o8ca104a01cfd006f@mail.gmail.com>

On Mon, Apr 12, 2010 at 05:05:37PM +0100, Andrew Lyon wrote:
> >
> >> The unmodified_drivers build process is designed to work with a
> >> separate kernel "objects" folder, so instead of configuring and
> >> compiling your kernel in-place you need to do something like this,
> >> note that while this step uses a xenified kernel you should not enable
> >> Xen in the processor type options, configure the kernel as you would
> >> for the hvm guest.
> >>
> >> cd /usr/src/linux-2.6.31-xen-r14
> >> mkdir ../linux-2.6.31-xen-r14-obj
> >> mv .config ../linux-2.6.31-xen-r14-obj/ (or copy in your usual default
> >> config file)
> >> make mrproper
> >> cd ../linux-2.6.31-xen-r14-obj/
> >> make -C /usr/src/linux-2.6.31-xen-r14 menuconfig
> >> O=/usr/src/linux-2.6.31-xen-r14-obj/
> >> make -C /usr/src/linux-2.6.31-xen-r14 bzImage (or vmlinuz) modules
> >> modules_install O=/usr/src/linux-2.6.31-xen-r14-obj/
> >>
> >> Now change to wherever you put the unmodified_drivers/linux-2.6/:
> >>
> >> export XL=/usr/src/linux-2.6.31-xen-r14
> >> export XEN=/usr/src/linux-2.6.31-xen-r14/include/xen/
> >>
> >> Notice how XEN is set to linux/include/xen ? the Xen documentation
> >> states that it should be set to a folder containing the Xen sources,
> >> I've tried that and it does not work, I think the folder is only used
> >> for header files so they could in theory come from Xen or from a
> >> Xenified kernel, but on openSUSE the kernel include files are used
> >> instead of the Xen ones, and that is the only way that seems to work.
> >>
> >> ./mkbuildtree
> >> Defaulting to this machine's architecture, x86_64, for linking.
> >> This may be overridden on the command line (i386,x86_64,ia64).
> >> Xen tree: /usr/src/linux-2.6.31-xen-r14/include/xen
> >> Linux tree: /usr/src/linux-2.6.31-xen-r14
> >>
> >> You can now compile the drivers:
> >>
> >> make -C /usr/src/linux-2.6.31-xen-r14-obj/ modules M=$PWD
> >>
> >> If you attempt to do the same process without putting the kernel
> >> object files into a separate folder the build will fail, I believe
> >> this is because declarations in the kernel override those in the
> >> unmodified_drivers.
> >>
> >> Likewise the process fails if you try to use a generic kernel source
> >> tree which has not been patched for Xen dom0, in which case the header
> >> files are missing various Xen declarations required for successful
> >> compilation.
> >>
> >> And here is a final proof, Xenified 2.6.31 with all XEN options
> >> disabled, with pv-on-hvm drivers:
> >>
> >> localhost ~ # uname -a
> >> Linux localhost 2.6.31-xen-r14 #2 SMP Mon Apr 12 13:34:27 GMT 2010
> >> x86_64 Intel(R) Xeon(R) CPU E5420 @ 2.50GHz GenuineIntel GNU/Linux
> >> localhost ~ # zgrep XEN /proc/config.gz
> >> # CONFIG_X86_64_XEN is not set
> >> localhost ~ # lsmod
> >> Module                  Size  Used by
> >> xen_vnif               28288  0
> >> xen_balloon            14496  1 xen_vnif
> >> xen_vbd                19084  3
> >> xen_platform_pci       78808  3 xen_vnif,xen_balloon,xen_vbd,[permanent]
> >>
> >> I'm not sure where to go next with this but I hope this info is useful.
> >>
> >
> > Congratulations!
> >
> > This is valuable information, thanks for going through that.
> >
> > Can you reproduce this with Xen 4.0.0 ? ie. does opensuse xen have
> > some patches related to pv-on-hvm drivers?
> 
> I believe SLES11SP1 will have Xen 4.0 but I have been unable to find
> anywhere to download srpms, apparently they are on dvd2 but as it is
> still in beta there are no iso images either, however opensuse factory
> does have a Xen 4.0 srpm:
> 
> http://download.opensuse.org/factory/repo/src-oss/suse/src/xen-4.0.0_20978_01-1.4.src.rpm
> 
> So the same process could be followed using that, I'm going to give it
> a try tomorrow.
> 

Ok.

> >
> > If there are some patches, those should be upstreamed to Xen.
> 
> Hmm, the patches may simply be there to allow building using the
> /usr/src/linux/include/xen headers instead of /usr/src/xen/ , and as
> xensource does not have a newer "classic" kernel than 2.6.18 why would
> they upsteam them.
> 

Actually there is nowadays.. :)

http://xenbits.xen.org/XCP/linux-2.6.27.pq.hg
(The kernel tree used by XCP/XenServer/XCI.)

-- Pasi

  reply	other threads:[~2010-04-12 16:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 21:02 status of PV drivers in Xen 4.0 Guillaume Rousse
2010-03-30  6:04 ` Pasi Kärkkäinen
2010-03-30  7:49   ` Jan Beulich
2010-03-30  7:52     ` Pasi Kärkkäinen
2010-03-30 11:27     ` Guillaume Rousse
2010-03-30 12:10       ` Jan Beulich
2010-03-30  8:17   ` Guillaume Rousse
2010-03-30 10:04     ` Pasi Kärkkäinen
2010-04-05 16:50   ` Guillaume Rousse
2010-04-10 12:31     ` Andrew Lyon
2010-04-10 12:58       ` Pasi Kärkkäinen
2010-04-10 13:17         ` Andrew Lyon
2010-04-12 11:21           ` Pasi Kärkkäinen
2010-04-12 11:27         ` Guillaume Rousse
2010-04-12 15:40           ` Andrew Lyon
2010-04-12 15:50             ` Pasi Kärkkäinen
2010-04-12 16:05               ` Andrew Lyon
2010-04-12 16:51                 ` Pasi Kärkkäinen [this message]
2010-04-20 16:16                 ` Pasi Kärkkäinen
2010-04-20 16:52                   ` Stefano Stabellini
2010-04-20 17:05                     ` Pasi Kärkkäinen
2010-04-20 17:07                       ` Stefano Stabellini
2010-04-13 21:35             ` Guillaume Rousse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100412165132.GC1878@reaktio.net \
    --to=pasik@iki.fi \
    --cc=Guillaume.Rousse@inria.fr \
    --cc=andrew.lyon@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).