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 1056867 - fail to hot-add PCI device: No file descriptor supplied via SCM_RIGHTS
Summary: fail to hot-add PCI device: No file descriptor supplied via SCM_RIGHTS
Keywords:
Status: CLOSED DUPLICATE of bug 1046598
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-23 04:59 UTC by Alex Williamson
Modified: 2014-01-23 14:12 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-23 10:21:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of failure (141.51 KB, image/png)
2014-01-23 04:59 UTC, Alex Williamson
no flags Details

Description Alex Williamson 2014-01-23 04:59:45 UTC
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:

Comment 2 Xuesong Zhang 2014-01-23 09:05:21 UTC
Please see bug 1046598, the prompt error message is same, seems like this bug is duplicated.

Comment 3 Laine Stump 2014-01-23 10:21:53 UTC
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 ***

Comment 4 Alex Williamson 2014-01-23 14:12:52 UTC
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.


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