I got build failure in the qemu-xen-unstable.git tree, and it seems only to happen with newer GCC versions, namely >4.3.0 which supports C99 inline. The offending part is in tools/ioemu-remote/slirp/misc.c: 138: inline void 139: insque (a, b) C99 treats inline differently with GNU89, bare `inline'' (without linkage specifier, i.e. `static'') in C99 is required not to generate standalone copy of the function, which is not desired in slirp code. Other compilation module looks for the function in linking and will not find them. Since `-std=gnu99'' is specified in the global Config.mk, newer GCC version uses C99 inline semantics will encounter problems on building ioemu. It''s most straightforward to remove `inline'' in slirp/misc.c, the code doesn''t really seem to benefit from it. But it looks pretty old and not maintained for sometime. What about patch it locally? Other options include specify `-fgnu89-inline'' (n/a prior to GCC 4.1.3) and overrides slirp compile line with `-std=gnu89'', but may not be preferred. Thanks, Qing _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 10/7/08 10:32, "He, Qing" <qing.he@intel.com> wrote:> It''s most straightforward to remove `inline'' in slirp/misc.c, the code > doesn''t really seem to benefit from it. But it looks pretty old and not > maintained for sometime. What about patch it locally? > > Other options include specify `-fgnu89-inline'' (n/a prior to GCC 4.1.3) > and overrides slirp compile line with `-std=gnu89'', but may not be > preferred.Could we change the ''#define inline'' in slirp_config.h to define it to nothing? None of the usages of ''inline'' in the slirp directory look like a particularly good idea. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2008-Jul-10 09:43 UTC
Re: [Xen-devel] ioemu build failure with GCC > 4.3
On Thu, Jul 10, 2008 at 10:39:31AM +0100, Keir Fraser wrote:> On 10/7/08 10:32, "He, Qing" <qing.he@intel.com> wrote: > > > It''s most straightforward to remove `inline'' in slirp/misc.c, the code > > doesn''t really seem to benefit from it. But it looks pretty old and not > > maintained for sometime. What about patch it locally? > > > > Other options include specify `-fgnu89-inline'' (n/a prior to GCC 4.1.3) > > and overrides slirp compile line with `-std=gnu89'', but may not be > > preferred. > > Could we change the ''#define inline'' in slirp_config.h to define it to > nothing? None of the usages of ''inline'' in the slirp directory look like a > particularly good idea.None of the entire slirp directory looks like a good idea. This code isn''t even used in Xen is it ? My vote would be disabling compilation of entire slirp directory for Xen. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange writes ("Re: [Xen-devel] ioemu build failure with GCC > 4.3"):> None of the entire slirp directory looks like a good idea. This code > isn''t even used in Xen is it ? My vote would be disabling compilation > of entire slirp directory for Xen.This is the right answer, yes. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
iwj writes ("Re: [Xen-devel] ioemu build failure with GCC > 4.3"):> Daniel P. Berrange writes ("Re: [Xen-devel] ioemu build failure with GCC > 4.3"): > > None of the entire slirp directory looks like a good idea. This code > > isn''t even used in Xen is it ? My vote would be disabling compilation > > of entire slirp directory for Xen. > > This is the right answer, yes.I''ve done this now. Ian. commit 29c20f126f298cf2162169b4bbb8206860f11240 Author: Ian Jackson <iwj@mariner.uk.xensource.com> Date: Thu Jul 10 10:48:51 2008 +0100 Disable slirp. The slirp system is not really a very nice idea, especially not in a Xen context. Also, the code misuses inline and does not compile on GCC >4.3ish. Thanks to Qing He <qing.he@intel.com> for the report. diff --git a/xen-setup b/xen-setup index c00122c..755b9ec 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,7 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-curses "$@" --prefix=/usr +./configure --disable-curses --disable-slirp "$@" --prefix=/usr target=i386-dm _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I think the patch also needs "--disable-gcc-check" Thanks Ross -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Ian Jackson Sent: Thursday, July 10, 2008 5:50 AM To: Daniel P. Berrange; Keir Fraser; He, Qing; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] ioemu build failure with GCC > 4.3 iwj writes ("Re: [Xen-devel] ioemu build failure with GCC > 4.3"):> Daniel P. Berrange writes ("Re: [Xen-devel] ioemu build failure withGCC > 4.3"):> > None of the entire slirp directory looks like a good idea. This code > > isn''t even used in Xen is it ? My vote would be disablingcompilation> > of entire slirp directory for Xen. > > This is the right answer, yes.I''ve done this now. Ian. commit 29c20f126f298cf2162169b4bbb8206860f11240 Author: Ian Jackson <iwj@mariner.uk.xensource.com> Date: Thu Jul 10 10:48:51 2008 +0100 Disable slirp. The slirp system is not really a very nice idea, especially not in a Xen context. Also, the code misuses inline and does not compile on GCC >4.3ish. Thanks to Qing He <qing.he@intel.com> for the report. diff --git a/xen-setup b/xen-setup index c00122c..755b9ec 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,7 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-curses "$@" --prefix=/usr +./configure --disable-curses --disable-slirp "$@" --prefix=/usr target=i386-dm _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC > 4.3"):> I think the patch also needs "--disable-gcc-check"I don''t have such a late gcc4 here to hand so you may well be right. However --disable-gcc-check seems to be broken right now: ./configure: line 1244: test: too many arguments ./configure: line 1244: test: too many arguments I''ll look into this. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Not sure why you get an error. I have gcc 4.3 and I added it in ioemu-remote/xen-setup as in: ./configure --disable-gcc-check --disable-slirp --disable-ncurses blah blah Xen tools built to completion after I added it. Thanks Ross -----Original Message----- From: Ian Jackson Sent: Thursday, July 10, 2008 10:07 AM To: Ross Philipson Cc: Daniel P. Berrange; Keir Fraser; He, Qing; xen-devel@lists.xensource.com Subject: RE: [Xen-devel] ioemu build failure with GCC > 4.3 Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC > 4.3"):> I think the patch also needs "--disable-gcc-check"I don''t have such a late gcc4 here to hand so you may well be right. However --disable-gcc-check seems to be broken right now: ./configure: line 1244: test: too many arguments ./configure: line 1244: test: too many arguments I''ll look into this. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC > 4.3"):> Not sure why you get an error. I have gcc 4.3 and I added it in > ioemu-remote/xen-setup as in: > > ./configure --disable-gcc-check --disable-slirp --disable-ncurses blah > blah > > Xen tools built to completion after I added it.Can you produce a log of your build ? I saw what you see below. It did exit with status 0 but it appears always to print those error messages. This looks like a qemu upstream bug in configure to me. Ian. mariner:qemu-iwj.git> ./xen-setup Install prefix /usr BIOS directory /usr/share/qemu binary directory /usr/bin Manual directory /usr/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /u/iwj/work/qemu-iwj.git C compiler gcc Host C compiler gcc ARCH_CFLAGS -m32 make make install install host CPU i386 host big endian no target list i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user gprof enabled no profiler no static build no -Werror enabled no SDL support yes SDL static link yes OpenGL support yes curses support no mingw32 support no Adlib support no AC97 support no GUS support no CoreAudio support no ALSA support no EsounD support no DSound support no FMOD support no OSS support yes VNC TLS support yes TLS CFLAGS TLS LIBS -lgnutls kqemu support yes brlapi support no Documentation yes ./configure: line 1244: test: too many arguments ./configure: line 1244: test: too many arguments emariner:qemu-iwj.git> echo $? 0 mariner:qemu-iwj.git> git-diff | cat diff --git a/xen-setup b/xen-setup index 755b9ec..67f038d 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,7 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-curses --disable-slirp "$@" --prefix=/usr +./configure --disable-curses --disable-slirp --disable-gcc-check "$@" --prefix=/usr target=i386-dm mariner:qemu-iwj.git> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson schreef:> Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC > 4.3"): >> Not sure why you get an error. I have gcc 4.3 and I added it in >> ioemu-remote/xen-setup as in: >> >> ./configure --disable-gcc-check --disable-slirp --disable-ncurses blah >> blah >> >> Xen tools built to completion after I added it.Could you also tell us/me if you were able to boot a kernel compiled with GCC > 4.3 and Xen? Stefan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
prashanth.mundkur@citrix.com
2008-Jul-14 16:56 UTC
Re: [Xen-devel] ioemu build failure with GCC > 4.3
On Mon, Jul 14, 2008 at 04:12:29PM +0100, Ian Jackson wrote:> Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC > 4.3"): > > Not sure why you get an error. I have gcc 4.3 and I added it in > > ioemu-remote/xen-setup as in: > > > > ./configure --disable-gcc-check --disable-slirp --disable-ncurses blah > > blah > > > > Xen tools built to completion after I added it. > > Can you produce a log of your build ? I saw what you see below. It > did exit with status 0 but it appears always to print those error > messages. > > This looks like a qemu upstream bug in configure to me.I think bug is triggered if gcc3 is not installed on the system. Is it possible that Ross doesn''t see it because he has both gcc3 and gcc4 installed? Here''s how I fixed my build: diff --git a/configure b/configure index 2366aa6..0ef2540 100755 --- a/configure +++ b/configure @@ -1241,11 +1241,16 @@ case "$target_cpu" in fi echo "#define CONFIG_DYNGEN_OP 1" >> $config_h gcc3minver=`$cc --version 2> /dev/null| fgrep "(GCC) 3." | awk ''{ print $3 }'' | cut -f2 -d.` - if test -n "$gcc3minver" -a $gcc3minver -gt 3 + if test -n "$gcc3minver" then - echo "HAVE_GT_GCC_3_3=true" >> $config_mak + if test -a $gcc3minver -gt 3; + then + echo "HAVE_GT_GCC_3_3=true" >> $config_mak + else + echo "HAVE_GT_GCC_3_3=false" >> $config_mak + fi else - echo "HAVE_GT_GCC_3_3=false" >> $config_mak + echo "HAVE_GT_GCC_3_3=true" >> $config_mak fi ;; x86_64) diff --git a/xen-setup b/xen-setup index 755b9ec..b0eda89 100755 --- a/xen-setup +++ b/xen-setup @@ -9,7 +9,7 @@ rm -f config-host.mak if test -f config-host.h; then mv config-host.h config-host.h~; fi -./configure --disable-curses --disable-slirp "$@" --prefix=/usr +./configure --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr target=i386-dm --prashanth _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
This is in answer to both this question and Ian''s earlier request for the build output on my system. Attached is the build output both with and without the --disable-gcc-check being used. I see the "too many arguments" message but earlier in the build output. The build seems to run to completion. I have gcc 4.3 but no gcc 3.x. The answer to the question in this email is, no I cannot boot. Xen crashes early on with an assertion. The serial output from Xen is in the attached file also. I am unfortunately engaged in some other priority work and I was just trying to get the latest Xen going on another machine as an aside task. I have not spent a great deal of time looking into it. Thanks Ross -----Original Message----- From: Stefan de Konink [mailto:skinkie@xs4all.nl] Sent: Monday, July 14, 2008 11:21 AM To: Ian Jackson Cc: Ross Philipson; xen-devel@lists.xensource.com; Daniel P. Berrange; Keir Fraser; He, Qing Subject: Re: [Xen-devel] ioemu build failure with GCC > 4.3 Ian Jackson schreef:> Ross Philipson writes ("RE: [Xen-devel] ioemu build failure with GCC >4.3"):>> Not sure why you get an error. I have gcc 4.3 and I added it in >> ioemu-remote/xen-setup as in: >> >> ./configure --disable-gcc-check --disable-slirp --disable-ncursesblah>> blah >> >> Xen tools built to completion after I added it.Could you also tell us/me if you were able to boot a kernel compiled with GCC > 4.3 and Xen? Stefan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 15/7/08 14:55, "Ross Philipson" <Ross.Philipson@citrix.com> wrote:> The answer to the question in this email is, no I cannot boot. Xen > crashes early on with an assertion. The serial output from Xen is in the > attached file also. > > I am unfortunately engaged in some other priority work and I was just > trying to get the latest Xen going on another machine as an aside task. > I have not spent a great deal of time looking into it.The crash is during VT-d initialisation. Another argument for disabling VT-d by default in Xen 3.3. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Roger that, when I disable VT-d in the BIOS, I can boot up fine. Ross -----Original Message----- From: Keir Fraser Sent: Tuesday, July 15, 2008 10:06 AM To: Ross Philipson; Stefan de Konink; Ian Jackson Cc: xen-devel@lists.xensource.com; Daniel P. Berrange; He, Qing Subject: Re: [Xen-devel] ioemu build failure with GCC > 4.3 On 15/7/08 14:55, "Ross Philipson" <Ross.Philipson@citrix.com> wrote:> The answer to the question in this email is, no I cannot boot. Xen > crashes early on with an assertion. The serial output from Xen is inthe> attached file also. > > I am unfortunately engaged in some other priority work and I was just > trying to get the latest Xen going on another machine as an asidetask.> I have not spent a great deal of time looking into it.The crash is during VT-d initialisation. Another argument for disabling VT-d by default in Xen 3.3. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Espen Skoglund
2008-Jul-15 18:33 UTC
[PATCH] RE: [Xen-devel] ioemu build failure with GCC > 4.3
[Ross Philipson]> Roger that, when I disable VT-d in the BIOS, I can boot up fine. > Ross> -----Original Message----- > From: Keir Fraser > Sent: Tuesday, July 15, 2008 10:06 AM > To: Ross Philipson; Stefan de Konink; Ian Jackson > Cc: xen-devel@lists.xensource.com; Daniel P. Berrange; He, Qing > Subject: Re: [Xen-devel] ioemu build failure with GCC > 4.3> On 15/7/08 14:55, "Ross Philipson" <Ross.Philipson@citrix.com> wrote:>> The answer to the question in this email is, no I cannot boot. Xen >> crashes early on with an assertion. The serial output from Xen is >> in the attached file also. >> >> I am unfortunately engaged in some other priority work and I was >> just trying to get the latest Xen going on another machine as an >> aside task. I have not spent a great deal of time looking into it.> The crash is during VT-d initialisation. Another argument for > disabling VT-d by default in Xen 3.3.Actually, one should never try to dump the VT-d tables from the DMA fault interrupt handler since, well, it''s in an interrupt handler and this assertion will always be triggered (on x86_32). eSk --- vt-d: Disable VT-d table output on DMA page faults Printing VT-d tables requires map_domain_page() which can not be called from interrupt context (on x86_32). Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com> diff -r 1f88a5d4ab95 xen/drivers/passthrough/vtd/iommu.c --- a/xen/drivers/passthrough/vtd/iommu.c Tue Jul 15 18:27:59 2008 +0100 +++ b/xen/drivers/passthrough/vtd/iommu.c Tue Jul 15 19:22:23 2008 +0100 @@ -719,9 +719,11 @@ static int iommu_page_fault_do_one(struc PCI_SLOT(source_id & 0xFF), PCI_FUNC(source_id & 0xFF), addr, fault_reason, iommu->reg); +#if 0 if ( fault_reason < 0x20 ) print_vtd_entries(iommu, (source_id >> 8), (source_id & 0xff), (addr >> PAGE_SHIFT)); +#endif return 0; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
[Ross Philipson]> Roger that, when I disable VT-d in the BIOS, I can boot up fine.According to your logs it''s an "interesting" set of ACPI tables you''ve got there. From what I can tell it looks like a USB controller or something is performing bus transactions to a bogus address in host memory. Needless to say, this should (in an ideal world) not be happening. To determine if there is a serious problem it would be helpful if you could try a bootup with the following patch applied. An `lspci -t` and `lspci` would also be appreciated. eSk --- vt-d: Some debug output for ACPI DMAR parsing Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com> diff -r a9c595d1909c xen/drivers/passthrough/vtd/dmar.c --- a/xen/drivers/passthrough/vtd/dmar.c Tue Jul 15 19:22:23 2008 +0100 +++ b/xen/drivers/passthrough/vtd/dmar.c Tue Jul 15 19:28:54 2008 +0100 @@ -337,6 +337,8 @@ acpi_parse_one_rmrr(struct acpi_dmar_ent dev_scope_end = ((void *)rmrr) + header->length; ret = acpi_parse_dev_scope(dev_scope_start, dev_scope_end, rmrru, RMRR_TYPE); + dprintk(XENLOG_INFO VTDPREFIX, "RMRR region <%"PRIx64",%"PRIx64">\n", + rmrru->base_address, rmrru->end_address); if ( ret || (rmrru->scope.devices_cnt == 0) ) xfree(rmrru); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel