]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
QEMU: allow to hot plugging virtio-serial-pci device
authorshenjiatong <yshxxsjt715@163.com>
Sun, 17 Nov 2024 14:44:26 +0000 (22:44 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Nov 2024 15:24:27 +0000 (16:24 +0100)
Virtio-serial-pci device is hot pluggable, loosen the restriction
and allow user to hot plug it.

Signed-off-by: shenjiatong <yshxxsjt715@163.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_hotplug.c

index bddd553c88a5ac0f0ebef32f0a8118f1dd3cf4ee..55512476e4771161819609b25df3c219d00617da 100644 (file)
@@ -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));