]> git.ipfire.org Git - thirdparty/libvirt.git/commit
xen: Fix virDomain{At,De}tachDevice
authorJiri Denemark <jdenemar@redhat.com>
Fri, 1 Oct 2010 14:45:55 +0000 (16:45 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 12 Oct 2010 10:16:12 +0000 (12:16 +0200)
commit093973aabe7e3e9b49cf5e86fe1fc4488773b80f
treec7a5be2db66b76a6492fefe4e4da4625e9538710
parente2856d36a5912022f0b9add9c8398661ed1d7c0a
xen: Fix virDomain{At,De}tachDevice

According to API documentation virDomain{At,De}tachDevice calls are
supposed to only work on active guests for device hotplug. For anything
beyond that, their *Flags variants have to be used.

Despite the variant which was acked on libvirt mailing list
(https://www.redhat.com/archives/libvir-list/2010-January/msg00385.html)
commit ed9c14a7ef86d7a45a6d57cbfee5410fca428633 (by Jim Fehlig)
introduced automagic behavior of these API calls for xen driver. Since
January, these calls always change persistent configuration of a guest
and if the guest is currently active, they also hot(un)plug the device.

That change didn't follow API documentation and also broke device
hot(un)plug for older xend implementations which do not support changing
persistent configuration of a guest and hot(un)plugging in one step.

This patch should not break anything for active guests. On the other
hand, changing inactive guests is not supported any more.
src/xen/xen_driver.c