Bug 1619885

Summary: [Q35] Guest reboot immediately after hotplug pcie-pci-bridge into pcie-root-port that without "bus-reserver=1"
Product: Red Hat Enterprise Linux 7 Reporter: jingzhao <jinzhao>
Component: qemu-kvm-rhevAssignee: Amnon Ilan <ailan>
Status: CLOSED WONTFIX QA Contact: jingzhao <jinzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: chayang, ehabkost, juzhang, knoel, laine, michen, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-01 21:37:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg log of guest after hotplug none

Description jingzhao 2018-08-22 02:20:27 UTC
Created attachment 1477781 [details]
dmesg log of guest after hotplug

Description of problem:
Guest reboot immediately after hotplug pcie-pci-bridge into pcie-root-port that without "bus-reserver=1" and then also guest can found pcie-pci-bridge

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-11.el7.x86_64
kernel-3.10.0-933.el7.x86_64

How reproducible:
3/3

Steps to Reproduce:
1.Boot guest with qemu command line [1]

2.Plug pcie-pci-bridge into pcie-root-port
(qemu) device_add pcie-pci-bridge,id=bridge3,bus=pci.8

3.check pcie-pci-bridge through "info qtree"
(qemu) info qtree
bus: main-system-bus
  type System
  dev: kvm-ioapic, id ""
    gpio-in "" 24
    gsi_base = 0 (0x0)
    mmio 00000000fec00000/0000000000001000
  dev: q35-pcihost, id ""
    MCFG = 2952790016 (0xb0000000)
    pci-hole64-size = 34359738368 (32 GiB)
    short_root_bus = 0 (0x0)
    below-4g-mem-size = 2147483648 (2 GiB)
    above-4g-mem-size = 2147483648 (2 GiB)
    x-pci-hole64-fix = true
    bus: pcie.0
      type PCIE
      dev: pcie-root-port, id "pci.8"
        x-migrate-msix = true
        bus-reserve = 4294967295 (0xffffffff)
        io-reserve = 18446744073709551615 (16 EiB)
        mem-reserve = 18446744073709551615 (16 EiB)
        pref32-reserve = 18446744073709551615 (16 EiB)
        pref64-reserve = 18446744073709551615 (16 EiB)
        power_controller_present = true
        chassis = 8 (0x8)
        slot = 0 (0x0)
        port = 23 (0x17)
        aer_log_max = 8 (0x8)
        addr = 09.0
        romfile = ""
        rombar = 1 (0x1)
        multifunction = false
        command_serr_enable = true
        x-pcie-lnksta-dllla = true
        x-pcie-extcap-init = true
        class PCI bridge, addr 00:09.0, pci id 1b36:000c (sub 0000:0000)
        bar 0: mem at 0xfce17000 [0xfce17fff]
        bus: pci.8
          type PCIE
          dev: pcie-pci-bridge, id "bridge3"
            msi = "auto"
            addr = 00.0
            romfile = ""
            rombar = 1 (0x1)
            multifunction = false
            command_serr_enable = true
            x-pcie-lnksta-dllla = true
            x-pcie-extcap-init = true
            class PCI bridge, addr 09:00.0, pci id 1b36:000e (sub 0000:0000)
            bar 0: mem at 0xfc400000 [0xfc4000ff]
            bus: bridge3
              type PCI

4. Check pcie-pci-bridge in the guest
# lspci -vvv -t
-[0000:00]-+-00.0  Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
           +-01.0  Red Hat, Inc. QXL paravirtual graphic card
           +-03.0-[01]----00.0  Red Hat, Inc. Virtio block device
           +-03.1-[02]----00.0  Red Hat, Inc. Virtio network device
           +-03.2-[03-04]----00.0-[04]--
           +-03.3-[05-06]--
           +-07.0-[07-08]----00.0-[08]----01.0  Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter
           +-09.0-[09-0a]----00.0-[0a]--
           +-1d.0  Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1
           +-1d.1  Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2
           +-1d.2  Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3
           +-1d.7  Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1
           +-1f.0  Intel Corporation 82801IB (ICH9) LPC Interface Controller
           +-1f.2  Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode]
           \-1f.3  Intel Corporation 82801I (ICH9 Family) SMBus Controller


Actual results:
guest reboot immediately after hotplug pcie-pci-bridge

Expected results:
Guest didn't reboot


Additional info:
[1]
/usr/libexec/qemu-kvm \
-M q35 \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 4,sockets=4,cores=1,threads=1 \
-enable-kvm \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-k en-us \
-nodefaults \
-boot menu=on \
-qmp tcp:0:6667,server,nowait \
-usb \
-device usb-tablet \
-vga qxl \
-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x3 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x3.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x3.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x3.0x3,bus-reserve=1 \
-drive file=/home/env/rhel76-64-virtio-scsi.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bus=pci.1,bootindex=0 \
-device virtio-net-pci,netdev=tap10,mac=00:52:68:26:31:03,id=net0,bus=pci.2 -netdev tap,id=tap10 \
-device pcie-pci-bridge,id=bridge1,bus=pci.3 \
-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x7 \
-device pcie-pci-bridge,id=bridge2,bus=pci.7 \
-device rtl8139,netdev=tap11,mac=00:52:68:26:31:04,id=net1,bus=bridge2,addr=0x1 -netdev tap,id=tap11 \
-device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x9 \
-monitor stdio \
-vnc :1 \

Comment 2 Laine Stump 2018-08-22 05:11:27 UTC
As discussed in Bug 1390329, hotplug of a pcie-pci-bridge is not supported in RHEL, and isn't possible via libvirt, which is the only supported method of controlling qemu. Therefore, the events you describe in this BZ cannot possible occur on a supported RHEL system.

I think this means that the BZ should be closed, but I'll leave that up to the qemu people.