From: Alex Williamson Date: Thu, 17 Mar 2011 20:26:36 +0000 (-0600) Subject: Add PCI sysfs reset access X-Git-Tag: CVE-2011-1486~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2090b0f52d8270c38c6157b6f8fdd00fa265c213;p=thirdparty%2Flibvirt.git Add PCI sysfs reset access 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 --- diff --git a/src/util/pci.c b/src/util/pci.c index 095ad3f1ef..8d2dbb09b7 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;