From nobody Sun May 5 22:57:47 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 ARC-Seal: i=1; a=rsa-sha256; t=1561060335; cv=none; d=zoho.com; s=zohoarc; b=k9n0tqP7rRnIrtjTljG1HHdbtOkuoCALw2SlnTwleUfM1qKiYdM40TTsXg2Lotx45+NZTGRuJRzIw35Ir8M0b9NzIOJXrBqmopvss6KteCnYuhtyGG3VefWcMBfG/tNxEWxuh/JeZtZWRXfHx2pX0k1FJfiGZuxKLJIOo3aaPeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561060335; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=VjbSInKKoGqmE0yU7LHB80cGcda2lvqHlxWK1JEPzdo=; b=VO5L6xb4MEkfqMa13ly4IF9yj10vlnTE1Sdd2Lyv/HqEZw69pWA/nZ1PyYRy8dh7QpKo46XVDjBhtS66Whxv894QDtfmc3lrNkGAlfJEanu6kIdTXaeItR7nwFa6CYI21GBQexfH9QCVW8vE44AMapVtlBcAOJHSWRLVuE1+YfU= ARC-Authentication-Results: i=1; mx.zoho.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 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 1561060335961620.6683918595786; Thu, 20 Jun 2019 12:52:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0FB830860BC; Thu, 20 Jun 2019 19:51:46 +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 5E22C5C21E; Thu, 20 Jun 2019 19:51:37 +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 5AD15C57E; Thu, 20 Jun 2019 19:51:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5KJpK3v012262 for ; Thu, 20 Jun 2019 15:51:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 94B821001B27; Thu, 20 Jun 2019 19:51:20 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-198.phx2.redhat.com [10.3.117.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 638281001E65 for ; Thu, 20 Jun 2019 19:51:17 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Thu, 20 Jun 2019 14:51:12 -0500 Message-Id: <20190620195112.26695-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] Don't parse/format vram attribute for cirrus video 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 20 Jun 2019 19:52:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Since the cirrus vga memory size isn't configurable, we can ignore any 'vram' attribute when parsing a domain definition. However, when no value is specified, it ends up getting set to a default value of 16MB. This 16MB value is not used anywhere (for example, it is not passed as an argument to qemu), but is displayed in the XML definition. So by changing this default value to 0, it will also be omitted from the XML definition of the domain. Fixes: rhbz#1447831 Signed-off-by: Jonathon Jongsma --- This is an attempt to apply the fix suggested by Gerd at https://bugzilla.redhat.com/show_bug.cgi?id=3D1447831#c2. I'm not totally confident that this is the right approach, since I'm relatively new to the code. Another approach might be to simply close the bug as NOTABUG since it doesn't seem that having this unused attribute in the domain definition has any significant drawbacks. src/conf/domain_conf.c | 2 +- src/qemu/qemu_domain.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c69d382d70..d06e094b11 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15154,7 +15154,6 @@ virDomainVideoDefaultRAM(const virDomainDef *def, { switch (type) { case VIR_DOMAIN_VIDEO_TYPE_VGA: - case VIR_DOMAIN_VIDEO_TYPE_CIRRUS: case VIR_DOMAIN_VIDEO_TYPE_VMVGA: if (def->virtType =3D=3D VIR_DOMAIN_VIRT_VBOX) return 8 * 1024; @@ -15172,6 +15171,7 @@ virDomainVideoDefaultRAM(const virDomainDef *def, /* QEMU use 64M as the minimal video memory for qxl device */ return 64 * 1024; =20 + case VIR_DOMAIN_VIDEO_TYPE_CIRRUS: case VIR_DOMAIN_VIDEO_TYPE_DEFAULT: case VIR_DOMAIN_VIDEO_TYPE_VBOX: case VIR_DOMAIN_VIDEO_TYPE_PARALLELS: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e5c6ef3fda..7f0baf57ac 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6835,6 +6835,9 @@ qemuDomainDeviceVideoDefPostParse(virDomainVideoDefPt= r video, if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_QXL && !video->vgamem) { video->vgamem =3D QEMU_QXL_VGAMEM_DEFAULT; + } else if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_CIRRUS) { + /* cirrus vram is not configurable. Ignore it */ + video->vram =3D 0; } =20 return 0; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list