From nobody Mon Feb 9 16:02:50 2026 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 153148856115457.04095764327485; Fri, 13 Jul 2018 06:29:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 163F381121; Fri, 13 Jul 2018 13:29:17 +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 C59DD26DD3; Fri, 13 Jul 2018 13:29:16 +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 7413118434AB; Fri, 13 Jul 2018 13:29:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6DDTCVh032711 for ; Fri, 13 Jul 2018 09:29:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id C558C10FFE50; Fri, 13 Jul 2018 13:29:12 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EDD610FFE54; Fri, 13 Jul 2018 13:29:07 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Fri, 13 Jul 2018 15:28:23 +0200 Message-Id: <20180713132824.8655-17-marcandre.lureau@redhat.com> In-Reply-To: <20180713132824.8655-1-marcandre.lureau@redhat.com> References: <20180713132824.8655-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [libvirt] [RFC PATCH 16/17] qemu: build vhost-user-gpu video device arguments 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 13 Jul 2018 13:29:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau Change the model name to "vhost-user-gpu-pci" if running on PCI. Set the "max_outputs" property. Associate the device with the "vhost-user" backend. Signed-off-by: Marc-Andr=C3=A9 Lureau --- src/qemu/qemu_command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b3a2bba28e..b4afcd2e8c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4319,7 +4319,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, goto error; } =20 - if (STREQ(model, "virtio-gpu")) { + if (STREQ(model, "virtio-gpu") || STREQ(model, "vhost-user-gpu")) { if (video->info.type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) virBufferAsprintf(&buf, "%s-ccw", model); else @@ -4367,6 +4367,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, if (video->heads) virBufferAsprintf(&buf, ",max_outputs=3D%u", video->heads); } + } else if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VHOST_USER) { + if (video->heads) + virBufferAsprintf(&buf, ",max_outputs=3D%u", video->heads); + virBufferAsprintf(&buf, ",vhost-user=3Dvu-%s", video->info.alias); } else if (video->vram && ((video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VGA && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) || --=20 2.18.0.129.ge3331758f1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list