From nobody Tue Nov 26 19:59:53 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1567201483; cv=none; d=zoho.com; s=zohoarc; b=dKva3GRhPcShFiRMVXXEMTUkR26FxOZbtcUVN7VhyKlSj/rqMeTs0Q+PNTXGmBAhLljiLw0SviOxIry57jyfudlX9ucvVoeuUzX5UKGVnn942WiNdeb4guTJMhMc8rYsxvmuLpuz/wgmMqh+CjS7K8aq5elvLzySC9EA4fEoRcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567201483; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5YtORsNKo46CVeZpjHuofgOWa73+JJkmh4VxuO4yT34=; b=hMXXZUn+9SAg1jQtzdgG2L9EVnzxNcevvAjbfZcnFqUjiJxrGl3W7O0Je8n4a3SM/OGzRtGwDBC4/9gJA67fjXEavBe3LMYFqTJ/c0l5wZkYmSnJVuCsVCGjHGI1LYEZRNb9JqzKAbR2eRwPa87fPuF6tEAMfsh2T6AjuFDORf8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567201483529811.9374900329582; Fri, 30 Aug 2019 14:44:43 -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 2A7DD18C4265; Fri, 30 Aug 2019 21:44:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 066923DE1; Fri, 30 Aug 2019 21:44:42 +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 C445E24F33; Fri, 30 Aug 2019 21:44:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7ULhopW005573 for ; Fri, 30 Aug 2019 17:43:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id EBA1060605; Fri, 30 Aug 2019 21:43:50 +0000 (UTC) Received: from mx1.redhat.com (ext-mx29.extmail.prod.ext.phx2.redhat.com [10.5.110.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E5197608A5 for ; Fri, 30 Aug 2019 21:43:48 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0440F18C891E for ; Fri, 30 Aug 2019 21:43:48 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id b11so9239174qtp.10 for ; Fri, 30 Aug 2019 14:43:47 -0700 (PDT) Received: from localhost.localdomain ([191.17.58.35]) by smtp.gmail.com with ESMTPSA id y25sm2970689qtf.83.2019.08.30.14.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 14:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D9ES0j/1YqVtSKv3pWf8pZ/S2r4c0ilnIeTAUyPRkBE=; b=bUx8wlZlLVsubZWgITuYd9joAq3QqAR+aKmJox6u34cyMhkJF91N7zDtx8jwo/VHl/ WXxfJMTR/j1GmglxVm2ujlJwOv2GdsjAOM3ok0aluc5SwGs7MzkX/TUZY+/7eY1LcAxf zo8e8u9PE0bOrywSbzzcDkcy06YUdIkUm12TmnDKOYXw2VJEdmwZRVVlPy+VCYjZTtpB +018JPI+n5jIc63QQWGzrFWGWJZwdjlRSwk7S/tk+817SBpuCth4K3xmqHwmplO2Z1Kk wjIzo2YWCwC6T7USvK4rtsNP5N/sUfV8Qd0F1ctaAtjzVoBWukcgPP4zZwcHmJ8Pbr9+ uFSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D9ES0j/1YqVtSKv3pWf8pZ/S2r4c0ilnIeTAUyPRkBE=; b=UcefaYBO4UgPHXiMNeqCyRKQgOBc5gc0TrYLP02jrSaiv8H3RYK2D+Hheggh2aXXcY /FqxNCBjEebLhgmDAvIeMx/T4g2ata7BMU28mQVChC1jJWi+SDJyUpuF/cB8xr6FgVMh 5f+cYE54zsF2nvzijQdhrtuHzvRZLMvVTaDfM2ogBE2jqkHSGZUMiBpR7bfXeEczGE6o fMvcynnaZBhuse3c/Npst4WC+W6hdinyNdux24/hH5LVPTSPWsTAZxOZ7vrWqUyiOB6F z4nZAEv6p0ROInx0LhZ5V51LLfeU4BecuzvVRS1BMn41hnzR4VsXGjDD5CGHdnWPU/8l U3ew== X-Gm-Message-State: APjAAAWAxqaiz+vFPHGa3JJ4xO6vGvLd12DwmlwwCFHwqTb2yOdznCIj aXJjFgt/SdJ4MDMtYIB7576N0gZx X-Google-Smtp-Source: APXvYqysU55ydoS4a+Fjv3cri0PHoMmymQE4DyNS3RMor3ErxqnhDGXUEvYDKX6Xd9l6N86shpjXjg== X-Received: by 2002:ac8:2f81:: with SMTP id l1mr4866874qta.269.1567201427014; Fri, 30 Aug 2019 14:43:47 -0700 (PDT) From: jcfaracco@gmail.com To: libvir-list@redhat.com Date: Fri, 30 Aug 2019 18:40:56 -0300 Message-Id: <20190830214101.8759-5-jcfaracco@gmail.com> In-Reply-To: <20190830214101.8759-1-jcfaracco@gmail.com> References: <20190830214101.8759-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Fri, 30 Aug 2019 21:43:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Fri, 30 Aug 2019 21:43:48 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.097 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.70 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Julio Faracco Subject: [libvirt] [PATCH v2 04/10] qemu: Include {xres, yres} for QEMU command line 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-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.6.2 (mx1.redhat.com [10.5.110.62]); Fri, 30 Aug 2019 21:44:42 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Julio Faracco Display devices can use now properties 'xres' and 'yres' by QEMU command line. Only models specified by their QEMU capabilities. This commit includes VGA, QXL, Virtio and Bochs. Signed-off-by: Julio Faracco --- src/qemu/qemu_command.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1ca1ecd2f0..566e34a2c7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4564,6 +4564,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, virBufferAsprintf(&buf, ",vram_size=3D%u", video->vram * 1024); } =20 + if (video->res && video->res->x && video->res->y) { + /* QEMU accepts resolution xres and yres. */ + virBufferAsprintf(&buf, ",xres=3D%u,yres=3D%u", video->res->x,= video->res->y); + } + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_VRAM64)) { /* QEMU accepts mebibytes for vram64_size_mb. */ virBufferAsprintf(&buf, ",vram64_size_mb=3D%u", video->vram64 = / 1024); @@ -4583,15 +4588,30 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, if (video->heads) virBufferAsprintf(&buf, ",max_outputs=3D%u", video->heads); } + + if (video->res && video->res->x && video->res->y) { + /* QEMU accepts resolution xres and yres. */ + virBufferAsprintf(&buf, ",xres=3D%u,yres=3D%u", video->res->x,= video->res->y); + } } else if ((video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VGA && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) || (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VMVGA && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VMWARE_SVGA_VGAMEM))) { if (video->vram) virBufferAsprintf(&buf, ",vgamem_mb=3D%u", video->vram / 1024); + + if (video->res && video->res->x && video->res->y) { + /* QEMU accepts resolution xres and yres. */ + virBufferAsprintf(&buf, ",xres=3D%u,yres=3D%u", video->res->x,= video->res->y); + } } else if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_BOCHS) { if (video->vram) virBufferAsprintf(&buf, ",vgamem=3D%uk", video->vram); + + if (video->res && video->res->x && video->res->y) { + /* QEMU accepts resolution xres and yres. */ + virBufferAsprintf(&buf, ",xres=3D%u,yres=3D%u", video->res->x,= video->res->y); + } } =20 if (qemuBuildDeviceAddressStr(&buf, def, &video->info, qemuCaps) < 0) --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list