Commit Graph

2 Commits

Author SHA1 Message Date
Mark McLoughlin
6318808270 Allow pciResetDevice() to reset multiple devices
When using a Secondary Bus Reset, all devices on the bus are reset.

Extend the pciResetDevice() API so that a 'check' callback can be
supplied which will verify that it is safe to reset the other devices
on the bus.

The virDomainObjPtr parameter is needed so that when the check function
iterates over the domain list, it can avoid double locking.

* src/pci.[ch]: add a 'check' callback to pciResetDevice(), re-work
  pciIterDevices() to pass the check function to the iter functions,
  use the check function in the bus iterator, return the first unsafe
  device from pciBusCheckOtherDevices() and include its details in
  the bus reset error message.

* src/qemu_driver.c, src/xen_uninified.c: just pass NULL as the
  check function for now
2009-08-14 08:31:11 +01:00
Daniel Veillard
d217641314 implements dettach, reattach and reset for PCI devices
* configure.in po/POTFILES.in src/Makefile.am src/libvirt_private.syms
  src/pci.c src/pci.h: Add implementations of dettach, reattach and
  reset for PCI devices, patch by Mark McLoughlin
Daniel
2009-03-02 16:18:11 +00:00