]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Check for active PCI devices when doing nodedevice operations.
authorChris Lalancette <clalance@redhat.com>
Mon, 14 Jun 2010 21:12:35 +0000 (17:12 -0400)
committerChris Lalancette <clalance@redhat.com>
Tue, 29 Jun 2010 14:40:00 +0000 (10:40 -0400)
commit53a1db4dfcae87ee42e8f7bbf5f746f0547da9ae
treed8af56ee60772b63cbc31cafb858966044380cd1
parent415b14903e816aeb98d6f9c16fba045686cb0765
Check for active PCI devices when doing nodedevice operations.

In the current libvirt PCI code, there is no checking whether
a PCI device is in use by a guest when doing node device
detach or reattach.  This causes problems when a device is
assigned to a guest, and the administrator starts issuing
nodedevice commands.  Make it so that we check the list
of active devices when trying to detach/reattach, and only
allow the operation if the device is not assigned to a guest.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/qemu/qemu_driver.c
src/util/pci.c
src/util/pci.h
src/xen/xen_driver.c