04.02.2016 16:50, Michael Tokarev wrote:
> Control: tag -1 + confirmed
> 
> 04.02.2016 15:58, Daniel Stender wrote:
>> Package: qemu-user-static
>> Version: 1:2.5+dfsg-5
>> Severity: normal
>>
>> Hi,
>>
>> something's going on here creating a fresh chroot with qemu-user-static:
> ...
>> gpgv: Signature made Thu Feb  4 10:06:57 2016 CET using RSA key ID 46925553
>> gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) 
>> <ftpmas...@debian.org>"
>> gpgv: Signature made Thu Feb  4 10:06:57 2016 CET using RSA key ID 2B90D010
>> gpgv: Good signature from "Debian Archive Automatic Signing Key (8/jessie) 
>> <ftpmas...@debian.org>"
>> Invalid instruction
>> NIP 0000000010007190   LR 0000000010007168 CTR 00000040009f2530 XER 
>> 0000000000000000 CPU#0
>> MSR 8000000002806001 HID0 0000000000000000  HF 0000000002806001 idx 0
>> TB 00002229 9573955373763
> 
> I can confirm this problem exists with current unstable system.  However,
> it doesn't happen with a jessie system (when jessie is in the chroot, not
> unstable).  It happens on testing too, just like on unstable.  So it looks
> like some new instructions are used in testing/unstable which qemu does
> not know about.

Ok, with the help from upstream we found out that qemu is "somewhat right"
here, it is the question of configuration and defaults.

By default, both qemu and gcc5 produce code on ppc64el which will run on
POWER7 platform.  However, in debian gcc build instruction, gcc is explicitly
built to produce code for POWER8 platform, which, obviously has additional
instructions.  One of these instructions is what causes the above, it is
"mtvsrd vs10,r10" in my case.  This instruction does not exist on POWER7
which is emulted by qemu by default, so qemu correctly dies with invalid
instruction.  That's what real POWER7 platform will do if told to execute
this binary.

You can export QEMU_CPU=POWER8 before running debootstrap - it should work
this way, qemu will emulate this and other "new" instructions.

Now the question is what to do.  Qemu upstream is willing to change the
defaults to POWER8 at least.

Thanks,

/mjt

Reply via email to