Bug 504273 - qemu-system-ppc on ppc host fails with "no opcode defined"
qemu-system-ppc on ppc host fails with "no opcode defined"
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
ppc Linux
low Severity medium
: ---
: ---
Assigned To: Glauber Costa
Fedora Extras Quality Assurance
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
Reported: 2009-06-05 07:27 EDT by Roman Rakus
Modified: 2014-01-12 19:09 EST (History)
8 users (show)

See Also:
Fixed In Version: 0.10.5-3.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-19 09:43:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch, extracted from qemu git (1.36 KB, patch)
2009-06-07 21:55 EDT, Pavel Roskin
no flags Details | Diff

  None (edit)
Description Roman Rakus 2009-06-05 07:27:00 EDT
Description of problem:

Version-Release number of selected component (if applicable):
[rrakus@localhost ~]$ rpm -q openbios-ppc

How reproducible:

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
Actual results:
*** 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

Expected results:

Additional info:
Should be similar to bug #494075, but on ppc machine
Comment 1 Mark McLoughlin 2009-06-05 10:23:22 EDT
Thanks Roman

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 <.romentry>:
  fffffffc:       4b f0 23 7d     bl      0xfff02378

  Thus, 4b f0 23 7d is a valid instruction, but qemu-system-ppc fails to
  interpret it.

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:

Comment 2 Pavel Roskin 2009-06-07 21:27:54 EDT
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.
Comment 3 Pavel Roskin 2009-06-07 21:55:07 EDT
Created attachment 346798 [details]
patch, extracted from qemu git

This patch helps with the "WARNING".  The invalid opcodes remain.
Comment 4 Pavel Roskin 2009-06-07 22:25:21 EDT
The current git version of qemu is booting to the openbios prompt.  So there might be another ppc fix to be backported.
Comment 5 Mark McLoughlin 2009-06-08 13:26:38 EDT
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 ?
Comment 6 Pavel Roskin 2009-06-08 18:09:31 EDT
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.
Comment 7 Mark McLoughlin 2009-06-09 03:38:48 EDT
Okay, very strange - they're the exact same errors you resolved in bug #494075
Comment 8 Roman Rakus 2009-06-10 11:55:17 EDT
No I have updated to qemu-system-ppc-0.10.50-5.kvm86.fc12.ppc and problem is away...
Comment 9 Fedora Update System 2009-06-17 09:34:54 EDT
qemu-0.10.5-3.fc11 has been submitted as an update for Fedora 11.
Comment 10 Fedora Update System 2009-06-19 09:43:19 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.