Re: [PATCHv2 2/2] pci: make virPCIDeviceReset more autonomous

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

 



On 07/01/2013 07:46 PM, Laine Stump wrote:
> 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 |  6 ++----
>  src/qemu/qemu_hotplug.c |  5 ++---
>  src/util/virpci.c       | 27 ++++++++++++++++++++++++---
>  3 files changed, 28 insertions(+), 10 deletions(-)
> 

This is better as it doesn't duplicate the code that much and makes us
sure that the reset won't be done redundantly.

ACK,

Martin

--
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]