mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
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 <alex.williamson@redhat.com>
This commit is contained in:
parent
b24b442bf7
commit
2090b0f52d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user