]> git.ipfire.org Git - thirdparty/libvirt.git/commit
xen: check if device is assigned to guest before reattaching
authorYufang Zhang <yuzhang@redhat.com>
Wed, 27 Apr 2011 12:09:12 +0000 (20:09 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 28 Apr 2011 20:45:31 +0000 (14:45 -0600)
commita88916665df614238b8e56806bb27caaf4cc7725
tree4326e4b38de757a9bb8eb6a68e278b21a2f9538a
parentf7bd72fa260051a68392b50f2ca0d2ed3ef18e4f
xen: check if device is assigned to guest before reattaching

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=664059

Reattaching pci device back to host without destroying guest or
detaching device from guest would cause host to crash. This patch adds
a check before doing device reattach. If the device is being assigned
to guest, libvirt refuses to reattach device to host. The patch only
works for Xen, for it just checks xenstore to get pci device
information.

Signed-off-by: Yufang Zhang <yuzhang@redhat.com>
AUTHORS
src/xen/xen_driver.c