[PATCH] Add PCI sysfs reset access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm proposing we make use of $PCIDIR/reset in qemu-kvm to reset
devices on VM reset.  We need to add it to libvirt's list of
files that get ownership for device assignment.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
---

 src/util/pci.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/util/pci.c b/src/util/pci.c
index 095ad3f..8d2dbb0 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -1349,11 +1349,13 @@ int pciDeviceFileIterate(pciDevice *dev,
 
     while ((ent = readdir(dir)) != NULL) {
         /* Device assignment requires:
-         *   $PCIDIR/config, $PCIDIR/resource, $PCIDIR/resourceNNN, $PCIDIR/rom
+         *   $PCIDIR/config, $PCIDIR/resource, $PCIDIR/resourceNNN,
+         *   $PCIDIR/rom, $PCIDIR/reset
          */
         if (STREQ(ent->d_name, "config") ||
             STRPREFIX(ent->d_name, "resource") ||
-            STREQ(ent->d_name, "rom")) {
+            STREQ(ent->d_name, "rom") ||
+            STREQ(ent->d_name, "reset")) {
             if (virAsprintf(&file, "%s/%s", pcidir, ent->d_name) < 0) {
                 virReportOOMError();
                 goto cleanup;

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]