Bug 2037612
| Summary: | [Win11][tpm][QL41112 PF] vfio_listener_region_add received unaligned region | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Yanghang Liu <yanghliu> |
| Component: | qemu-kvm | Assignee: | Eric Auger <eric.auger> |
| qemu-kvm sub component: | Devices | QA Contact: | Yanghang Liu <yanghliu> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | chayang, eric.auger, jinzhao, juzhang, marcandre.lureau, virt-maint, yanghliu |
| Version: | 9.0 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Windows | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-7.0.0-3.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 09:53:29 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Eric, I see you've touched the TPM driver previously, should it be using ram_device memory regions rather than just ram memory regions? We expect ram memory regions to be mappable to the IOMMU and therefore be page aligned. If TPM uses sub-pages, I would expect it could generate such errors. Also TPM is a device and not just memory, so it seems it should be using ram_device regardless. If this is accurate, would you mind taking this bz? Thanks I see the TPM_PPI region uses such ram_device mem type instead indeed. I was just curious about the migration case but it seems we can add a vmstate_register_ram() to ensure it. I can take the BZ. Adding Marc-André in CC too. As expected I can reproduce it on linux too. Posted "[PATCH v2 0/2] TPM-CRB: Remove spurious error report when used with VFIO" upstream Hi Eric, This problem can be reproduced in qemu-kvm-6.2.0-6.module+el8.6.0+14167+61b0e671.x86_64. May I ask if we need to clone the same bug for RHEL.8.6 ? "[PATCH v3 for-7.1] vfio/common: remove spurious tpm-crb-cmd misalignment warning" collected R-bs and A-bs on the ML and should land into 7.1. I will backport the patch when it lands. QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass. This bug can still be reproduced in qemu-kvm-7.0.0-2.el9.x86_64
related info : qemu-kvm: -device {"driver":"vfio-pci","host":"0000:3b:00.0","id":"hostdev0","bus":"pci.4","addr":"0x0"}: vfio_listener_region_add received unaligned region
Test with qemu-kvm-7.0.0-3.el9.x86_64:
> Steps to Reproduce:
> 1. check the QL41112 PF info
> 2. start a win11 domain with two QL41112 PF
> 3. check the QL41112 PF info in the Win11 vm
> 4. check the qemu-kvm info
The qemu-kvm does not throw the warning information "vfio_listener_region_add received unaligned region"
Hi Eric, Could you please help check the following test scenario ? (1) start the same Win11 vm with tpm and a QL41112 PF (2) hot-unplug the PF from the Win11 vm (3) check the qemu-kvm info 2022-05-13T09:33:14.767684Z qemu-kvm: vfio_listener_region_del received unaligned region It seems to me that this should be a similar problem with this bug, but it is not fixed in the qemu-kvm-7.0.0-3.el9. Do I need to open a new bug for tracking this problem ? Hi Yanghang, yeah that's the same kind of stuff. Please enter a new BZ then. Eric (In reply to Eric Auger from comment #14) > Hi Yanghang, > > yeah that's the same kind of stuff. Please enter a new BZ then. > > Eric A new bug: Bug 2086262 - [Win11][tpm]vfio_listener_region_del received unaligned region Verify this bug based on the Comment 12. 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 |
Description of problem: When start a win11 domain only with 2 QL41112 PF, the qemu-kvm will throw " vfio_listener_region_add received unaligned region" Version-Release number of selected component (if applicable): host: 5.14.0-39.el9.x86_64 qemu-kvm-6.2.0-1.el9.x86_64 How reproducible: 100% Steps to Reproduce: 1. check the QL41112 PF info # virsh nodedev-dumpxml pci_0000_3b_00_0 <device> <name>pci_0000_3b_00_0</name> <path>/sys/devices/pci0000:3a/0000:3a:00.0/0000:3b:00.0</path> <parent>pci_0000_3a_00_0</parent> <driver> <name>vfio-pci</name> </driver> <capability type='pci'> <class>0x020000</class> <domain>0</domain> <bus>59</bus> <slot>0</slot> <function>0</function> <product id='0x8070'>FastLinQ QL41000 Series 10/25/40/50GbE Controller</product> <vendor id='0x1077'>QLogic Corp.</vendor> <capability type='virt_functions' maxCount='96'/> <capability type='vpd'> <name>QLogic 10GE 2P QL41112HxCU-DE Adapter</name> <fields access='readonly'> <manufacture_id>1028</manufacture_id> <part_number>QL41112HxCU-DE</part_number> <serial_number>REE1950F80562</serial_number> <vendor_field index='0'>FFV14.07.07</vendor_field> <vendor_field index='1'>DSV1028VPDR.VER2.1</vendor_field> <vendor_field index='2'>NPY2</vendor_field> <vendor_field index='3'>PMTD</vendor_field> <vendor_field index='4'>NMVQLogic</vendor_field> <vendor_field index='5'>DTINIC</vendor_field> <vendor_field index='6'>DCM1001FFFFFF1202FFFFFF1403FFFFFF1604FFFFFF1805FFFFFF1A06FFFFFF1C07FFFFFF1E08FFFFFF2101FFFFFF2302FFFFFF2503FFFFFF2704FFFFFF2905FFFFFF2B06FFFFFF2D07FFFFFF2F08FFFFFF</vendor_field> </fields> </capability> <iommuGroup number='58'> <--- The two QL41112 PFs are in the same IOMMU group <address domain='0x0000' bus='0x3b' slot='0x00' function='0x0'/> <address domain='0x0000' bus='0x3b' slot='0x00' function='0x1'/> </iommuGroup> <numa node='0'/> <pci-express> <link validity='cap' port='0' speed='8' width='8'/> <link validity='sta' speed='8' width='8'/> </pci-express> </capability> </device> 2. start a win11 domain with two QL41112 PF # 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 --hostdev 0000:3b:00.1 3. check the QL41112 PF info in the Win11 vm These two devices are working properly 4. check the qemu-kvm info 2022-01-06T03:55:08.533447Z qemu-kvm: -device {"driver":"vfio-pci","host":"0000:3b:00.0","id":"hostdev0","bus":"pci.3","addr":"0x0"}: vfio_listener_region_add received unaligned region Actual results: vfio_listener_region_add received unaligned region Expected results: The qemu-kvm will not throw any suspicious information Additional info: (1)When start a win11 domain only with 2 QL41112 PF but *without tpm device*, the qemu-kvm will not throw any suspicious info. (2)Use MT2892 to repeat step 1 - step 4 , this problem can not be reproduced.