From c54df8ed9e25d6d9dad63750f6b607a0398f7aff Mon Sep 17 00:00:00 2001 From: shenjiatong Date: Sun, 17 Nov 2024 22:44:26 +0800 Subject: [PATCH] QEMU: allow to hot plugging virtio-serial-pci device Virtio-serial-pci device is hot pluggable, loosen the restriction and allow user to hot plug it. Signed-off-by: shenjiatong Reviewed-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index bddd553c88..55512476e4 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -837,7 +837,8 @@ qemuDomainAttachControllerDevice(virDomainObj *vm, { .controller = controller } }; bool releaseaddr = false; - if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { + if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI && \ + controller->type != VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("'%1$s' controller cannot be hot plugged."), virDomainControllerTypeToString(controller->type)); -- 2.47.2