From nobody Sun Feb 8 18:28:23 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; 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=1564968245; cv=none; d=zoho.com; s=zohoarc; b=X91dUkk+Y5nifltfCk6BCu/C50klskmJGcWXI3MdK3moX85vMgCRyvtXungExd8YnKEGhlvhvRK8iO9Z4jR/IbUVbITOgZN742420y5huoaJoUP0tNAfJsYe8qdyqtv2PHE/We+qUDFYJLVr6jAMZqRtLWSnIBpvy+WTkxE1yss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564968245; 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=YqwuCZ0eIywxyI+qwpEuiom5mhWy6iELJNCeamqPzEw=; b=n6dCfunoAJTl7uAzPRwoL1jqvFB4OZdGNLSBrEamsg4NmEpPMWVva/0Qu2jJIgYkc1EWaN78fPHFE8QW4yLl//axwVgdInvkKpwMz4F5HERXrh+iBfcSvQQEw5ezcw27xMhQGxoM4jvc4AwgtvpXIyWfubyDAv4LBsBvYxzu7zQ= 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 1564968245337390.3587896603718; Sun, 4 Aug 2019 18:24:05 -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 C368C83E; Mon, 5 Aug 2019 01:24:03 +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 8AFDA19C71; Mon, 5 Aug 2019 01:24:03 +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 23C0141F66; Mon, 5 Aug 2019 01:24:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x751LY8J004577 for ; Sun, 4 Aug 2019 21:21:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 909C06012E; Mon, 5 Aug 2019 01:21:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A48960127 for ; Mon, 5 Aug 2019 01:21:32 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (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 8A8F6EB9A0 for ; Mon, 5 Aug 2019 01:21:31 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id r21so59008599qke.2 for ; Sun, 04 Aug 2019 18:21:31 -0700 (PDT) Received: from localhost.localdomain ([2804:431:c7ca:4e73:559c:bb3e:5c1a:a6f6]) by smtp.gmail.com with ESMTPSA id d9sm35765172qke.136.2019.08.04.18.21.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 18:21:30 -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=HfZFKBoL3HnBSBkOVaLu1u1ssECHbBWzysd6HrINb7k=; b=R2dpk11nGOhMXq2SWlB9Z94A+tRWmyxFPYWWKcsuRLMrptRIFGwMKWJ+ncp9cS6q18 PN4/2F+TfxsCpnK+KxqdvLoCjABc6V9Xs54adDzPCyjV179eE36sviNeYXXPfA2IwHfg TexLOK6+LgS0r5fc6nbFYjEtobI4YXjfn6My32jyLs1BUKPhfbyvroxAh8JfuuqwrIUI 0dM9H6yenDULIYUVA1RvBAu4R0JMXB3JCm4C7vIfATFRglB6QULSeJRBqJZMLG0/kAK2 b8p+G4JAQ/smpCEa/jQIAAnqCOSflv2gtXtCMsKSrvlb2hzYTbDG/b8XnORfqCti2DcB 3SWg== 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=HfZFKBoL3HnBSBkOVaLu1u1ssECHbBWzysd6HrINb7k=; b=pds7NOdmfsVwY1qutaqu6c1N+DzQrQIpnMeogvtMaUYnWutfNAyMUdwggwXIXEKtwY sqRcCF8qobhHuEo8onS44U8Tvo/N4m5095+kgcaMxAgdcxLquVs/alDTY0MhF9w4rSGo Tvx/AGBbAoH9oX6FSDygx/Oh9xn2+z9ppjuhWbwzmLhdg/64H0XS8qW4Ri0j6qGxzIV2 IS4bK1QuzYIsn6tBSnNk9PaHEPH8roLZmWkrsPLk6HeYpe5Mx7xpQHhEm/wZKoEcK3Y9 UqTzmVpokGEj1CPBtNs75eTFtuVk945c/s+W+BGXgMjZuRsOAstMwy8hhemplmrnX7xk 4v+g== X-Gm-Message-State: APjAAAWCceqAKVhK+wDpICLppn4nh++x3c9Kas4gtMhL5zftzw8Rzx8z rb5yFc9r1Gh3n/mc5lWNbw2kLKP0 X-Google-Smtp-Source: APXvYqziISQxvncWI/M5T4sMA1hzAah7VnhTxzLU3SPOy9Fwb1DQe0sLGbDNhcPyYgghV16YBDb6Yw== X-Received: by 2002:a37:4cd2:: with SMTP id z201mr88287233qka.284.1564968090526; Sun, 04 Aug 2019 18:21:30 -0700 (PDT) From: jcfaracco@gmail.com To: libvir-list@redhat.com Date: Sun, 4 Aug 2019 22:21:19 -0300 Message-Id: <20190805012121.7261-3-jcfaracco@gmail.com> In-Reply-To: <20190805012121.7261-1-jcfaracco@gmail.com> References: <20190805012121.7261-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 05 Aug 2019 01:21:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 05 Aug 2019 01:21:31 +0000 (UTC) for IP:'209.85.222.193' DOMAIN:'mail-qk1-f193.google.com' HELO:'mail-qk1-f193.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.1 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.193 mail-qk1-f193.google.com 209.85.222.193 mail-qk1-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Julio Faracco Subject: [libvirt] [PATCH 2/4] conf: Adding XML support for 'xres' and 'yres' 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.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 05 Aug 2019 01:24:04 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Julio Faracco XML need to support both properties together. This commit adds XML support for QXL model if they are set. Domain configuration is able to parse this properties. Signed-off-by: Julio Faracco Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 26 ++++++++++++++++++++++++++ src/conf/domain_conf.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 441eb1a5a2..120c6ccf5f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15360,6 +15360,8 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xml= opt, VIR_AUTOFREE(char *) ram =3D NULL; VIR_AUTOFREE(char *) vgamem =3D NULL; VIR_AUTOFREE(char *) primary =3D NULL; + VIR_AUTOFREE(char *) xres =3D NULL; + VIR_AUTOFREE(char *) yres =3D NULL; =20 if (!(def =3D virDomainVideoDefNew())) return NULL; @@ -15377,6 +15379,8 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xml= opt, vram64 =3D virXMLPropString(cur, "vram64"); vgamem =3D virXMLPropString(cur, "vgamem"); heads =3D virXMLPropString(cur, "heads"); + xres =3D virXMLPropString(cur, "xres"); + yres =3D virXMLPropString(cur, "yres"); =20 if ((primary =3D virXMLPropString(cur, "primary")) !=3D NU= LL) { if (STREQ(primary, "yes")) @@ -15459,6 +15463,24 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xm= lopt, } } =20 + if (xres && yres) { + if (def->type !=3D VIR_DOMAIN_VIDEO_TYPE_QXL) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("xres and yres attribute only supported for t= ype of qxl")); + goto error; + } + if (virStrToLong_uip(xres, NULL, 10, &def->xres) < 0) { + virReportError(VIR_ERR_XML_ERROR, + _("cannot parse video xres '%s'"), xres); + goto error; + } + if (virStrToLong_uip(yres, NULL, 10, &def->yres) < 0) { + virReportError(VIR_ERR_XML_ERROR, + _("cannot parse video yres '%s'"), yres); + goto error; + } + } + if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0) goto error; =20 @@ -26427,6 +26449,10 @@ virDomainVideoDefFormat(virBufferPtr buf, virBufferAsprintf(buf, " vgamem=3D'%u'", def->vgamem); if (def->heads) virBufferAsprintf(buf, " heads=3D'%u'", def->heads); + if (def->xres) + virBufferAsprintf(buf, " xres=3D'%u'", def->xres); + if (def->yres) + virBufferAsprintf(buf, " yres=3D'%u'", def->yres); if (def->primary) virBufferAddLit(buf, " primary=3D'yes'"); if (def->accel) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8a4425df64..bfee86efcf 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1419,6 +1419,8 @@ struct _virDomainVideoDef { unsigned int vram64; /* kibibytes (multiples of 1024) */ unsigned int vgamem; /* kibibytes (multiples of 1024) */ unsigned int heads; + unsigned int xres; + unsigned int yres; bool primary; virDomainVideoAccelDefPtr accel; virDomainVideoDriverDefPtr driver; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list