qemu: prevent attempts to detach a device on a controller with hotplug='off'
qemu: prevent attempts to detach a device on a controller with hotplug='off'

Although the original patches to support controllers with
hotplug='off' were checking during hotplug/attach requests that the
device was being plugged into a PCI controller that didn't have
hotplug disabled, but I forgot to do the same for device detach (the
main impetus for adding the feature was to prevent unplugs originating
from within the guest, so it slipped my mind). So although the guest
OS was ultimately unable to honor the unplug request, libvirt could
still be used to make such a request, and since device attach/detach
are asynchronous operations, the caller to libvirt would receive a
success status back (the device would stubbornly/correctly remain in
the domain status XML however)

This patch remedies that, by looking at the controller for the device
in the detach request, and immediately failing the operation if that
controller has hotplug=off.

Signed-off-by: Laine Stump <c23361c43fbf79fed83e8b76173707b083d6caf5@redhat.com>
Reviewed-by: Erik Skultety <2c14d38fa47c8799f1b9c16280abe27f8edfec6e@redhat.com>

jardasgit/libvirt,olafhering/libvirt,zippy2/libvirt,jfehlig/libvirt,jfehlig/libvirt,nertpinx/libvirt,libvirt/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,jfehlig/libvirt,crobinso/libvirt,crobinso/libvirt,jardasgit/libvirt,libvirt/libvirt,crobinso/libvirt,jardasgit/libvirt,libvirt/libvirt,nertpinx/libvirt,zippy2/libvirt,olafhering/libvirt,olafhering/libvirt,jardasgit/libvirt,nertpinx/libvirt,zippy2/libvirt,nertpinx/libvirt,olafhering/libvirt,jardasgit/libvirt,zippy2/libvirt,jfehlig/libvirt