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 1988986 - [WRB][QEMU6.1]hotplug and hot-unplug all can not plug/un-plug the virtio device successfully
Summary: [WRB][QEMU6.1]hotplug and hot-unplug all can not plug/un-plug the virtio devi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: beta
: ---
Assignee: Igor Mammedov
QA Contact: Yanan Fu
URL:
Whiteboard:
Depends On: 1997410
Blocks: 2001387
TreeView+ depends on / blocked
 
Reported: 2021-08-02 08:38 UTC by Yanan Fu
Modified: 2022-05-10 13:30 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-6.1.0-1.module+el8.6.0+12535+4e2af250
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2001387 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:20:14 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-91829 0 None None None 2021-08-02 08:39:38 UTC
Red Hat Product Errata RHSA-2022:1759 0 None None None 2022-05-10 13:21:17 UTC

Description Yanan Fu 2021-08-02 08:38:18 UTC
Description of problem:
This is a regression issue with upstream weeklyrebase build, for QEMu 6.1.0 rc1.
It include 2 issues:
1. hotplug virtio-net-pci can not plug the device
2. hot-unplug virtio-net-pci can not unplug the device

Version-Release number of selected component (if applicable):
Host:
qemu-kvm-core-6.1.0-1.rc1.scrmod+el8.5.0+12016+049b55fd.wrb210728.x86_64
kernel-4.18.0-324.el8.x86_64

Guest kernel version:
kernel-4.18.0-323.el8.x86_64


How reproducible:
100%

Steps to Reproduce:
scenario 1, hotplug
1. Boot vm
2. Hotplug nic
{"execute": "netdev_add", "arguments": {"type": "tap", "id": "netdev0"}}
{"return": {}}
{"execute": "device_add", "arguments": {"id": "nic0", "driver": "virtio-net-pci", "netdev": "netdev0", "mac": "9a:45:bb:a8:b1:90", "bus": "pcie_extra_root_port_0", "addr": "0x0"}}
{"return": {}}


3. can get the devive with monitor but can not get it from guest os:
(qemu) info network 
nic0: index=0,type=nic,model=virtio-net-pci,macaddr=9a:45:bb:a8:b1:90
 \ netdev0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

guest os: lspci can not get the device, and no nic available


4. hotplug the nic can not take effect in qemu monitor:
(qemu) device_del nic0
(qemu) info network 
nic0: index=0,type=nic,model=virtio-net-pci,macaddr=9a:45:bb:a8:b1:90
 \ netdev0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown




scenario 2, hot-unplug:
1. Boot vm with virtio-net-pci
    -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \
    -device virtio-net-pci,mac=9a:2e:6d:4c:1b:b2,id=nic0,netdev=netdev0,bus=pcie-root-port-4,addr=0x0  \
    -netdev tap,id=netdev0 \


2. check network device in qemu monitor and guest os, it is ok
(qemu) info network 
nic0: index=0,type=nic,model=virtio-net-pci,macaddr=9a:2e:6d:4c:1b:b2
 \ netdev0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown


guest os: lspci can get the virtio-net-pci device, and the nic work well:
# lspci
...
05:00.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 01)


3. hot unplug virtio-net-pci, still can get the device with both monitor and guest os
(qemu) device_del nic0 
(qemu) info network 
nic0: index=0,type=nic,model=virtio-net-pci,macaddr=9a:2e:6d:4c:1b:b2
 \ netdev0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

# lspci
...
05:00.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 01)




Actual results:
hotplug and hot-unplug nic does not work


Expected results:
hotplug and hot-unplug nic can work

Additional info:

Comment 1 Yanan Fu 2021-08-02 09:56:17 UTC
Update~   It is not a virtio-net-pci only issue,   hotplug virtio-blk-pci does not work too.

1. qemu command line (except the system disk):
    -blockdev node-name=file_stg0,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/storage0.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_stg0,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_stg0 \
    -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \
    -device virtio-blk-pci,id=stg0,drive=drive_stg0,bootindex=1,write-cache=on,bus=pcie-root-port-4,addr=0x0 \

2. device still exist after hot-unplug in both qemu monitor and guest os
(qemu) info block
drive_image1: /home/kvm_autotest_root/images/rhel850-64-virtio.qcow2 (qcow2)
    Attached to:      /machine/peripheral/image1/virtio-backend
    Cache mode:       writeback, direct

