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: NLaine Stump <laine@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
Showing
想要评论请 注册 或 登录