Bug 1665244
Summary: | libvirt segfaults with vfio-pci hostdev device | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Alex Williamson <alex.williamson> | |
Component: | libvirt | Assignee: | John Ferlan <jferlan> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | yalzhang <yalzhang> | |
Severity: | urgent | Docs Contact: | ||
Priority: | urgent | |||
Version: | 8.0 | CC: | alex.williamson, blc, chhu, jdenemar, jferlan, knoel, mtessun, nanliu, rbalakri, virt-bugs, xuzhang, yafu, yalzhang | |
Target Milestone: | rc | Keywords: | Regression | |
Target Release: | 8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-4.5.0-18.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1665474 (view as bug list) | Environment: | ||
Last Closed: | 2019-06-14 01:30:16 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1665474 |
Description
Alex Williamson
2019-01-10 19:02:56 UTC
Patches posted upstream to avoid non SCSI hostdevs during qemuHostdevPrepareSCSIDevices processing that would end up calling qemuSetUnprivSGIO: https://www.redhat.com/archives/libvir-list/2019-January/msg00292.html In particular patch1 of the series resolves the issue. I can reproduce the libvirtd crash: # rpm -q libvirt libvirt-4.5.0-17.module+el8+2625+db702f9d.x86_64 # pidof libvirtd 13717 # virsh dumpxml rhel1 | grep /hostdev -B5 <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x82' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </hostdev> # virsh start rhel1 error: Disconnected from qemu:///system due to end of file error: Failed to start domain rhel1 error: End of file while reading data: Input/output error # pidof libvirtd 13836 *** Bug 1665416 has been marked as a duplicate of this bug. *** Upstream patch was pushed: commit f30ac207ad96a567ade0d8a49023ade9233b2b72 Author: John Ferlan <jferlan> Date: Thu Jan 10 18:05:12 2019 -0500 qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices When commit 1d94b3e7 added code to walk the [n]hostdevs list looking to add shared hostdevs, it should've filtered any hostdevs that were not SCSI hostdev's. Signed-off-by: John Ferlan <jferlan> Reviewed-by: Ján Tomko <jtomko> $ git describe f30ac207ad96a567ade0d8a49023ade9233b2b72 v5.0.0-rc1-1-gf30ac207ad $ This has been reviewed by the leads out of band. We are marking this as a blocker for 8.0.0 release. verify this bug on libvirt-4.5.0-18.module+el8+2691+dc742e5d.x86_64 1.Start guest with hostdev device # virsh dumpxml rhel1 | grep /hostdev -B5 <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x82' slot='0x10' function='0x5'/> </source> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </hostdev> # pidof libvirtd; virsh start rhel1; pidof libvirtd 30020 Domain rhel1 started 30020 2. start guest with mdev device successfully # virsh dumpxml q35 | grep /hostdev -B5 <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on'> <source> <address uuid='1725be71-3eec-45d5-a19e-c2e9a696faf6'/> </source> <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </hostdev> # pidof libvirtd; virsh start q35;pidof libvirtd 16696 Domain q35 started 16696 |