drive_stg0: /home/kvm_autotest_root/images/storage0.qcow2 (qcow2)
    Attached to:      /machine/peripheral/stg0/virtio-backend
    Cache mode:       writeback, direct

(qemu) device_del stg0 
(qemu) info block
drive_image1: /home/kvm_autotest_root/images/rhel850-64-virtio.qcow2 (qcow2)
    Attached to:      /machine/peripheral/image1/virtio-backend
    Cache mode:       writeback, direct

drive_stg0: /home/kvm_autotest_root/images/storage0.qcow2 (qcow2)
    Attached to:      /machine/peripheral/stg0/virtio-backend
    Cache mode:       writeback, direct

Comment 2 Pei Zhang 2021-08-04 10:01:09 UTC
Update:

1. Hot plug/unplug PF (x540-AT2, ixgbe driver, 10G) also fails, should be same issue with this one.

2. Hot plug/unplug vhost-user also fails, should be same issue with this one. 

3. After hot plug/unplug fails, guest kernel shows error:

# dmesg
...
[   42.929429] ACPI BIOS Error (bug): Could not resolve symbol [^S16.PCNT], AE_NOT_FOUND (20210105/psargs-330)
[   42.930959] ACPI Error: Aborting method \_SB.PCI0.PCNT due to previous error (AE_NOT_FOUND) (20210105/psparse-531)
[   42.932564] ACPI Error: Aborting method \_GPE._E01 due to previous error (AE_NOT_FOUND) (20210105/psparse-531)
[   42.934120] ACPI Error: AE_NOT_FOUND, while evaluating GPE method [_E01] (20210105/evgpe-515)
[   50.581454] ACPI BIOS Error (bug): Could not resolve symbol [^S16.PCNT], AE_NOT_FOUND (20210105/psargs-330)
[   50.582971] ACPI Error: Aborting method \_SB.PCI0.PCNT due to previous error (AE_NOT_FOUND) (20210105/psparse-531)
[   50.584696] ACPI Error: Aborting method \_GPE._E01 due to previous error (AE_NOT_FOUND) (20210105/psparse-531)
[   50.586304] ACPI Error: AE_NOT_FOUND, while evaluating GPE method [_E01] (20210105/evgpe-515)
...

Comment 3 menli@redhat.com 2021-08-05 02:52:31 UTC
hit the same issue when  Hot-unplug virtio-rng device.

Comment 4 Yanan Fu 2021-08-05 03:02:56 UTC
It is not virtual network only, reset the qa-contact, and feature name in QA whiteboard, thanks!

Comment 5 Yanan Fu 2021-08-06 07:29:04 UTC
This issue gone with:
qemu-kvm-6.1.0-1.rc2.scrmod+el8.5.0+12133+c45b5bc2.wrb210804.x86_64

Tested with virtio-net-pci, virtio-blk-pci, virtio-scsi-pci, both hotplug and hot-unplug can work well.

I guess it is related with commit:
https://gitlab.com/qemu-project/qemu/-/commit/e2a6290aab578b2170c1f5909fa556385dc0d820

Comment 6 John Ferlan 2021-08-06 15:49:02 UTC
Based on comment 5, moving to POST.  Assigned to Marcel since he authored the patch.

Used DTM=5 similar to bug 1989338 which is another issue fixed in rc2 for qemu-6.1.  Once QE sets the ITM, release+ will be granted.

Comment 7 Marcel Apfelbaum 2021-08-06 16:00:43 UTC
(In reply to John Ferlan from comment #6)
> Based on comment 5, moving to POST.  Assigned to Marcel since he authored
> the patch.
> 

Can't take credit for this one, it was all Igor :)

https://gitlab.com/qemu-project/qemu/-/commit/d7346e614f4ec353f9b24bb69bfeaf1ade287e07



> Used DTM=5 similar to bug 1989338 which is another issue fixed in rc2 for
> qemu-6.1.  Once QE sets the ITM, release+ will be granted.

Comment 9 Yanan Fu 2021-10-08 01:19:40 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 12 Yanan Fu 2021-10-26 01:42:06 UTC
This scenario can be covered by our gating test, and gating PASS.
Move to VERIFIED accordingly.

Comment 14 errata-xmlrpc 2022-05-10 13:20: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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2022:1759


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