From patchwork Wed Jun 28 18:49:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 106565 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp247357qge; Wed, 28 Jun 2017 11:50:21 -0700 (PDT) X-Received: by 10.55.167.76 with SMTP id q73mr16013302qke.77.1498675821307; Wed, 28 Jun 2017 11:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498675821; cv=none; d=google.com; s=arc-20160816; b=TazR4Sa6qxXceET/8kg/eSGFJvRUeJbwJvPQwfDU4WXK4sZaOcKmxeoAUy5UTY6ovn JNozdNLjEudlhPde5oS37rlymVCoSRusWqbuimjNpStciuIuF9n2MB1G4qBGr+jKRpW4 wjO1YwSKJRvXXxf+Z1HW+L8JK/pQynH++yFpGUDKQXFoiuJxUBwlgdT1ZvkNXhD57iZH 7BvxGClK4JzGNw0heRamFwJ1RFIZZhJc75ck87QUyRoX2MBhoZfl+zrJRXTNj3jRorkB iz9bUnxVBmUy4NM/Uw9M1I8kRTXOBvivkHOeO1O2joLpaKcXEQVa0EtKmWfrYpU7ZSiG O8+Q== 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:dkim-filter :dmarc-filter:arc-authentication-results; bh=pFT27U7xv7d8MFeB79XGfEXSEsARgSrPqrmI/ilqN20=; b=iUbMAtTKC/dcRiqcW4RGLSqj2QImV2ChDBA4ClRuXqJO26RqmvI3wrPoxZytoscs/5 X66xgrcTfbwDCaAqSbLwn1Za837yMSVig970HKO3xynm9pkyfmO/l7vZs8C4QEsvx8eq jdKFBYTDSu+/Zi5zRIXCAvrSKaREpuFpE30yJVq5ZqDDOcPcbKC9SXwcotQpF3GbHR+u E8D6G3BfolpYisSYz1v4WOTqpqGVTwFByg+JgPpcx1OTh1wI9dCGaq0yA1sRMbiVX2Fu 9eqHQB3QTAg03PJGX3vCxRZ8CxUIhZ26S0PkDT7Eh5PEiBDd07Lm7EpHQn5Io7oQoObx +4kw== 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 y62si2647234qtd.3.2017.06.28.11.50.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 11:50:21 -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 10F2A3DBE6; Wed, 28 Jun 2017 18:50:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10F2A3DBE6 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 10F2A3DBE6 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 8BB2C17D65; Wed, 28 Jun 2017 18:50:18 +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 A877A1853E39; Wed, 28 Jun 2017 18:50:14 +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 v5SInj3Q031277 for ; Wed, 28 Jun 2017 14:49:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5F60F62930; Wed, 28 Jun 2017 18:49:45 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-116-174.phx2.redhat.com [10.3.116.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC02A5D6A6; Wed, 28 Jun 2017 18:49:44 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Wed, 28 Jun 2017 14:49:33 -0400 Message-Id: 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 7/8] 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.30]); Wed, 28 Jun 2017 18:50:19 +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.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: John Ferlan diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bb61f4091..1fe620dfb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13551,9 +13551,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 387dade8f..b41b3c5cc 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3581,6 +3581,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;