Red Hat Bugzilla – Bug 504273
qemu-system-ppc on ppc host fails with "no opcode defined"
Last modified: 2014-01-12 19:09:09 EST
Description of problem:
Version-Release number of selected component (if applicable):
[rrakus@localhost ~]$ rpm -q openbios-ppc
Steps to Reproduce:
1. qemu-system-ppc -boot d -m 256 -hda rhel-5 -cdrom RHEL5.3-Server-20090106.0-ppc-DVD.iso -M prep
*** WARNING: no opcode defined !
invalid/unsupported opcode: 12 - 02 - 18 (4bfffe05) fffffffc 0
invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000700 0
Showing black screen.
qemu-system-ppc eating 95+% of CPU
Should be similar to bug #494075, but on ppc machine
I assume this is qemu-system-ppc-0.10.5-2.fc11.ppc ?
Quoting what Pavel said in bug #494075:
Note that the "WARNING" is absent on x86_64. I believe it means that no
opcodes are known to the emulator. The invalid opcode is found at the
position 0xfffffffc, which is the start address for PowerPC. It comes from
the .romentry section.
Disassembling openbios-ppc with objdump gives:
fffffffc: 4b f0 23 7d bl 0xfff02378
Thus, 4b f0 23 7d is a valid instruction, but qemu-system-ppc fails to
Could you try debugging target-ppc/translate_init.c:create_ppc_opcodes() ? it should be filling the opcode table. Note opc_start and opc_end come from these macros:
I can reproduce the problem on qemu 0.10.5 without any Fedora patches. However, the problem (the "WARNING" line) goes away if I compile ppc-softmmu/translate.c without optimization. Still, qemu reports invalid opcodes:
$ ppc-softmmu/qemu-system-ppc -cdrom /dev/null
invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1
invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0
The same happens with real ISO images as well. The same happens if the whole source is compiled without optimization.
Created attachment 346798 [details]
patch, extracted from qemu git
This patch helps with the "WARNING". The invalid opcodes remain.
The current git version of qemu is booting to the openbios prompt. So there might be another ppc fix to be backported.
Thanks Pavel - we'll pull that patch into the next F-11 update
(In reply to comment #2)
> $ ppc-softmmu/qemu-system-ppc -cdrom /dev/null
> invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1
> invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0
Hmm, is this using the openbios-ppc from qemu.git ? Maybe try with -L /usr/share/qemu ?
No, it's qemu 0.10.5 compiled without optimization. I copied the openbios files to the directory where qemu was looking for them, so it shouldn't be an issue.
Okay, very strange - they're the exact same errors you resolved in bug #494075
No I have updated to qemu-system-ppc-0.10.50-5.kvm86.fc12.ppc and problem is away...
qemu-0.10.5-3.fc11 has been submitted as an update for Fedora 11.
qemu-0.10.5-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.