Bug 953008
| Summary: | [Q35] PCI hot plug of devices under legacy pci-bridge with '-M q35' does not work | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Qian Guo <qiguo> |
| Component: | qemu-kvm-rhev | Assignee: | Marcel Apfelbaum <marcel> |
| Status: | CLOSED WONTFIX | QA Contact: | jingzhao <jinzhao> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | ailan, chayang, hhuang, jen, jinzhao, jsuchane, jtomko, juzhang, knoel, laine, marcel, michen, mrezanin, mst, nerijus, rbalakri, virt-maint, yalzhang, yduan |
| 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-04-26 13:23:05 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1045975, 1311684 | ||
(In reply to comment #0) > (qemu) > (qemu) info pci ..... > Bus 1, device 3, function 0: > Ethernet controller: PCI device 1af4:1000 > IRQ 10. > BAR0: I/O at 0xc060 [0xc07f]. > BAR1: 32 bit memory at 0xf0013000 [0xf0013fff]. > BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. > id "vnic1" > Bus 1, device 7, function 0: > Ethernet controller: PCI device 1af4:1000 > IRQ 0. > BAR0: I/O at 0xffffffffffffffff [0x001e]. > BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe]. > BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. > id "vnic2" From 'info pci', find that the 'PCI device' value is same, so test following scenario: Steps: 1.Boot a guest w/ 2 pci-bridge, and one virtual network device is on bus 'bridge1' # /usr/libexec/qemu-kvm -M q35 -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x3 -cpu Penryn -m 4G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/mnt/rhel7u64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=bridge1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -device qxl,id=video1,vram_size=67108864,bus=bridge1,addr=0x2 -monitor stdio -netdev tap,id=bd,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -device virtio-net-pci,bus=bridge1,addr=0x3,netdev=bd,mac=54:52:0a:1b:3c:01,id=vnic1 -boot menu=on -device pci-bridge,bus=pcie.0,id=bridge2,chassis_nr=1,addr=0x4 2.After bootup, hot plug a virtual network device on bus 'bridge2' (qemu) netdev_add tap,id=tap1,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on (qemu) (qemu) (qemu) device_add virtio-net-pci,netdev=tap1,id=vnic2,bus=bridge2,addr=0x3 Results: same as comment #0 , the two nics are sharing one 'pci device' value. (qemu) info pci Bus 0, device 0, function 0: Host bridge: PCI device 8086:29c0 id "" Bus 0, device 1, function 0: VGA controller: PCI device 1b36:0100 IRQ 10. BAR0: 32 bit memory at 0xf4000000 [0xf7ffffff]. BAR1: 32 bit memory at 0xf8000000 [0xfbffffff]. BAR2: 32 bit memory at 0xfc010000 [0xfc011fff]. BAR3: I/O at 0xd040 [0xd05f]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "" Bus 0, device 3, function 0: PCI bridge: PCI device 1b36:0001 IRQ 11. BUS 0. secondary bus 1. subordinate bus 1. IO range [0xc000, 0xcfff] memory range [0xe8000000, 0xf3ffffff] prefetchable memory range [0xfff00000, 0x000fffff] BAR0: 64 bit memory at 0xfc012000 [0xfc0120ff]. id "bridge1" Bus 1, device 1, function 0: SCSI controller: PCI device 1af4:1001 IRQ 11. BAR0: I/O at 0xc000 [0xc03f]. BAR1: 32 bit memory at 0xf0012000 [0xf0012fff]. id "virtio-disk0" Bus 1, device 2, function 0: Display controller: PCI device 1b36:0100 IRQ 10. BAR0: 32 bit memory at 0xe8000000 [0xebffffff]. BAR1: 32 bit memory at 0xec000000 [0xefffffff]. BAR2: 32 bit memory at 0xf0010000 [0xf0011fff]. BAR3: I/O at 0xc040 [0xc05f]. id "video1" Bus 1, device 3, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 10. BAR0: I/O at 0xc060 [0xc07f]. BAR1: 32 bit memory at 0xf0013000 [0xf0013fff]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic1" Bus 0, device 4, function 0: PCI bridge: PCI device 1b36:0001 IRQ 11. BUS 0. secondary bus 2. subordinate bus 2. IO range [0xf000, 0x0fff] memory range [0xfff00000, 0x000fffff] prefetchable memory range [0xfff00000, 0x000fffff] BAR0: 64 bit memory at 0xfc013000 [0xfc0130ff]. id "bridge2" Bus 2, device 3, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 0. BAR0: I/O at 0xffffffffffffffff [0x001e]. BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic2" Bus 0, device 31, function 0: ISA bridge: PCI device 8086:2918 id "" Bus 0, device 31, function 2: SATA controller: PCI device 8086:2922 IRQ 11. BAR4: I/O at 0xd060 [0xd07f]. BAR5: 32 bit memory at 0xfc014000 [0xfc014fff]. id "" Bus 0, device 31, function 3: SMBus: PCI device 8086:2930 IRQ 11. BAR4: I/O at 0xb100 [0xb13f]. id "" (qemu) Test another scenario: Boot guest w/ a pci-bridge and a virtual network device over pcie bus, then hotplug a virtual network device on the pci-bridge. The result is same as comment #0 and comment #1 (qemu)info pci Bus 1, device 3, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 0. BAR0: I/O at 0xffffffffffffffff [0x001e]. BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic2" Bus 0, device 7, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 11. BAR0: I/O at 0xd060 [0xd07f]. BAR1: 32 bit memory at 0xfc023000 [0xfc023fff]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic1" pci bridge don't support hotplug *** Bug 1045827 has been marked as a duplicate of this bug. *** Reproduce this bug with qemu-kvm-rhev-2.0.0-2.el7ev.test.x86_64
Steps:
1.Boot guest with q35 and pci-bridge bus device:
# /usr/libexec/qemu-kvm -M q35 -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x3 -cpu Penryn -m 4G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/test.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=bridge1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -device qxl,id=video1,vram_size=67108864,bus=bridge1,addr=0x2 -monitor stdio -netdev tap,id=bd,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,bus=bridge1,addr=0x3,netdev=bd,mac=54:52:0a:1b:3c:01,id=vnic1 -boot menu=on -qmp unix:/q1,server,nowait
2.Hotplug virtio-net-pci to this bridge:
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"hostnet0","vhost":"on","script":"/etc/qemu-ifup"}}
{"return": {}}
{"execute": "device_add", "arguments": { "driver":"virtio-net-pci","netdev":"hostnet0","bus":"bridge1","addr":"0x7","mac":"52:54:00:12:34:0a","id": "net0"}}
{"return": {}}
Result
From guest, only the primary nic, and no dmesg infos about hotplug acpi log
# lspci |grep Eth
01:03.0 Ethernet controller: Red Hat, Inc Virtio network device
And from info pci, the device is added:
Bus 1, device 3, function 0:
Ethernet controller: PCI device 1af4:1000
IRQ 11.
BAR0: I/O at 0xc060 [0xc07f].
BAR1: 32 bit memory at 0xf0043000 [0xf0043fff].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
id "vnic1"
Bus 1, device 7, function 0:
Ethernet controller: PCI device 1af4:1000
IRQ 0.
BAR0: I/O at 0xffffffffffffffff [0x001e].
BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
id "v2"
So this bug is reproduced.
Try to verify this bug with qemu-kvm-rhev-2.1.2-16.el7.x86_64 and guest kernel-3.10.0-215.el7.x86_64
Steps as above:
Result:
1. pci-bridge hotplug with -M q35 does not work
# nc -U /q1
{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2}, "package": " (qemu-kvm-rhev-2.1.2-16.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"hostnet0","vhost":"on","script":"/etc/qemu-ifup"}}
{"return": {}}
{"execute": "device_add", "arguments": { "driver":"virtio-net-pci","netdev":"hostnet0","bus":"bridge1","addr":"0x7","mac":"52:54:00:12:34:0a","id": "net0"}}
{"return": {}}
(qemu) info pci
...
Bus 1, device 3, function 0:
Ethernet controller: PCI device 1af4:1000
IRQ 11.
BAR0: I/O at 0xc060 [0xc07f].
BAR1: 32 bit memory at 0xf0043000 [0xf0043fff].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
id "vnic1"
Bus 1, device 7, function 0:
Ethernet controller: PCI device 1af4:1000
IRQ 0.
BAR0: I/O at 0xffffffffffffffff [0x001e].
BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe].
BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
id "net0"
In guest:
# lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04)
00:03.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:01.0 SCSI storage controller: Red Hat, Inc Virtio block device
01:02.0 Display controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04)
01:03.0 Ethernet controller: Red Hat, Inc Virtio network device
so this bug is not fixed.
Additional infos:
1.PCIe does not support hotpluging (expected now)
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"hostnet0","vhost":"on","script":"/etc/qemu-ifup"}}
{"return": {}}
{"execute": "device_add", "arguments": { "driver":"virtio-net-pci","netdev":"hostnet0","bus":"pcie.0","addr":"0x7","mac":"52:54:00:12:34:0a","id": "net0"}}
{"error": {"class": "GenericError", "desc": "Bus 'pcie.0' does not support hotplugging"}}
2.This bug is only occurs under q35, with machinetype pc now, the pci-bridge has already supported with latest builds:
-M pc cli:
# /usr/libexec/qemu-kvm -M pc -device pci-bridge,bus=pci.0,id=bridge1,chassis_nr=1,addr=0x3 -cpu Penryn -m 4G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/home/test.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=bridge1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -device qxl,id=video1,vram_size=67108864,bus=bridge1,addr=0x2 -monitor stdio -netdev tap,id=bd,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,bus=bridge1,addr=0x3,netdev=bd,mac=54:52:0a:1b:3c:01,id=vnic1 -boot menu=on -qmp unix:/q1,server,nowait
and hotplug:
# nc -U /q1
{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2}, "package": " (qemu-kvm-rhev-2.1.2-16.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute": "device_add", "arguments": { "driver":"virtio-net-pci","netdev":"hostnet0","bus":"pci.0","addr":"0x7","mac":"52:54:00:12:34:0a","id": "net0"}}
{"return": {}}
{"timestamp": {"seconds": 1418114091, "microseconds": 588416}, "event": "NIC_RX_FILTER_CHANGED", "data": {"name": "net0", "path": "/machine/peripheral/net0/virtio-backend"}}
Results:
it works
from guest:
# lspci |grep Eth
00:07.0 Ethernet controller: Red Hat, Inc Virtio network device
01:03.0 Ethernet controller: Red Hat, Inc Virtio network device
# dmesg
[ 87.735441] ACPI: \_SB_.PCI0.S38_: ACPI_NOTIFY_DEVICE_CHECK event
[ 87.735483] ACPI: \_SB_.PCI0.S38_: Device check in hotplug_event()
[ 87.735583] pci 0000:00:07.0: [1af4:1000] type 00 class 0x020000
[ 87.735696] pci 0000:00:07.0: reg 0x10: [io 0x0000-0x001f]
[ 87.735742] pci 0000:00:07.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 87.735954] pci 0000:00:07.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 87.736689] pci 0000:00:07.0: BAR 6: assigned [mem 0xc0000000-0xc003ffff pref]
[ 87.736694] pci 0000:00:07.0: BAR 1: assigned [mem 0xc0040000-0xc0040fff]
[ 87.736717] pci 0000:00:07.0: BAR 0: assigned [io 0x1000-0x101f]
[ 87.736744] pci 0000:00:00.0: no hotplug settings from platform
[ 87.736746] pci 0000:00:00.0: using default PCI settings
[ 87.736787] pci 0000:00:01.0: no hotplug settings from platform
[ 87.736789] pci 0000:00:01.0: using default PCI settings
[ 87.736826] ata_piix 0000:00:01.1: no hotplug settings from platform
[ 87.736828] ata_piix 0000:00:01.1: using default PCI settings
[ 87.736863] piix4_smbus 0000:00:01.3: no hotplug settings from platform
[ 87.736865] piix4_smbus 0000:00:01.3: using default PCI settings
[ 87.736903] qxl 0000:00:02.0: no hotplug settings from platform
[ 87.736905] qxl 0000:00:02.0: using default PCI settings
[ 87.736942] pci 0000:00:03.0: no hotplug settings from platform
[ 87.736944] pci 0000:00:03.0: using default PCI settings
[ 87.739381] virtio-pci 0000:01:01.0: no hotplug settings from platform
[ 87.739384] virtio-pci 0000:01:01.0: using default PCI settings
[ 87.739427] qxl 0000:01:02.0: no hotplug settings from platform
[ 87.739429] qxl 0000:01:02.0: using default PCI settings
[ 87.739473] virtio-pci 0000:01:03.0: no hotplug settings from platform
[ 87.739475] virtio-pci 0000:01:03.0: using default PCI settings
[ 87.739544] pci 0000:00:07.0: no hotplug settings from platform
[ 87.739561] pci 0000:00:07.0: using default PCI settings
[ 87.739813] virtio-pci 0000:00:07.0: enabling device (0000 -> 0003)
[ 87.775249] virtio-pci 0000:00:07.0: irq 45 for MSI/MSI-X
[ 87.775277] virtio-pci 0000:00:07.0: irq 46 for MSI/MSI-X
[ 87.775304] virtio-pci 0000:00:07.0: irq 47 for MSI/MSI-X
[ 87.785849] pci 0000:00:00.0: no hotplug settings from platform
[ 87.785853] pci 0000:00:00.0: using default PCI settings
[ 87.785930] pci 0000:00:01.0: no hotplug settings from platform
[ 87.785932] pci 0000:00:01.0: using default PCI settings
[ 87.786001] ata_piix 0000:00:01.1: no hotplug settings from platform
[ 87.786023] ata_piix 0000:00:01.1: using default PCI settings
[ 87.786098] piix4_smbus 0000:00:01.3: no hotplug settings from platform
[ 87.786100] piix4_smbus 0000:00:01.3: using default PCI settings
[ 87.786171] qxl 0000:00:02.0: no hotplug settings from platform
[ 87.786173] qxl 0000:00:02.0: using default PCI settings
[ 87.786242] pci 0000:00:03.0: no hotplug settings from platform
[ 87.786243] pci 0000:00:03.0: using default PCI settings
[ 87.788745] virtio-pci 0000:01:01.0: no hotplug settings from platform
[ 87.788748] virtio-pci 0000:01:01.0: using default PCI settings
[ 87.788820] qxl 0000:01:02.0: no hotplug settings from platform
[ 87.788822] qxl 0000:01:02.0: using default PCI settings
[ 87.788889] virtio-pci 0000:01:03.0: no hotplug settings from platform
[ 87.788891] virtio-pci 0000:01:03.0: using default PCI settings
[ 87.788958] virtio-pci 0000:00:07.0: no hotplug settings from platform
[ 87.788960] virtio-pci 0000:00:07.0: using default PCI settings
[ 87.789094] pci 0000:00:00.0: no hotplug settings from platform
[ 87.789096] pci 0000:00:00.0: using default PCI settings
[ 87.789170] pci 0000:00:01.0: no hotplug settings from platform
[ 87.789172] pci 0000:00:01.0: using default PCI settings
[ 87.789239] ata_piix 0000:00:01.1: no hotplug settings from platform
[ 87.789241] ata_piix 0000:00:01.1: using default PCI settings
[ 87.789290] piix4_smbus 0000:00:01.3: no hotplug settings from platform
[ 87.789292] piix4_smbus 0000:00:01.3: using default PCI settings
[ 87.789327] qxl 0000:00:02.0: no hotplug settings from platform
[ 87.789329] qxl 0000:00:02.0: using default PCI settings
[ 87.789364] pci 0000:00:03.0: no hotplug settings from platform
[ 87.789366] pci 0000:00:03.0: using default PCI settings
[ 87.791565] virtio-pci 0000:01:01.0: no hotplug settings from platform
[ 87.791568] virtio-pci 0000:01:01.0: using default PCI settings
[ 87.791647] qxl 0000:01:02.0: no hotplug settings from platform
[ 87.791649] qxl 0000:01:02.0: using default PCI settings
[ 87.791718] virtio-pci 0000:01:03.0: no hotplug settings from platform
[ 87.791720] virtio-pci 0000:01:03.0: using default PCI settings
[ 87.791787] virtio-pci 0000:00:07.0: no hotplug settings from platform
[ 87.791789] virtio-pci 0000:00:07.0: using default PCI settings
[ 87.791963] pci 0000:00:00.0: no hotplug settings from platform
[ 87.791965] pci 0000:00:00.0: using default PCI settings
[ 87.792042] pci 0000:00:01.0: no hotplug settings from platform
[ 87.792044] pci 0000:00:01.0: using default PCI settings
[ 87.792112] ata_piix 0000:00:01.1: no hotplug settings from platform
[ 87.792114] ata_piix 0000:00:01.1: using default PCI settings
[ 87.792181] piix4_smbus 0000:00:01.3: no hotplug settings from platform
[ 87.792183] piix4_smbus 0000:00:01.3: using default PCI settings
[ 87.792250] qxl 0000:00:02.0: no hotplug settings from platform
[ 87.792252] qxl 0000:00:02.0: using default PCI settings
[ 87.792322] pci 0000:00:03.0: no hotplug settings from platform
[ 87.792324] pci 0000:00:03.0: using default PCI settings
[ 87.794550] virtio-pci 0000:01:01.0: no hotplug settings from platform
[ 87.794553] virtio-pci 0000:01:01.0: using default PCI settings
[ 87.794636] qxl 0000:01:02.0: no hotplug settings from platform
[ 87.794638] qxl 0000:01:02.0: using default PCI settings
[ 87.794707] virtio-pci 0000:01:03.0: no hotplug settings from platform
[ 87.794709] virtio-pci 0000:01:03.0: using default PCI settings
[ 87.794777] virtio-pci 0000:00:07.0: no hotplug settings from platform
[ 87.794779] virtio-pci 0000:00:07.0: using default PCI settings
[ 87.799519] pci_bus 0000:01: Allocating resources
[ 87.801702] pci 0000:00:00.0: no hotplug settings from platform
[ 87.801706] pci 0000:00:00.0: using default PCI settings
[ 87.801751] pci 0000:00:01.0: no hotplug settings from platform
[ 87.801753] pci 0000:00:01.0: using default PCI settings
[ 87.801788] ata_piix 0000:00:01.1: no hotplug settings from platform
[ 87.801790] ata_piix 0000:00:01.1: using default PCI settings
[ 87.801825] piix4_smbus 0000:00:01.3: no hotplug settings from platform
[ 87.801827] piix4_smbus 0000:00:01.3: using default PCI settings
[ 87.801863] qxl 0000:00:02.0: no hotplug settings from platform
[ 87.801865] qxl 0000:00:02.0: using default PCI settings
[ 87.801900] pci 0000:00:03.0: no hotplug settings from platform
[ 87.801902] pci 0000:00:03.0: using default PCI settings
[ 87.804175] virtio-pci 0000:01:01.0: no hotplug settings from platform
[ 87.804180] virtio-pci 0000:01:01.0: using default PCI settings
[ 87.804615] qxl 0000:01:02.0: no hotplug settings from platform
[ 87.804638] qxl 0000:01:02.0: using default PCI settings
[ 87.804677] virtio-pci 0000:01:03.0: no hotplug settings from platform
[ 87.804679] virtio-pci 0000:01:03.0: using default PCI settings
[ 87.804716] virtio-pci 0000:00:07.0: no hotplug settings from platform
[ 87.804718] virtio-pci 0000:00:07.0: using default PCI settings
Clearing "Fixed in Version" field since the rebase event it represents has already occurred. dmi-to-pci bridge hotplug should also be implemented. An RFC was posted upstream: https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg05681.html *** Bug 1377953 has been marked as a duplicate of this bug. *** |
Description of problem: Hot plug a virtual network device to guest under pci-bridge, the action succeed, but, guest can not recognize this device. Version-Release number of selected component (if applicable): host&guest# uname -r 3.9.0-0.rc5.49.el7.x86_64 # rpm -q qemu-kvm qemu-kvm-1.4.0-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Boot a rhel7 guest w/ '-M q35' and a 'pci-bridge' device. # /usr/libexec/qemu-kvm -M q35 -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x3 -cpu Penryn -m 4G -smp 4,sockets=1,cores=4,threads=1 -enable-kvm -nodefaults -nodefconfig -drive file=/mnt/rhel7u64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=bridge1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0 -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -device qxl,id=video1,vram_size=67108864,bus=bridge1,addr=0x2 -monitor stdio -netdev tap,id=bd,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -device virtio-net-pci,bus=bridge1,addr=0x3,netdev=bd,mac=54:52:0a:1b:3c:01,id=vnic1 -boot menu=on 2.after boot up guest, under hmp monitor, hot plug a virtual network device (qemu) netdev_add tap,id=tap1,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown (qemu) device_add virtio-net-pci,netdev=tap1,id=vnic2,bus=bridge1,addr=0x7 (qemu) (qemu) info network vnic1: index=0,type=nic,model=virtio-net-pci,macaddr=54:52:0a:1b:3c:01 \ bd: index=0,type=tap,ifname=tap0,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown vnic2: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57 \ tap1: index=0,type=tap,ifname=tap1,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown (qemu) (qemu) (qemu) info pci Bus 0, device 0, function 0: Host bridge: PCI device 8086:29c0 id "" Bus 0, device 1, function 0: VGA controller: PCI device 1b36:0100 IRQ 10. BAR0: 32 bit memory at 0xf4000000 [0xf7ffffff]. BAR1: 32 bit memory at 0xf8000000 [0xfbffffff]. BAR2: 32 bit memory at 0xfc010000 [0xfc011fff]. BAR3: I/O at 0xd040 [0xd05f]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "" Bus 0, device 3, function 0: PCI bridge: PCI device 1b36:0001 IRQ 11. BUS 0. secondary bus 1. subordinate bus 1. IO range [0xc000, 0xcfff] memory range [0xe8000000, 0xf3ffffff] prefetchable memory range [0xfff00000, 0x000fffff] BAR0: 64 bit memory at 0xfc012000 [0xfc0120ff]. id "bridge1" Bus 1, device 1, function 0: SCSI controller: PCI device 1af4:1001 IRQ 11. BAR0: I/O at 0xc000 [0xc03f]. BAR1: 32 bit memory at 0xf0012000 [0xf0012fff]. id "virtio-disk0" Bus 1, device 2, function 0: Display controller: PCI device 1b36:0100 IRQ 10. BAR0: 32 bit memory at 0xe8000000 [0xebffffff]. BAR1: 32 bit memory at 0xec000000 [0xefffffff]. BAR2: 32 bit memory at 0xf0010000 [0xf0011fff]. BAR3: I/O at 0xc040 [0xc05f]. id "video1" Bus 1, device 3, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 10. BAR0: I/O at 0xc060 [0xc07f]. BAR1: 32 bit memory at 0xf0013000 [0xf0013fff]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic1" Bus 1, device 7, function 0: Ethernet controller: PCI device 1af4:1000 IRQ 0. BAR0: I/O at 0xffffffffffffffff [0x001e]. BAR1: 32 bit memory at 0xffffffffffffffff [0x00000ffe]. BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe]. id "vnic2" Bus 0, device 31, function 0: ISA bridge: PCI device 8086:2918 id "" Bus 0, device 31, function 2: SATA controller: PCI device 8086:2922 IRQ 11. BAR4: I/O at 0xd060 [0xd07f]. BAR5: 32 bit memory at 0xfc013000 [0xfc013fff]. id "" Bus 0, device 31, function 3: SMBus: PCI device 8086:2930 IRQ 11. BAR4: I/O at 0xb100 [0xb13f]. id "" (qemu) 3.Check device inside guest # lspci 00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller 00:01.0 VGA compatible controller: Red Hat, Inc. Device 0100 (rev 04) 00:03.0 PCI bridge: Red Hat, Inc. Device 0001 00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02) 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02) 01:01.0 SCSI storage controller: Red Hat, Inc Virtio block device 01:02.0 Display controller: Red Hat, Inc. Device 0100 (rev 04) 01:03.0 Ethernet controller: Red Hat, Inc Virtio network device Actual results: From HMP, find that the Ethernet device is plugged successfully, bug from guest, could not see it. Expected results: Since under q35, we could not hotplug a device directly w/ pcie bus, but if we hot plug a device over a pci-bridge, if under hmp, it is plugged successfully, inside guest, it could be seen and work well. Additional info: