]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pci: make virPCIDeviceReset more autonomous
authorLaine Stump <laine@laine.org>
Sat, 29 Jun 2013 02:35:21 +0000 (22:35 -0400)
committerLaine Stump <laine@laine.org>
Mon, 15 Jul 2013 14:43:03 +0000 (10:43 -0400)
commit9e37f57f430055492f9bf5d0abd283eb070486d4
tree82be9b021a114ef75982fa22a55a0d75af5516b8
parent333a2a724af1665a5d40a08c2fabeb9e644f621a
pci: make virPCIDeviceReset more autonomous

I recently patches the callers to virPCIDeviceReset() to not call it
if the current driver for a device was vfio-pci (since that driver
will always reset the device itself when appropriate. At the time, Dan
Berrange suggested that I could instead modify virPCIDeviceReset
to check the currently bound driver for the device, and decide
for itself whether or not to go ahead with the reset.

This patch removes the previously added checks, and replaces them with
a check down in virPCIDeviceReset(), as suggested.

The functional difference here is that previously we were deciding
based on either the hostdev configuration or the value of
stubDriverName in the virPCIDevice object, but now we are actually
comparing to the "driver" link in the device's sysfs entry
directly. In practice, both should be the same.
src/qemu/qemu_hostdev.c
src/qemu/qemu_hotplug.c
src/util/virpci.c