]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pciResetDevice: use inactive devices to determine safe reset
authorChris Wright <chrisw@redhat.com>
Mon, 26 Jul 2010 16:43:04 +0000 (18:43 +0200)
committerDaniel Veillard <veillard@redhat.com>
Mon, 26 Jul 2010 16:43:04 +0000 (18:43 +0200)
commit46bcdb960dd5d725ec568a32d4ef5b9c175c80d3
tree3d76dfbf9d58a8516176a270adeac491e32f7f69
parent042b208370e70615a6b5e4046384dab3b9e50d53
pciResetDevice: use inactive devices to determine safe reset

When doing a PCI secondary bus reset, we must be sure that there are no
active devices on the same bus segment.  The active device tracking is
designed to only track host devices that are active in use by guests.
This ignores host devices that are actively in use by the host.  So the
current logic will reset host devices.

Switch this logic around and allow sbus reset when we are assigning all
devices behind a bridge to the same guest at guest startup or as a result
of a single attach-device command.

* src/util/pci.h: change signature of pciResetDevice to add an
  inactive devices list
* src/qemu/qemu_driver.c src/xen/xen_driver.c: use (or not) the new
  functionality of pciResetDevice() depending on the place of use
* src/util/pci.c: implement the interface and logic changes
src/qemu/qemu_driver.c
src/util/pci.c
src/util/pci.h
src/xen/xen_driver.c