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 <yshxxsjt715@163.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
shenjiatong 2024-11-17 22:44:26 +08:00 committed by Michal Privoznik
parent a86b429046
commit c54df8ed9e

View 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));