Bug 504273

Summary: qemu-system-ppc on ppc host fails with "no opcode defined"
Product: [Fedora] Fedora Reporter: Roman Rakus <rrakus>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwmw2, gcosta, itamar, markmc, plroskin, rjones, tsmetana, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: ppc   
OS: Linux   
Whiteboard:
Fixed In Version: 0.10.5-3.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-19 13:43:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 480594    
Attachments:
Description Flags
patch, extracted from qemu git none

Description Roman Rakus 2009-06-05 11:27:00 UTC
Description of problem:


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

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
2.
3.
  
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 14:23:22 UTC
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:

  target-ppc/translate.c:700:GEN_OPCODE_MARK(start);
  target-ppc/translate.c:8036:GEN_OPCODE_MARK(end);

Comment 2 Pavel Roskin 2009-06-08 01:27:54 UTC
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-08 01:55:07 UTC
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-08 02:25:21 UTC
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 17:26:38 UTC
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 22:09:31 UTC
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 07:38:48 UTC
Okay, very strange - they're the exact same errors you resolved in bug #494075

Comment 8 Roman Rakus 2009-06-10 15:55:17 UTC
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 13:34:54 UTC
qemu-0.10.5-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.5-3.fc11

Comment 10 Fedora Update System 2009-06-19 13:43:19 UTC
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.