From nobody Sun Apr 28 20:37:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521487239513284.84630461614734; Mon, 19 Mar 2018 12:20:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C2095BEC9; Mon, 19 Mar 2018 19:20:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E386E60BE7; Mon, 19 Mar 2018 19:20:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 16364181B9FB; Mon, 19 Mar 2018 19:20:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2JJKVCt004854 for ; Mon, 19 Mar 2018 15:20:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 457DC2166BB2; Mon, 19 Mar 2018 19:20:31 +0000 (UTC) Received: from mamuti.net (ovpn-204-176.brq.redhat.com [10.40.204.176]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C24962166BAE for ; Mon, 19 Mar 2018 19:20:30 +0000 (UTC) Received: by mamuti.net (Postfix, from userid 500) id 5AF291011F6; Mon, 19 Mar 2018 20:20:29 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Mon, 19 Mar 2018 20:20:23 +0100 Message-Id: <295db6bd4a0a6e9015a9ad8096b6336e9116952e.1521487223.git.jdenemar@redhat.com> Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Don't assign alias to disabled balloon device X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 19 Mar 2018 19:20:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" is the only way to disable balloon driver since libvirt will add one automatically if the memballoon element is missing. In other words, there's no balloon device if model is 'none' and generating an alias for it makes no sense. The alias will be ignored when parsing the XML and it will disappear once libvirtd is restarted. Signed-off-by: Jiri Denemark --- src/qemu/qemu_alias.c | 3 = ++- tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml | 4 = +--- ...muhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 4 = +--- .../qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml | 4 = +--- ...emuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml | 4 = +--- .../qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 4 = +--- .../qemuhotplug-base-ccw-live-with-ccw-virtio.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml | 4 = +--- .../qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml | 4 = +--- .../qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml | 4 = +--- .../qemuhotplug-base-live+watchdog-user-alias.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml | 4 = +--- tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml | 4 = +--- .../qemuhotplug-base-with-scsi-controller-live.xml | 4 = +--- .../qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml | 4 = +--- 20 files changed, 21 insertions(+), 58 deletions(-) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index d0ca15bae2..95d1e0370a 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -612,7 +612,8 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCap= sPtr qemuCaps) if (qemuAssignDeviceWatchdogAlias(def->watchdog) < 0) return -1; } - if (def->memballoon) { + if (def->memballoon && + def->memballoon->model !=3D VIR_DOMAIN_MEMBALLOON_MODEL_NONE) { if (qemuAssingDeviceMemballoonAlias(def->memballoon, 0) < 0) return -1; } diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-vir= tio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio= .xml index 75948f324e..f501cde333 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml @@ -50,9 +50,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-= ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotp= lug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml index bb9d427c2f..223e929ad5 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio+ccw-virtio-1-reverse.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio+ccw-virtio-1-reverse.xml @@ -60,9 +60,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-= ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-wit= h-2-ccw-virtio.xml index c41f5affdd..c745d48558 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-vir= tio.xml @@ -50,9 +50,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotpl= ug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml index b1114dba9b..3189294b65 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2-explicit.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2-explicit.xml @@ -59,9 +59,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-c= cw-live-with-ccw-virtio+ccw-virtio-2.xml index b1114dba9b..3189294b65 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o+ccw-virtio-2.xml @@ -59,9 +59,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-cc= w-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-= ccw-virtio.xml index 3476f61db5..edf57fcd3f 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virti= o.xml @@ -49,9 +49,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml b/t= ests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml index 3a202d069e..b97bba78c6 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml @@ -40,9 +40,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-w= wn+disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-b= ase-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml index 4c3ea3202b..035ec25304 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk= -scsi-duplicate-wwn.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk= -scsi-duplicate-wwn.xml @@ -66,9 +66,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.x= ml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml index 493a615fd3..dd65a48057 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi.xml @@ -54,9 +54,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xm= l b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml index 3609819ea3..c161e5b289 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-usb.xml @@ -54,9 +54,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio= .xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml index b88b220e33..299d595d6e 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml @@ -54,9 +54,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doo= rbell.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-door= bell.xml index 11ffd9fba8..a6930bfa69 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.x= ml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.x= ml @@ -44,9 +44,7 @@ - - - + 4 diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-pla= in.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.x= ml index 9736f6bda7..757b6b0980 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml @@ -44,9 +44,7 @@ - - - + 4 diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.= xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml index 051273ccf6..b1ba51b2d8 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml @@ -50,9 +50,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-us= er-alias.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-= user-alias.xml index 27aff2b6f8..1fddd68a27 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alia= s.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alia= s.xml @@ -48,9 +48,7 @@
- - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xm= l b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml index 9f8f983e5d..76b573f25c 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml @@ -48,9 +48,7 @@
- - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml b/tests= /qemuhotplugtestdomains/qemuhotplug-base-live.xml index 67cf41ad6b..d46e20fa58 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live.xml @@ -44,9 +44,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-contro= ller-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-con= troller-live.xml index d23d3d483e..5ee6ea25c3 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-li= ve.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-li= ve.xml @@ -48,9 +48,7 @@ - - - + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-con= troller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-bas= e-without-scsi-controller-live+disk-scsi-2.xml index cceb678bb9..d35fea6f5f 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller= -live+disk-scsi-2.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller= -live+disk-scsi-2.xml @@ -58,9 +58,7 @@ - - - + --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list