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 2001921 - [WRB][virtual network][qemu-6.1.50-1] Fail to hotplug nic with rtl8139 driver
Summary: [WRB][virtual network][qemu-6.1.50-1] Fail to hotplug nic with rtl8139 driver
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: seabios
Version: 8.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: jingzhao
URL:
Whiteboard:
Depends On: 2001732 2018392 2027716
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-07 13:01 UTC by Lei Yang
Modified: 2022-02-15 01:53 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2001732
Environment:
Last Closed: 2022-02-15 01:53:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-96417 0 None None None 2021-09-07 13:04:03 UTC

Description Lei Yang 2021-09-07 13:01:18 UTC
+++ This bug was initially created as a clone of Bug #2001732 +++

Description of problem:
Fail to hotplug nic with rtl8139 driver

Version-Release number of selected component (if applicable):
qemu-kvm-6.1.50-1.scrmod+el8.5.0+12463+2558e0c7.wrb210901.x86_64
kernel-4.18.0-340.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest without nic device
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1'  \
-sandbox on  \
-machine q35,memory-backend=mem-machine_mem \
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
-nodefaults \
-device VGA,bus=pcie.0,addr=0x2 \
-m 7168 \
-object memory-backend-ram,size=7168M,id=mem-machine_mem  \
-smp 6,maxcpus=6,cores=3,threads=1,dies=1,sockets=2  \
-cpu 'Haswell-noTSX',+kvm_pv_unhalt \
-device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
-device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/rhel850-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
-device scsi-hd,id=image1,drive=drive_image1,write-cache=on  \
-vnc :0  \
-rtc base=utc,clock=host,driftfix=slew  \
-boot menu=off,order=cdn,once=c,strict=off \
-net none \
-enable-kvm \
-device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=4 \
-device pcie-root-port,id=pcie_extra_root_port_1,addr=0x3.0x1,bus=pcie.0,chassis=5 \
-device pcie-root-port,id=pcie_extra_root_port_2,addr=0x3.0x2,bus=pcie.0,chassis=6 \
-device pcie-root-port,id=pcie_extra_root_port_3,addr=0x3.0x3,bus=pcie.0,chassis=7 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \

2.Hotplug rtl819 nic to guest
{'execute': 'qmp_capabilities'}
{"return": {}}
{'execute': 'netdev_add', 'arguments': {'type': 'tap', 'id': 'idjeru4b'}}
{"return": {}}
{"execute": "device_add", "arguments": {"id": "idrfgIqF", "driver": "rtl8139", "netdev": "idjeru4b", "mac": "9a:45:bb:a8:b1:90", "bus": "pcie-pci-bridge-0","addr":"0x1"}}
{"return": {}}

3.Check the nic inside guest
lspci |grep Eth
2:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20)

