[PATCH] preprocessor issue in qemu/patch-block-raw-posix.c (was: qemu svn r5281 on FreeBSD - slow usb, vmwarevga, screen updates... (now updated to r5313))

Juergen Lock nox at jelal.kn-bremen.de
Thu Sep 25 20:26:07 UTC 2008


On Thu, Sep 25, 2008 at 12:10:39AM +0200, Juergen Lock wrote:
> In article <cd6b4a5b0809230639x27e94477k315796c2cfb650f2 at mail.gmail.com> you write:
> >On Sun, Sep 21, 2008 at 3:40 PM, Juergen Lock <nox at jelal.kn-bremen.de> wrote:
> >> Hi!
> >>
> >>  I've been playing with qemu svn on FreeBSD again (new experimental
> >> emulators/qemu-devel port update here:
> >>        http://people.freebsd.org/~nox/qemu/qemu-devel-20080921.patch
> >> ), and want to note a few things:
> >
> >Hi.  I've built an updated port with your patch and it compiles fine
> >and runs my WinXP guests well.  But, the qemu process consumes 100% of
> >one CPU core on the host the whole time it is running, regardless of
> >what the guest is doing.  The host is a 7-STABLE box from 8/19.  The
> >guests run with bridged networking and full kernel kqemu accel
> >enabled.
> >
> Hmm.  And you didn't see this with the version in ports?  Have you
> checked if this is related to kqemu? (try without -kernel-kqemu and
> also with -no-kqemu.)  Also, which threading libs and scheduler are you
> using?  There seems to be an issue with kse, tho I doubt you are using
> that on 7-stable...
> 
>  Here is another experimental update that forces -lthr on 6.x, and
> also updates to qemu svn r5313:
> 	http://people.freebsd.org/~nox/qemu/qemu-devel-20080924.patch

I forgot to note that this also needed the following patch:

Index: qemu/block-raw-posix.c
@@ -545,7 +545,8 @@
 
     qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, posix_aio_flush, s);
 
-#if defined(__linux__) && defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 4)
+#if defined(__linux__) && defined(__GLIBC_PREREQ)
+#if !__GLIBC_PREREQ(2, 4)
     {
         /* XXX: aio thread exit seems to hang on RedHat 9 and this init
            seems to fix the problem. */
@@ -557,6 +558,7 @@
         aio_init(&ai);
     }
 #endif
+#endif
     posix_aio_state = s;
 
     return 0;

Signed-off-by: Juergen Lock <nox at jelal.kn-bremen.de>


More information about the freebsd-emulation mailing list