From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Ian.Jackson@eu.citrix.com
Subject: Re: [IOEMU][STUBDOM] build fixes
Date: Tue, 19 Jan 2010 10:25:10 +0100 [thread overview]
Message-ID: <201001191025.10908.Christoph.Egger@amd.com> (raw)
In-Reply-To: <20100118111105.GN5233@const.bordeaux.inria.fr>
[-- Attachment #1: Type: text/plain, Size: 3683 bytes --]
On Monday 18 January 2010 12:11:05 Samuel Thibault wrote:
> Christoph Egger, le Mon 18 Jan 2010 11:42:43 +0100, a écrit :
> > --- a/Makefile.target
> > +++ b/Makefile.target
> > +ifdef CONFIG_STUBDOM
> > +CFLAGS += -I$(MINI_OS-ROOT)/include
> > +endif
>
> Isn't that already done by the stubdom/ Makefile? Or put another way,
> why is it needed on netbsd when it is not on linux?
To make MiniOS and Stubdom build on NetBSD, I have to restructure the headers.
This work is not yet 100% complete but so far I can tell, with the
restructuring done, you also need it on Linux.
>
> > --- a/block-vbd.c
> > +++ b/block-vbd.c
> > -#include <xenbus.h>
> > -#include <blkfront.h>
> > +#include <mini-os/xenbus.h>
> > +#include <mini-os/blkfront.h>
>
> Such changes are probably a good thing,
They are mandatory to not break the build also on Linux with the restructured
headers.
> please submit them in a separate patch so they can be applied already.
Done. See attachment.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
> > --- a/hw/xen_machine_fv.c
> > +++ b/hw/xen_machine_fv.c
> > @@ -40,8 +40,11 @@
> > +
> > +#ifndef CONFIG_STUBDOM /* defined in <mini-os/x86/os.h> */
> > #define test_bit(bit,map) \
> > (!!((map)[(bit)/BITS_PER_LONG] & (1UL << ((bit)%BITS_PER_LONG))))
> > +#endif
>
> Same question: how is it that it is not needed on linux?
The actual question here is: Why does gcc on Linux not barf about
redeclaration?
> > index 50dfb6b..1a6e445 100644
> > --- a/qemu-common.h
> > +++ b/qemu-common.h
> > @@ -9,6 +9,8 @@
> > +#include "config-host.h"
>
> Why?
To get the right socket declarations and fix loop inclusion of
libc and minios sockets.
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -42,6 +42,7 @@
> > +#include "dma.h"
>
> Why?
Fixes warning about missing prototypes (i.e. for dma_helper_init)
> > --- a/vnc.c
> > +++ b/vnc.c
> > @@ -32,8 +32,8 @@
> > -#ifdef CONFIG_STUBDOM
> > +#if defined(CONFIG_STUBDOM) && defined(__Linux__)
>
> I do not understand these. netfront.h is not linux-specific.
netfront.h belongs to lwip. What is wrong with using libc ?
> > -#ifndef CONFIG_STUBDOM
> > +#if !defined(CONFIG_STUBDOM) || defined(__NetBSD__)
>
> I do not understand these either. Stub domains do _not_ have
> a working SO_REUSEADDR.
Same here: What is wrong with using libc ?
> > index fcf60c3..88f84cd 100755
> > --- a/xen-setup-stubdom
> > +++ b/xen-setup-stubdom
> > @@ -36,7 +36,15 @@ cat <<END >config-host.h.new
> > #define CONFIG_QEMU_SHAREDIR "${SHAREDIR}/xen/qemu"
> > #define HOST_I386 1
> > #define HOST_LONG_BITS 32
> > +#ifdef __Linux__
> > #define HAVE_BYTESWAP_H 1
> > +#endif
> > +#ifdef __NetBSD__
> > +#define _BSD 1
> > +#define HAVE_MACHINE_BSWAP_H 1
> > +#define HAVE_IOVEC 1
> > +#define O_LARGEFILE 0
> > +#endif
>
> I'm not sure about that either. Do you realize that stubdomains are not
> running linux or BSD but MiniOS?
This change is about *building* stubdom on Linux or BSD.
> > @@ -358,5 +358,6 @@ int xenfb_pv_display_init(DisplayState *ds)
> > int xenfb_pv_display_vram(void *data)
> > {
> > vga_vram = data;
> > + return 0;
> > }
>
> Probably better just making it return void.
I don't see the return code anywhere in use. So yes, making it return void is
ok.
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_ioemu_stubdom_include.diff --]
[-- Type: text/x-diff, Size: 983 bytes --]
diff --git a/block-vbd.c b/block-vbd.c
index 56794f6..11ac4d0 100644
--- a/block-vbd.c
+++ b/block-vbd.c
@@ -26,8 +26,8 @@
#include "sys-queue.h"
#include "block_int.h"
#include <assert.h>
-#include <xenbus.h>
-#include <blkfront.h>
+#include <mini-os/xenbus.h>
+#include <mini-os/blkfront.h>
#include <malloc.h>
#include "qemu-char.h"
diff --git a/qemu-lock.h b/qemu-lock.h
index 6778eea..3a01ebe 100644
--- a/qemu-lock.h
+++ b/qemu-lock.h
@@ -34,7 +34,7 @@
#elif defined(CONFIG_STUBDOM)
-#include <spinlock.h>
+#include <mini-os/spinlock.h>
#else
diff --git a/xenfbfront.c b/xenfbfront.c
index ed79cde..ec1f309 100644
--- a/xenfbfront.c
+++ b/xenfbfront.c
@@ -1,9 +1,9 @@
#include <stdint.h>
#include <xen/io/fbif.h>
#include <xen/io/kbdif.h>
-#include <semaphore.h>
-#include <sched.h>
-#include <fbfront.h>
+#include <mini-os/semaphore.h>
+#include <mini-os/sched.h>
+#include <mini-os/fbfront.h>
#include <hw/hw.h>
#include <hw/pc.h>
#include <console.h>
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-01-19 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 10:42 [IOEMU][STUBDOM] build fixes Christoph Egger
2010-01-18 11:11 ` Samuel Thibault
2010-01-19 9:25 ` Christoph Egger [this message]
2010-01-19 9:37 ` Keir Fraser
2010-01-19 10:10 ` Christoph Egger
2010-01-19 12:35 ` Ian Jackson
2010-01-19 10:31 ` Samuel Thibault
2010-01-19 10:32 ` Samuel Thibault
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=201001191025.10908.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--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 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.