[PATCH] QEMU: allow to hot plugging virtio-serial-pci device

Virtio-serial-pci device is hot pluggable, losen the restriction and allow user to hot plug it. --- 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.43.0

On 11/17/24 15:44, shenjiatong wrote:
Virtio-serial-pci device is hot pluggable, losen the restriction and allow user to hot plug it. --- 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));
Patch looks good, but we require Signed-off-by line in commit messages [1]. Can you reply to this e-mail with your SoB line? I'll append it to the commit message. 1: https://libvirt.org/hacking.html#developer-certificate-of-origin Michal

Hello, Sorry for the inconvience. My SoB is: Signed-off-by: shenjiatong <yshxxsjt715@163.com> Please have a look. Thank you. Best Regards, Jiatong Shen 2024/11/20 At 2024-11-19 19:04:30, "Michal Prívozník" <mprivozn@redhat.com> wrote:
On 11/17/24 15:44, shenjiatong wrote:
Virtio-serial-pci device is hot pluggable, losen the restriction and allow user to hot plug it. --- 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));
Patch looks good, but we require Signed-off-by line in commit messages [1]. Can you reply to this e-mail with your SoB line? I'll append it to the commit message.
1: https://libvirt.org/hacking.html#developer-certificate-of-origin
Michal

On 11/20/24 01:21, Norman wrote:
Hello,
Sorry for the inconvience. My SoB is: Signed-off-by: shenjiatong <yshxxsjt715@163.com>
Please have a look. Thank you.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> and merged. Congratulations on your first libvirt contribution! Michal
participants (3)
-
Michal Prívozník
-
Norman
-
shenjiatong