Patchwork [14/42] migration: prepare to access s->state outside critical sections

login
register
mail settings
Submitter Paolo Bonzini
Date March 25, 2013, 11:02 a.m.
Message ID <1202297355.13036709.1364209368956.JavaMail.root@redhat.com>
Download mbox | patch
Permalink /patch/230624/
State New
Headers show

Comments

Paolo Bonzini - March 25, 2013, 11:02 a.m.
----- Messaggio originale -----
> Da: "Gerd Hoffmann" <kraxel@redhat.com>
> A: "Stefan Hajnoczi" <stefanha@gmail.com>
> Cc: "Paolo Bonzini" <pbonzini@redhat.com>, "qemu-devel" <qemu-devel@nongnu.org>, "Orit Wasserman"
> <owasserm@redhat.com>, "Juan Quintela" <quintela@redhat.com>
> Inviato: Lunedì, 25 marzo 2013 10:52:36
> Oggetto: Re: [Qemu-devel] [PATCH 14/42] migration: prepare to access s->state outside critical sections
> 
> Hi,
> 
> > http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/566/steps/compile/logs/stdio
> > 
> > The latest RHEL6 mingw gcc is version 4.4 but this buildslave is
> > RHEL6.1 so perhaps it's an older version that is missing the
> > atomics builtins?
> 
> No, it's RHEL-6.4 actually, even though the name suggests otherwise
> (was a bad idea to include the minor rev in the buildslave name ...).

Can you check if this fixes it?


Paolo
Stefan Weil - March 29, 2013, 5:49 p.m.
Am 25.03.2013 12:02, schrieb Paolo Bonzini:
>
> ----- Messaggio originale -----
>> Da: "Gerd Hoffmann" <kraxel@redhat.com>
>> A: "Stefan Hajnoczi" <stefanha@gmail.com>
>> Cc: "Paolo Bonzini" <pbonzini@redhat.com>, "qemu-devel" <qemu-devel@nongnu.org>, "Orit Wasserman"
>> <owasserm@redhat.com>, "Juan Quintela" <quintela@redhat.com>
>> Inviato: Lunedì, 25 marzo 2013 10:52:36
>> Oggetto: Re: [Qemu-devel] [PATCH 14/42] migration: prepare to access s->state outside critical sections
>>
>> Hi,
>>
>>> http://buildbot.b1-systems.de/qemu/builders/default_mingw32/builds/566/steps/compile/logs/stdio
>>>
>>> The latest RHEL6 mingw gcc is version 4.4 but this buildslave is
>>> RHEL6.1 so perhaps it's an older version that is missing the
>>> atomics builtins?
>> No, it's RHEL-6.4 actually, even though the name suggests otherwise
>> (was a bad idea to include the minor rev in the buildslave name ...).
> Can you check if this fixes it?
>
> diff --git a/configure b/configure
> index 46a7594..a324ca5 100755
> --- a/configure
> +++ b/configure
> @@ -931,9 +931,9 @@ case "$cpu" in
>             LDFLAGS="-m64 $LDFLAGS"
>             ;;
>      i386)
> -           QEMU_CFLAGS="-m32 $QEMU_CFLAGS"
> -           LDFLAGS="-m32 $LDFLAGS"
> -           cc_i386='$(CC) -m32'
> +           QEMU_CFLAGS="-m32 -mcpu=i486 $QEMU_CFLAGS"
> +           LDFLAGS="-m32 -mcpu=i486 $LDFLAGS"
> +           cc_i386='$(CC) -m32 -mcpu=i486'
>             ;;
>      x86_64)
>             QEMU_CFLAGS="-m64 $QEMU_CFLAGS"
>
> Paolo

Hi Stefan, hi Paolo,

cross compilation on Debian Squeeze shows the same error.

It is fixed by setting the correct cpu architecture (-march=i686).
As far as I know, gcc 4.4 defaults to -march=i386 which does
not support the atomic operations.

I have sent a patch today - please try it.

Regards,
Stefan

Patch

diff --git a/configure b/configure
index 46a7594..a324ca5 100755
--- a/configure
+++ b/configure
@@ -931,9 +931,9 @@  case "$cpu" in
            LDFLAGS="-m64 $LDFLAGS"
            ;;
     i386)
-           QEMU_CFLAGS="-m32 $QEMU_CFLAGS"
-           LDFLAGS="-m32 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           QEMU_CFLAGS="-m32 -mcpu=i486 $QEMU_CFLAGS"
+           LDFLAGS="-m32 -mcpu=i486 $LDFLAGS"
+           cc_i386='$(CC) -m32 -mcpu=i486'
            ;;
     x86_64)
            QEMU_CFLAGS="-m64 $QEMU_CFLAGS"