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 2155749 - [regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng device between RHEL8.8 and RHEL9.2/MSI-X
Summary: [regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Min Deng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-22 08:09 UTC by Min Deng
Modified: 2023-05-09 07:56 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-7.2.0-4.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:23:43 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-143076 0 None None None 2022-12-22 08:31:10 UTC
Red Hat Product Errata RHSA-2023:2162 0 None None None 2023-05-09 07:24:35 UTC

Description Min Deng 2022-12-22 08:09:49 UTC
Description of problem:
[regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng device between RHEL8.8 and RHEL9.2

Version-Release number of selected component (if applicable):
RHEL 8.8.0
kernel-4.18.0-446.el8.x86_64
qemu-kvm-6.2.0-27.module+el8.8.0+17473+3286524b.x86_64
RHEL 9.2.0
kenrel-5.14.0-212.el9.x86_64
How reproducible:
5/5
Steps to Reproduce:
1.boot up guest as follow command on src host
/usr/libexec/qemu-kvm -device virtio-rng-pci,id=rng0,rng=objrng0 -object rng-builtin,id=objrng0 -monitor stdio -cpu Icelake-Server -machine pc-q35-rhel8.6.0
On dst host
/usr/libexec/qemu-kvm -device virtio-rng-pci,id=rng0,rng=objrng0 -object rng-builtin,id=objrng0 -monitor stdio -cpu Icelake-Server -machine pc-q35-rhel8.6.0 -incoming defer

or just attached "-device virtio-rng-pci,id=rng0 ..."

2. do live migration
on dst, migrate_incoming tcp:[::]:5800
..
on src, migrate -d tcp:10.73.211.14:5800

Actual results:
On dst,
qemu) migrate_incoming tcp:[::]:5800
(qemu) qemu-kvm: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0
qemu-kvm: Failed to load PCIDevice:config
qemu-kvm: Failed to load virtio-rng:virtio
qemu-kvm: error while loading state for instance 0x0 of device '0000:00:04.0/virtio-rng'
qemu-kvm: load of migration failed: Invalid argument

Expected results:
Migration completes without any problems.

Additional info:
The issue wasn't reproduced with build qemu-kvm-7.1.0-7.el9.x86_64.rpm
it's not reproducible on local migration on rhel9.2 host

Comment 2 Dr. David Alan Gilbert 2023-01-05 09:44:56 UTC
Could you please boot the guest on both 8.8 and 9.2 and give me the output of :

sudo lspci -vvv

for both guests.

Comment 5 Dr. David Alan Gilbert 2023-01-09 09:28:08 UTC
Thanks, the main difference there is MSI-X on the virtio-rng:

rhel8:
	Region 4: Memory at 5000300000 (64-bit, prefetchable) [size=16K]
rhel9:
	Region 1: Memory at c2000000 (32-bit, non-prefetchable) [size=4K]
	Region 4: Memory at 5000300000 (64-bit, prefetchable) [size=16K]
	Capabilities: [dc] MSI-X: Enable+ Count=2 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

(There are some minor MSI address differences on other devices, I'm not sure how important those are)

Comment 6 Dr. David Alan Gilbert 2023-01-09 09:38:24 UTC
This looks like it was caused by upstream 9ea02e8f13068d5f902c4bce909de2997fd77e41 in 7.2.0

Comment 7 Dr. David Alan Gilbert 2023-01-09 11:00:12 UTC
Posted upstream:
0001-virtio-rng-pci-fix-migration-compat-for-vectors.patch

Comment 9 Yanan Fu 2023-01-13 03:25:55 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 12 Min Deng 2023-01-17 02:36:41 UTC
Reproduced the issue with build qemu-kvm-7.2.0-2.el9
Verified the bug on the following builds
Source host: RHEL 8.6.z
qemu-kvm-6.2.0-11.module+el8.6.0+17576+33ee06a8.7.x86_64
kernel - 4.18.0-372.41.1.el8_6.x86_64
seabios-bin-1.15.0-2.module+el8.6.0+14757+c25ee005.noarch
edk2-ovmf-20220126gitbb1bba3d77-2.el8.noarch
Destination host:
qemu-kvm-block-curl-7.2.0-4.el9.x86_64
5.14.0-234.el9.x86_64
seabios-bin-1.16.1-1.el9.noarch
edk2-ovmf-20221207gitfff6d81270b5-2.el9.noarch
Verified the issue on the fix build, the migration can finish without issues.

Notes, will also provide the test results from rhel 8.8 to rhel9.2 later.

Thanks.

Comment 13 Min Deng 2023-01-18 05:25:02 UTC
Also tried the build between rhel8.8 to rhel9.2, 
rhel 8.8
kernel-4.18.0-449.el8.x86_64
qemu-kvm-6.2.0-28.module+el8.8.0+17721+63bacee8.x86_64
rhel9.2
kenrel-5.14.0-234.el9.x86_64
qemu-kvm-7.2.0-4.el9.x86_64
the test passed. The issue should be fixed well.

Comment 14 Min Deng 2023-01-18 05:25:48 UTC
Base on comment 12 and comment13, move this bug to be verified. Thanks.

Comment 15 Dr. David Alan Gilbert 2023-02-06 11:43:39 UTC
FYI the upstream equivalent of this is now merged as :

bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a 
virtio-rng-pci: fix migration compat for vectors

Comment 19 errata-xmlrpc 2023-05-09 07:23:43 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: qemu-kvm 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-2023:2162


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