Subject: Re: bouyer-xenamd64 merge (xen roadmap)
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 11/19/2007 12:05:09
On Monday 19 November 2007 11:42:44 Manuel Bouyer wrote:
> On Mon, Nov 19, 2007 at 11:38:17AM +0100, Christoph Egger wrote:
> > On Monday 19 November 2007 11:22:14 Manuel Bouyer wrote:
> > > On Mon, Nov 19, 2007 at 10:39:04AM +0100, Christoph Egger wrote:
> > > > On Monday 19 November 2007 09:47:05 Petar Bogdanovic wrote:
> > > > > On Sat, Nov 17, 2007 at 09:15:47PM +0000, Alistair Crooks wrote:
> > > > > > On Sat, Nov 17, 2007 at 06:21:12PM +0100, Manuel Bouyer wrote:
> > > > > > > Hi,
> > > > > > > bouyer-xenamd64 is now in quite good shape: a amd64 domU kernel
> > > > > > > runs stable, and a dom0 kernel boots and can start a domU (I've
> > > > > > > still a bug to track down which cause dom0 to panic under
> > > > > > > paging activity when there are domUs running , but it shouldn't
> > > > > > > be too hard to track down). The remaining item I want to do
> > > > > > > before merging to HEAD is investigate whenever it's possible to
> > > > > > > use the new config(5) ifdef blocks to merge back\
> > > > > > > arch/xenamd64/conf to arch/amd64/conf and get rid of
> > > > > > > arch/xenamd64 entirely. If it's possible some files would have
> > > > > > > to move, but nothing much should change in C files.
> > > >
> > > > @Manuel:
> > > > How about moving the files from arch/xenamd64/ to arch/xen/amd64/ 
> > > > and placing files.xen_x86 in arch/xen/x86/, files.xen_xen in
> > > > arch/xen/xen/, files.xen_i386 in arch/xen/i386 and files.xen_amd64 in
> > > > arch/xen/amd64/ and so on and so forth. This should allow you to
> > > > share a lot of entries for xen-i386 and xen-amd64.
> > >
> > > It's not that easy, because of the way config(8) works. It wants
> > > arch/<machine>/conf/... This is what needs to be looked at carefully.
> >
> > That's right. But you can include files.* from other files.*
> >
> > So you can reduce the content of arch/xen/conf/files.xen down to:
> >
> > include ../i386/files.xen_i386
> > include ../x86/files.xen_x86
> > include ../xen/files.xen_xen
> > include ../xenbus/files.xen_xenbus
> >
> > Analogous the files.xenamd64 looks like this:
> >
> > include ../../xen/amd64/files.xen_amd64
> > include ../../xen/x86/files.xen_x86
> > include ../../xen/xen/files.xen_xen
> > include ../../xenbus/files.xen_xenbus
> >
> > This is just out of my head. So I'm not sure, if the path
> > is correct, but you should get the idea now.
>
> Yes, of course. But that won't get rid of the arch/xenamd64 directory.
> I want to see if I can make it completely go away.

That's right. But this a) brings you closer to this and b) reduces
maintenance effort for keeping xen-i386 and xen-amd64 independent
entries in sync.

> > > > Then what about arch/xenamd64/include/hypercalls.h ? It looks to be
> > > > completely unused to me.
> > >
> > > It's included from xen/include/hypervisor.h.
> >
> > How much is it functionally different from xen/include/hypercalls.h ?
>
> It's assembly. One is for i386, the other for amd64.

Oh, right. In the longterm we should have a subdirectory for
each supported arch:

xen/include/i386
xen/include/amd64

and the headers in xen/include have this pattern:

#ifdef __i386__
#include <xen/i386/header.h>
#endif
#ifdef __x86-64__
#include <xen/amd64/header.h>
#endif

In the c-files you continue doing this:

#include <xen/header.h>

Christoph