RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1138125 - forbid invalid address type for panic device
Summary: forbid invalid address type for panic device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1138122
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-04 06:34 UTC by Jincheng Miao
Modified: 2015-11-19 05:48 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1138122
Environment:
Last Closed: 2015-11-19 05:48:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Jincheng Miao 2014-09-04 06:34:37 UTC
+++ This bug was initially created as a clone of Bug #1138122 +++

Description of problem:
panic device only could specify isa type address with iobase(ioport).
libvirt should forbid other address type for panic device in order to avoid confusion from users.


Version-Release number of selected component (if applicable):
libvirt-1.2.8-1.el7.x86_64
qemu-kvm-rhev-2.1.0-3.el7.x86_64 


How reproducible:
100%

Steps to Reproduce:
1. add panic device to guest, which address is same with memballoon
# virsh edit r7a
...
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
    <panic>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </panic>
...

2. start it
# virsh start r7a
Domain r7a started

# ps -ef | grep qemu
qemu     10526     1 58 14:33 ?        00:00:09 /usr/libexec/qemu-kvm -name r7a -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid c4fa19e8-e8c9-49ab-b6bf-0427ed4e750e -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/r7a.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/r7a.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:06:af:9a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -device pvpanic -msg timestamp=on

Expect result:
in step 1, report an error.

Comment 1 Erik Skultety 2014-09-08 12:19:02 UTC
Fixed upstream:

commit afb4c6b6634e16beb5ddbca3f1113c615e10e7e4
Author: Erik Skultety <eskultet>
Date:   Mon Sep 8 12:27:23 2014 +0200

    qemu: panic device: check for invalid address type
    
    qemu now checks for invalid address type for a panic device, which is
    currently implemented only to use ISA address type, thus rejecting
    any other options, except for leaving XML attributes blank, in that case,
    defaults are used (this behaviour remains the same from earlier verions).
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1138125
    
    Signed-off-by: Martin Kletzander <mkletzan>

v1.2.8-53-gafb4c6b

Comment 3 zhenfeng wang 2015-05-22 10:36:22 UTC
I can reproduce this issue with libvirt-1.2.8-16.el7.x86_64.rpm, verify this bug with libvirt-1.2.15-2.el7.x86_64, the verify steps as following

steps

1. add panic device to guest, which address is same with memballoon,will fail to save the guest
# virsh edit 7.0
...
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
    <panic>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </panic>
...
:wq
error: XML error: Attempted double use of PCI slot 0000:00:07.0 (may need "multifunction='on'" for device on function 0)
Failed. Try again? [y,n,i,f,?]: 


2.Add panic device to guest which have different pci address with other device in guest's xml, start the guest, will get an expect error
#virsh dumpxml 7.0
--
    <panic>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </panic>

# virsh start 7.0
error: Failed to start domain 7.0
error: unsupported configuration: panic is supported only with ISA address type

3.Add panic device to guest with virtio-serial address, start the guest, will get the expect error
#virsh dumpxml 7.0
--
    <panic>
      <address type='virtio-serial' controller='0' bus='0' port='3'/>
    </panic>

# virsh start 7.0
error: Failed to start domain 7.0
error: unsupported configuration: panic is supported only with ISA address type

4.Start a guest with pure panic device, the guest could start successfully, also the panic function works well
#virsh dumpxml 7.0
--
<panic/>

# virsh start 7.0
Domain 7.0 started

#ps aux|grep qemu
--
-device pvpanic -msg timestamp=on

5.Start a guest with panic device with ISA address type, also panic function works well
#virsh dumpxml 7.0
--
    <panic>
      <address type='isa' iobase='0x505'/>
    </panic>

# virsh start 7.0
Domain 7.0 started

According to the upper steps, mark this bug verified

Comment 6 errata-xmlrpc 2015-11-19 05:48:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2202.html


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