From patchwork Sun Aug 27 15:04:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 111085 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp3665612qge; Sun, 27 Aug 2017 08:05:05 -0700 (PDT) X-Received: by 10.55.7.143 with SMTP id 137mr6348932qkh.209.1503846305459; Sun, 27 Aug 2017 08:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503846305; cv=none; d=google.com; s=arc-20160816; b=YTvaxH1KE5CiFOF/nQlF0hRQVNw5Hs2PNTx07gHEeLut3iXdlC5YeoBAkWnW5NuxdH XRDuHSUCynJIsZYwN/AY30tKcDAloWrT0T4B1QUQdJlRFTU92LgQUPOKHYCCLRttc1cz 85wooGiyCvwP1QMU31KtishYpfvSkKTS46aNGIaJ5FLLT6xX1ZLq0GufXQiF0kS4ZXqk LdnVz9ucisuBnoQTcwMOPvf+/h3cnsbs/h7ExWs0jS6eD6L1qcoI5FNei/keutetXwU6 DmNTiOH+LyagV4Lu0/zv4kg3WUO6ppSiyr4USec5hLILB4KL3wzpxgFj6wvQOM4/wVSu tF9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to:dmarc-filter :arc-authentication-results; bh=53zq0PivWE++WeuLPQ5Q1KQI/Nab2m0qXwiw2XqXKVs=; b=OiE6VwjoXJrKRt1WeOlitXL0uHClCM9XB7ZznUnigWw8y5ktwvYR5EcoR0M1Ouzko/ hJ8RVFdYUFjsgIzjXxzewny/FPCFBXn350AQ8SZ+d28RwrYU7r2YY3tc2ZM+EM7cMDwV Q6pnt7JWita9Mhbevw+VDQAnPTasB1v9NmopXJRgnALr+fc4C5vX4nv9pk48Cb2XGo2J +3NRetRepxUXo0da9YL7dLw+PbJGLPV7l0L2vZ2E6rlha6omYr9P+U9gzNUojzeSp3Mq FGJONwjpsbcesLqWWQSSHl+u21AzOEHYN7uPVEvuNXULk3jsRjLiaI+e3FhZJ5zOLBkW HNYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id o89si1928592qki.544.2017.08.27.08.05.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Aug 2017 08:05:05 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D556581E16; Sun, 27 Aug 2017 15:05:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D556581E16 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com 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 B05CA5D964; Sun, 27 Aug 2017 15:05: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 57A623FAD1; Sun, 27 Aug 2017 15:05:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7RF4npQ015480 for ; Sun, 27 Aug 2017 11:04:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id BC8266E8F4; Sun, 27 Aug 2017 15:04:49 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from colepc.redhat.com (ovpn-116-34.phx2.redhat.com [10.3.116.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53EE26E8F5; Sun, 27 Aug 2017 15:04:49 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Sun, 27 Aug 2017 11:04:41 -0400 Message-Id: <9435376be7e1c5f88a66175bf016751cf41aff9a.1503846114.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/5] qemu: Set default video type in qemu PostParse 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 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sun, 27 Aug 2017 15:05:04 +0000 (UTC) And not generic domain_conf code. We will need qemu private functions in a bit. Signed-off-by: Cole Robinson --- src/conf/domain_conf.c | 3 --- src/qemu/qemu_domain.c | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Pavel Hrdina diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e902ea9a8..c0515bb2b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13852,9 +13852,6 @@ virDomainVideoDefaultType(const virDomainDef *def) { switch (def->virtType) { case VIR_DOMAIN_VIRT_TEST: - case VIR_DOMAIN_VIRT_QEMU: - case VIR_DOMAIN_VIRT_KQEMU: - case VIR_DOMAIN_VIRT_KVM: case VIR_DOMAIN_VIRT_XEN: if (def->os.type == VIR_DOMAIN_OSTYPE_XEN || def->os.type == VIR_DOMAIN_OSTYPE_LINUX) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1c6b1ba79..7d8c2c1ce 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3667,6 +3667,13 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, } if (dev->type == VIR_DOMAIN_DEVICE_VIDEO) { + if (dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) { + if ARCH_IS_PPC64(def->os.arch) + dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VGA; + else + dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS; + } + if (dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_QXL && !dev->data.video->vgamem) { dev->data.video->vgamem = QEMU_QXL_VGAMEM_DEFAULT;