4.But the corresponding device cannot be viewed through command "ifconfig -a"
# ifconfig -a
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 26  bytes 2598 (2.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26  bytes 2598 (2.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

5.Check dmesg, there some error message
[   93.251164] pci 0000:02:01.0: [10ec:8139] type 00 class 0x020000
[   93.251400] pci 0000:02:01.0: reg 0x10: [io  0x0000-0x00ff]
[   93.251472] pci 0000:02:01.0: reg 0x14: [mem 0x00000000-0x000000ff]
[   93.251820] pci 0000:02:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[   93.252998] pci 0000:02:01.0: BAR 6: no space for [mem size 0x00040000 pref]
[   93.253003] pci 0000:02:01.0: BAR 6: failed to assign [mem size 0x00040000 pref]
[   93.253006] pci 0000:02:01.0: BAR 0: no space for [io  size 0x0100]
[   93.253008] pci 0000:02:01.0: BAR 0: failed to assign [io  size 0x0100]
[   93.253010] pci 0000:02:01.0: BAR 1: no space for [mem size 0x00000100]
[   93.253012] pci 0000:02:01.0: BAR 1: failed to assign [mem size 0x00000100]
[   93.333771] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
[   93.334200] ACPI: \_SB_.GSIG: Enabled at IRQ 22
[   93.334356] 8139cp 0000:02:01.0: no MMIO resource
[   93.335843] 8139cp: probe of 0000:02:01.0 failed with error -5
[   93.340819] 8139too: 8139too Fast Ethernet driver 0.9.28
[   93.340839] 8139too 0000:02:01.0: This (id 10ec:8139 rev 20) is an enhanced 8139C+ chip, use 8139cp


Actual results:
Fail to hotplug nic with rtl8139 driver

Expected results:
ifconfig can get NIC, hotplug successful.

Additional info:
1. qemu-kvm-6.0.0-29.module+el8.5.0+12386+43574bac.x86_64 test pass. So add keywords "Regression"
2. virtio-net-pci and e1000e didn't reproduce this issue.

Comment 1 John Ferlan 2021-09-15 18:11:57 UTC
Assigned to Ariel for initial triage per bz process and age of bug created or assigned to virt-maint without triage.

Comment 3 Laurent Vivier 2021-11-22 13:02:09 UTC
Command line can be simplified to:

qemu-kvm \
-machine q35 \
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
-device VGA,bus=pcie.0,addr=0x2 \
-nodefaults \
-smp 4 \
-device virtio-blk,id=blk0,drive=drive_image1 \
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/var/lib/libvirt/images/rhel8.6.0.qcow2,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
-enable-kvm \
-chardev stdio,id=char0,mux=on \
-mon char0,mode=control,pretty=on -m 1024

The problem can be fixed by adding

  -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off

to the command line, so the root cause is likely the same as we saw before:

    17858a169508 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35")

I have reproduced the problem with upstream QEMU 6.2.0-rc1

Michael, do you know who can fix that? It's upstream.

Comment 5 Igor Mammedov 2021-12-01 09:31:29 UTC
For possible fix see 
https://bugzilla.redhat.com/show_bug.cgi?id=2001732#c14

Not QEMU issue, changing component to SeaBIOS.

Comment 6 John Ferlan 2021-12-03 16:43:58 UTC
Assigning to Igor directly since there's an ITR defined and someone will need to drive/watch getting this into downstream (and that isn't virt-maint).

Comment 7 John Ferlan 2021-12-06 11:31:56 UTC
Klaus - Igor contacted me directly and asked to reassign to someone in firmware:

Merging upstream was delayed to the next SeaBIOS release
(so it is not getting in QEMU 6.2). It should be assigned to SeaBIOS
maintainers to backport fix, when they see it is fine to do so
(that the reason I haven't assigned BZ to myself)

Comment 8 Klaus Heinrich Kiwi 2021-12-10 16:37:50 UTC
Same as Bug 2001732, assigning to Gerd.

Given this is a regression introduced on Qemu-6.1, I think it's fair to say this is a RHEL8.6 bug, not a RHEL 8.5? We don't need to fix 8.5, do we?

Comment 9 Gerd Hoffmann 2021-12-15 11:19:09 UTC
(In reply to Klaus Heinrich Kiwi from comment #8)
> Same as Bug 2001732, assigning to Gerd.
> 
> Given this is a regression introduced on Qemu-6.1, I think it's fair to say
> this is a RHEL8.6 bug, not a RHEL 8.5? We don't need to fix 8.5, do we?

Yes, it's 8.6 only, the seabios rebase (bug 2018392) plus qemu rebase (to 6.2) should fix this.

Comment 11 Lei Yang 2021-12-31 02:05:21 UTC
Hit same issue

Host: rhel8.6
Guest: rhel7.9

Test Version:
kernel-4.18.0-358.el8.x86_64
qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.x86_64

Comment 14 Klaus Heinrich Kiwi 2022-01-06 16:31:24 UTC
(In reply to Gerd Hoffmann from comment #9)
> (In reply to Klaus Heinrich Kiwi from comment #8)
> > Same as Bug 2001732, assigning to Gerd.
> > 
> > Given this is a regression introduced on Qemu-6.1, I think it's fair to say
> > this is a RHEL8.6 bug, not a RHEL 8.5? We don't need to fix 8.5, do we?
> 
> Yes, it's 8.6 only, the seabios rebase (bug 2018392) plus qemu rebase (to
> 6.2) should fix this.

Setting this as a tracking only

Comment 15 Gerd Hoffmann 2022-02-03 09:35:36 UTC
(In reply to Lei Yang from comment #11)
> Hit same issue
> 
> Host: rhel8.6
> Guest: rhel7.9
> 
> Test Version:
> kernel-4.18.0-358.el8.x86_64
> qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.x86_64

please retest with seabios 1.15 and qemu 6.2

Comment 16 Lei Yang 2022-02-07 01:56:49 UTC
(In reply to Gerd Hoffmann from comment #15)
> (In reply to Lei Yang from comment #11)
> > Hit same issue
> > 
> > Host: rhel8.6
> > Guest: rhel7.9
> > 
> > Test Version:
> > kernel-4.18.0-358.el8.x86_64
> > qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.x86_64
> 
> please retest with seabios 1.15 and qemu 6.2

Will update test results after testing

Comment 17 Lei Yang 2022-02-07 10:06:21 UTC
(In reply to Lei Yang from comment #16)
> (In reply to Gerd Hoffmann from comment #15)
> > (In reply to Lei Yang from comment #11)
> > > Hit same issue
> > > 
> > > Host: rhel8.6
> > > Guest: rhel7.9
> > > 
> > > Test Version:
> > > kernel-4.18.0-358.el8.x86_64
> > > qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.x86_64
> > 
> > please retest with seabios 1.15 and qemu 6.2
> 
> Will update test results after testing

==> Reproduced this problem on seabios-1.14.0-7.el9.x86_64

Test Version:
seabios-1.14.0-7.el9.x86_64
qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
kernel-4.18.0-365.el8.x86_64

==> Test pass on seabios-1.15.0-1.el9.x86_64

Test Version:
seabios-1.15.0-1.el9.x86_64
qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
kernel-4.18.0-365.el8.x86_64


Based on above test result, this issue has been fixed well on seabios-1.15 and qemu-6.2.

Comment 18 Lei Yang 2022-02-07 10:21:44 UTC
(In reply to Lei Yang from comment #17)
> (In reply to Lei Yang from comment #16)
> > (In reply to Gerd Hoffmann from comment #15)
> > > (In reply to Lei Yang from comment #11)
> > > > Hit same issue
> > > > 
> > > > Host: rhel8.6
> > > > Guest: rhel7.9
> > > > 
> > > > Test Version:
> > > > kernel-4.18.0-358.el8.x86_64
> > > > qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.x86_64
> > > 
> > > please retest with seabios 1.15 and qemu 6.2
> > 
> > Will update test results after testing
> 
> ==> Reproduced this problem on seabios-1.14.0-7.el9.x86_64
> 
> Test Version:
> seabios-1.14.0-7.el9.x86_64
> qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
> kernel-4.18.0-365.el8.x86_64
> 
> ==> Test pass on seabios-1.15.0-1.el9.x86_64
> 
> Test Version:
> seabios-1.15.0-1.el9.x86_64
> qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
> kernel-4.18.0-365.el8.x86_64
> 
> 
> Based on above test result, this issue has been fixed well on seabios-1.15
> and qemu-6.2.

Sorry, my mistake.

==> Reproduced this problem on seabios-1.14.0-1.scrmod+el8.6.0+13458+219ac088.x86_64

Test Version:
seabios-1.14.0-1.scrmod+el8.6.0+13458+219ac088.x86_64
qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
kernel-4.18.0-365.el8.x86_64

==> Test pass on seabios-1.15.0-1.module+el8.6.0+13879+1439f356.x86_64

Test Version:
seabios-1.15.0-1.module+el8.6.0+13879+1439f356.x86_64
qemu-kvm-6.2.0-5.module+el8.6.0+14025+ca131e0a.x86_64
kernel-4.18.0-365.el8.x86_64


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