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 667609 - libvirt need to know if a PCI device is in use or not from kernel.
Summary: libvirt need to know if a PCI device is in use or not from kernel.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 614811
TreeView+ depends on / blocked
 
Reported: 2011-01-06 08:35 UTC by Osier Yang
Modified: 2014-03-27 01:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-05 04:02:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Osier Yang 2011-01-06 08:35:16 UTC
Description of problem:
see bug: https://bugzilla.redhat.com/show_bug.cgi?id=614811

When we trying to reattach device to host, while the device is still in use by some guest, the host will crash. Now we don't have any method to detect if the PCI device is actually in use or not.

What we need is something like "using" in sysfs to tell if the device is actually in use or not.

More info, see https://bugzilla.redhat.com/show_bug.cgi?id=614811#c7

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2011-01-07 04:17:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Suzanne Logcher 2011-01-07 16:06:03 UTC
This request was erroneously denied for the current release of Red Hat
Enterprise Linux.  The error has been fixed and this request has been
re-proposed for the current release.

Comment 4 RHEL Program Management 2011-02-01 05:50:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 RHEL Program Management 2011-02-01 19:04:14 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 6 RHEL Program Management 2011-04-04 02:26:01 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2011-10-07 15:20:20 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 9 Don Dutile (Red Hat) 2012-07-09 17:22:12 UTC
Need to create a new sysfs file that reports the state of a
PCI device's (pdev->flags & PCI_DEV_FLAGS_ASSIGNED) value.

Comment 10 Alex Williamson 2012-07-09 18:45:34 UTC
(In reply to comment #9)
> Need to create a new sysfs file that reports the state of a
> PCI device's (pdev->flags & PCI_DEV_FLAGS_ASSIGNED) value.

Hmm, the request is [emphasis added]:

"When we trying to REATTACH device TO HOST, while the device is STILL IN USE BY some GUEST, the host will crash. Now we don't have any method to detect if the PCI device is actually in use or not."

In other words, libvirt is not checking that the device was actually successfully removed from the guest before trying to return it to the host ('info pci' in the monitor reports this).  Or it's losing track of the state of devices, potentially from a libvirt restart.

Exposing flags in sysfs doesn't really prevent the crash.  Do we need to add device reference counting in pci-stub so devices can't be unbound while "in use"?  That introduces a whole new usage model for pci-stub...


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