Bug 1056867
| Summary: | fail to hot-add PCI device: No file descriptor supplied via SCM_RIGHTS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Alex Williamson <alex.williamson> | ||||
| Component: | libvirt | Assignee: | Laine Stump <laine> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | acathrow, dyuan, honzhang, laine, lcui, mzhan, tzheng, xuzhang | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-01-23 10:21:53 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: | |||||||
| Attachments: |
|
||||||
Please see bug 1046598, the prompt error message is same, seems like this bug is duplicated. yes, it does seem to be the same. Note that when you use virt-manager to attach a device, it never adds <driver name='vfio'/> to the device XML it creates. So once again it appears that libvirt's check for vfio operability is failing, and the error message about an fd being passed is really just an artifact of libvirt attempting to use legacy kvm assignment. I'm going to DUP this one into 1046598 (which is still has the valid SELinux problem that accesses to /dev/vfio/n by qemu seem to be generating selinux AVCs), but we also need to figure out why libvirt is apparently failing to get benefit from the resolution to Bug 1044595. *** This bug has been marked as a duplicate of bug 1046598 *** Indeed the SCM_RIGHTS error does go away with 'setenforce 0'. I don't believe that this has anything to do with bug 1044595 though as all of the vfio modules were loaded prior to the happening. Also, while the SCM_RIGHTS issue went away, libvirt failed to correctly increase the locked memory limit of the qemu process so I get errors in dmesg: [55604.511389] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.525540] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.539548] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.553367] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.567143] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.580725] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.594297] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.607709] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.620872] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.633797] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55604.647202] vfio_pin_pages: RLIMIT_MEMLOCK (65536) exceeded [55611.981290] dmar: DRHD: handling fault status reg 2 [55611.989180] dmar: DMAR:[DMA Read] Request device [01:00.0] fault addr de8700 [55611.989180] DMAR:[fault reason 06] PTE Read access is not set [55612.415236] dmar: DRHD: handling fault status reg 102 [55612.422940] dmar: DMAR:[DMA Read] Request device [01:00.0] fault addr de86d0 [55612.422940] DMAR:[fault reason 06] PTE Read access is not set [55613.211896] dmar: DRHD: handling fault status reg 202 [55613.219638] dmar: DMAR:[DMA Read] Request device [01:00.0] fault addr de67c0 [55613.219638] DMAR:[fault reason 06] PTE Read access is not set [55613.236219] dmar: DMAR:[DMA Read] Request device [01:00.0] fault addr de67c0 [55613.236219] DMAR:[fault reason 06] PTE Read access is not set [55613.253844] dmar: DRHD: handling fault status reg 400 [55615.214315] dmar: DRHD: handling fault status reg 402 [55615.222023] dmar: DMAR:[DMA Read] Request device [01:00.0] fault addr de67c0 [55615.222023] DMAR:[fault reason 06] PTE Read access is not set And the device does not work in the guest. I've posted the fix for bug 1044815 to make qemu fail the device initfn, but I thought this libvirt would also include the fix for locked memory limit. |
Created attachment 854184 [details] screenshot of failure Description of problem: Using virt-manager attempt to hot-add PCI device to a guest. Error occurs complaining about problem using SCM_RIGHTS. With vfio there should be no use of SCM_RIGHTS for device assignment. Cold plugging the device works. Version-Release number of selected component (if applicable): libvirt-1.1.1-18.el7.x86_64 virt-manager-0.10.0-11.el7.noarch kernel-3.10.0-76.el7.x86_64 qemu-kvm-1.5.3-39.el7. How reproducible: 100% Steps to Reproduce: 1. Attempt to hot-add a PCI device with virt-manager 2. 3. Actual results: Fails with SCM_RIGHTS error Expected results: No failure and there should be no file descriptor passing for vfio-based assignment, so this code shouldn't be invoked. Additional info: