qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] (bisected): Is mips-user broken on 64bit host since v1.


From: Alexander Graf
Subject: Re: [Qemu-devel] (bisected): Is mips-user broken on 64bit host since v1.1?
Date: Tue, 18 Dec 2012 22:33:23 +0100

On 18.12.2012, at 20:05, Michael Tokarev wrote:

> On 18.12.2012 20:10, Michael Tokarev wrote:
>> Since at least 1.1 version of qemu, I can't run any
>> mips binary using statically linked qemu-mips on x86_64
>> host.  It immediately fails with SIGSEGV:
>> 
>> # chroot mipsroot /bin/bash
>> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
>> 
>> mipsroot/bin/bash: ELF 32-bit MSB executable, MIPS, MIPS-II version 1 (SYSV),
>> dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
>> BuildID[sha1]=0xeb1a3595d733e28f4f081beabb1f135bc5bf7527,
>> with unknown capability 0x41000000 = 0xf676e75,
>> with unknown capability 0x10000 = 0x70401,
>> stripped
>> 
>> (this is current Debian install of mips architecture).
>> 
>> At the same time, 32bit qemu-mips works just fine:
>> 
>> 
>> # cp -p /usr/bin/qemu-mips-static-32 mipsroot/usr/bin/
>> # chroot mipsroot /bin/bash
>> I have no address@hidden:/# ls
>> bin   dev  home  lib64       proc  run   selinux  tmp  var
>> boot  etc  lib        mnt    root  sbin  sys      usr
>> I have no address@hidden:/# uname -a
>> Linux gandalf 3.2.0-amd64 #3.2.30 SMP Thu Sep 20 18:50:45 MSK 2012 mips 
>> GNU/Linux
>> 
>> Current qemu git behaves the same - it also segfaults
>> when trying to run a 32bit mips binary from x86_64
>> host qemu-mips binary.
>> 
>> There are numerous bugreports about this issue on Debian
>> as well.
>> 
>> Is it just Debian, or is something really broken there?
>> I'd think that running 32bit mips code on x86_64 host
>> is quite common, no?
> 
> This is broken (bisected to) since
> 
> commit 288e65b9eea0c9b3cbe21be46f3e24e4e8b2a090
> Author: Alexander Graf <address@hidden>
> Date:   Wed Dec 14 00:33:28 2011 +0100
> 
>    linux-user: reserve 4GB of vmem for 32-on-64
> 
>    When running 32-on-64 bit guests, we should always reserve as much
>    virtual memory as we possibly can for the guest process, so it can
>    never overlap with QEMU address space.
> 
>    Fortunately we already have the infrastructure for that. All that's
>    missing is some sane default value to also make use of it!
> 
>    Signed-off-by: Alexander Graf <address@hidden>
>    Signed-off-by: Riku Voipio <address@hidden>
> 
> (Cc'ing).
> 
> Reverting this commit on top of qemu-1.1, 1.2 or 1.3 makes
> it work again.

Do you know exactly why it breaks mips?


Alex

> 
> This commit has been applied in the middle between 1.0 and 1.1
> versions of qemu.  It is interesting that no one noticed this
> before now, when 1.3 is out already.  Oh well.
> 
> Thanks,
> 
> /mjt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]