From nobody Thu Dec 26 14:45:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=163.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 173185470119796.04580126155156; Sun, 17 Nov 2024 06:45:01 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id C12C81AB0; Sun, 17 Nov 2024 09:44:59 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8673419FD; Sun, 17 Nov 2024 09:44:45 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 2953519F9; Sun, 17 Nov 2024 09:44:42 -0500 (EST) Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by lists.libvirt.org (Postfix) with ESMTP id 14BDB19F9 for ; Sun, 17 Nov 2024 09:44:37 -0500 (EST) Received: from jshen28-imini-Pro.. (unknown [113.128.85.165]) by gzga-smtp-mtada-g1-2 (Coremail) with SMTP id _____wDnD2lMATpnJ3ewHw--.31345S2; Sun, 17 Nov 2024 22:44:28 +0800 (CST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Greylist: delayed 110670 seconds by postgrey-1.37 at lists.libvirt.org; Sun, 17 Nov 2024 09:44:38 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=CidYM USDcFLMLrprgWWsnwo3gqvey8dyP9aGPlF5b3E=; b=gJ13DfAFhvR8s27a20d7T aZiJT4tpFa33ErygXsGTmEOYuo7PKHGRTea3i8D8hRFIfVUQQ8Xsj8uS9qz/fX8L SdVkkl4/vVhb4F52yy4XSi9ft0ZI3I4KLUp9XnG56XMJHE5vmxGixH2KgupiceVz bhMa6W+IzHlFA4chAGuZiY= From: shenjiatong To: devel@lists.libvirt.org Subject: [PATCH] QEMU: allow to hot plugging virtio-serial-pci device Date: Sun, 17 Nov 2024 22:44:26 +0800 Message-ID: <20241117144426.1773179-1-yshxxsjt715@163.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CM-TRANSID: _____wDnD2lMATpnJ3ewHw--.31345S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZrW7GFyfAw1UGr45CrW5Awb_yoWfWrb_Cr yq9a1DAr93CF9IkwsY93y7AFWfZan5Xw18GayrJFn7AF1ruwn8AFW7ArZ5Z3W5Za98WF1f tF929ry5Jan7CjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRWbyt7UUUUU== X-Originating-IP: [113.128.85.165] X-CM-SenderInfo: h1vk555vmwliqv6rljoofrz/xtbBDgSWL2c0kv6XpAADs8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FED7Q6RQJEM2I66WB5YMFTSNP5TWWROK X-Message-ID-Hash: FED7Q6RQJEM2I66WB5YMFTSNP5TWWROK X-MailFrom: yshxxsjt715@163.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: shenjiatong X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZM-MESSAGEID: 1731854701737116600 Content-Type: text/plain; charset="utf-8" Virtio-serial-pci device is hot pluggable, losen the restriction and allow user to hot plug it. 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 =3D controller } }; bool releaseaddr =3D false; =20 - if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_SCSI) { + if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_SCSI && \ + controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("'%1$s' controller cannot be hot plugged."), virDomainControllerTypeToString(controller->type)); --=20 2.43.0