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 2086262 - [Win11][tpm]vfio_listener_region_del received unaligned region
Summary: [Win11][tpm]vfio_listener_region_del received unaligned region
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.1
Hardware: x86_64
OS: Windows
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Auger
QA Contact: Yanghang Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-15 07:46 UTC by Yanghang Liu
Modified: 2022-11-15 10:20 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-7.0.0-6.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:54:42 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src qemu-kvm merge_requests 101 0 None opened vfio/common: remove spurious warning on vfio_listener_region_del 2022-06-09 15:03:26 UTC
Red Hat Issue Tracker RHELPLAN-122047 0 None None None 2022-05-15 08:06:18 UTC
Red Hat Product Errata RHSA-2022:7967 0 None None None 2022-11-15 09:55:24 UTC

Description Yanghang Liu 2022-05-15 07:46:32 UTC
Description of problem:
When hotunplug the PF from the win11 domain (with tpm device), the qemu-kvm will throw " vfio_listener_region del received unaligned region"



Version-Release number of selected component (if applicable):
5.14.0-87.el9.x86_64
qemu-kvm-7.0.0-3.el9.x86_64



How reproducible:
100%

Steps to Reproduce:
1. start a win11 domain with a QL41112 PF and tpm device

# virt-install --machine=q35 --noreboot --name=win11 --memory=4096 --vcpus=4 --graphics type=vnc,port=5911,listen=0.0.0.0 --import --noautoconsole  --network bridge=switch,model=virtio,mac=52:54:00:01:11:11 --disk path=/home/images/win11.qcow2,bus=virtio,cache=none,format=qcow2,io=threads,size=20  --boot=uefi --boot nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd --tpm model=tpm-crb,backend.type=emulator --hostdev 0000:3b:00.0 

2. check the QL41112 PF info in the Win11 vm
The PF works properly

3. hot-unplug the PF from the win11 domain
virsh detach-device win11 /tmp/device/0000:3b:00.0.xml
Device detached successfully

4. check the qemu-kvm info

2022-05-15T07:44:06.263771Z qemu-kvm: vfio_listener_region_del received unaligned region


Actual results:
qemu-kvm: vfio_listener_region_del received unaligned region

Expected results:
The qemu-kvm will not throw any suspicious information

Additional info:

a similar bug : Bug 2037612 - [Win11][tpm][QL41112 PF] vfio_listener_region_add received unaligned region

Comment 1 Alex Williamson 2022-05-17 20:11:38 UTC
Eric, looks like we missed that vfio_listener_region_del() also needs to check vfio_known_safe_misalignment() now.

Comment 2 Eric Auger 2022-05-24 11:55:38 UTC
"[PATCH] vfio/common: remove spurious warning on vfio_listener_region_del" sent upstream

Comment 4 Yanan Fu 2022-06-13 09:55:00 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 5 Yanghang Liu 2022-06-14 05:51:52 UTC
> Steps to Reproduce:
> 1. start a win11 domain with a QL41112 PF and tpm device
> 
> # virt-install --machine=q35 --noreboot --name=win11 --memory=4096 --vcpus=4
> --graphics type=vnc,port=5911,listen=0.0.0.0 --import --noautoconsole 
> --network bridge=switch,model=virtio,mac=52:54:00:01:11:11 --disk
> path=/home/images/win11.qcow2,bus=virtio,cache=none,format=qcow2,io=threads,
> size=20  --boot=uefi --boot nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd
> --tpm model=tpm-crb,backend.type=emulator --hostdev 0000:3b:00.0 
> 
> 2. check the QL41112 PF info in the Win11 vm
> The PF works properly
> 
> 3. hot-unplug the PF from the win11 domain
> virsh detach-device win11 /tmp/device/0000:3b:00.0.xml
> Device detached successfully
> 
> 4. check the qemu-kvm info
> 
> 2022-05-15T07:44:06.263771Z qemu-kvm: vfio_listener_region_del received unaligned region

This bug can still be reproduced in qemu-kvm-7.0.0-5.el9.x86_64

Comment 6 Yanghang Liu 2022-06-14 07:17:42 UTC
Verification:


Test env:
kernel-5.14.0-108.el9 
qemu-kvm-7.0.0-6.el9


Test result: PASS


Test step:
> 1. start a win11 domain with a QL41112 PF and tpm device
> 
> # virt-install --machine=q35 --noreboot --name=win11 --memory=4096 --vcpus=4
> --graphics type=vnc,port=5911,listen=0.0.0.0 --import --noautoconsole 
> --network bridge=switch,model=virtio,mac=52:54:00:01:11:11 --disk
> path=/home/images/win11.qcow2,bus=virtio,cache=none,format=qcow2,io=threads,
> size=20  --boot=uefi --boot nvram.template=/usr/share/edk2/ovmf/OVMF_VARS.fd
> --tpm model=tpm-crb,backend.type=emulator --hostdev 0000:3b:00.0 

The win11 domain with a QL41112 PF and tpm device can be started successfully

> 2. check the QL41112 PF info in the Win11 vm

The PF works properly
 
> 3. hot-unplug the PF from the win11 domain
> virsh detach-device win11 /tmp/device/0000:3b:00.0.xml
> Device detached successfully

{"execute":"device_del","arguments":{"id":"hostdev0"},"id":"libvirt-407"}
{"timestamp": {"seconds": 1655190578, "microseconds": 237219}, "event": "DEVICE_DELETED", "data": {"device": "hostdev0", "path": "/machine/peripheral/hostdev0"}}

> 4. check the qemu-kvm info

The qemu-kvm does not throw any suspicious information like "qemu-kvm: vfio_listener_region_del received unaligned region"

Comment 9 Yanghang Liu 2022-06-15 05:26:13 UTC
Move the bug status to VERIFIED based on Comment 5 and Comment 6

Comment 11 errata-xmlrpc 2022-11-15 09:54:42 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-2022:7967


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