Public bug reported:

[impact]

qemu's various architecture-specific emulators expect the pci bus to be
referred to either as 'pci' or 'pci.0', and libvirt must know which to
use.  On trusty, the latest qemu-system-ppc (and ppc64) emulators
require 'pci.0' when using the 'pseries' machine type, but the libvirt
uses 'pci'.

The result is no ppc/ppc64 virsh instance can be started; they will fail with:
$ virsh start ppc64_test
error: Failed to start domain ppc64_test
error: internal error: process exited while connecting to monitor: Warning: 
Disabling some instructions which are not emulated by TCG (0x0, 0x4)
qemu-system-ppc64: -device VGA,id=video0,bus=pci,addr=0x3: Bus 'pci' not found


the upstream patch to fix this is commit 
27b2b987bf41ba1ba3aab8c8d9b2d8bc740fd925 ('Fix pci bus naming for PPC')

[test case]

<domain type='qemu'>
  <name>ppc64_test</name>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='ppc64' machine='pseries'>hvm</type>
    <boot dev='hd'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-ppc64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/uvtool/libvirt/images/ppc64_test.qcow'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/uvtool/libvirt/images/ppc64_test-ds.qcow'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='scsi' index='0'>
      <address type='spapr-vio' reg='0x2000'/>
    </controller>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:7a:71:42'/>
      <source network='default'/>
      <model type='spapr-vlan'/>
      <address type='spapr-vio' reg='0x1000'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
      <address type='spapr-vio' reg='0x30000000'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
      <address type='spapr-vio' reg='0x30000000'/>
    </console>
    <input type='keyboard' bus='usb'/>
    <input type='mouse' bus='usb'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='vga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x0'/>
    </memballoon>
  </devices>
</domain>


on a trusty system, use the above example libvirt xml to define a domain.  make 
sure qemu-system-ppc64 is installed along with its dependencies, and then virsh 
start ppc64_test; it will fail with the above error.


[regression potential]

since the patch to fix this changes when libvirt uses the 'pci' name or
the 'pci.0' name, this may break existing virsh instances if the logic
is not correct to map the pci naming to the current qemu arch and
version.  However this only changes behavior for qemu-system-ppc and
-ppc64; no regression is possible for qemu-system-x86_64 or -i386 or any
other qemu-system-* besides -ppc and -ppc64.

** Affects: libvirt (Ubuntu)
     Importance: Medium
     Assignee: Dan Streetman (ddstreet)
         Status: In Progress


** Tags: sts

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1571075

Title:
  ppc emulated pseries expecting 'pci.0' bus fails to start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1571075/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to