提交 2090b0f5 编写于 作者: A Alex Williamson 提交者: Eric Blake

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: NAlex Williamson <alex.williamson@redhat.com>
上级 b24b442b
...@@ -1349,11 +1349,13 @@ int pciDeviceFileIterate(pciDevice *dev, ...@@ -1349,11 +1349,13 @@ int pciDeviceFileIterate(pciDevice *dev,
while ((ent = readdir(dir)) != NULL) { while ((ent = readdir(dir)) != NULL) {
/* Device assignment requires: /* 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") || if (STREQ(ent->d_name, "config") ||
STRPREFIX(ent->d_name, "resource") || 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) { if (virAsprintf(&file, "%s/%s", pcidir, ent->d_name) < 0) {
virReportOOMError(); virReportOOMError();
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册