From patchwork Fri Aug 23 16:21:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 172117 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp886065ily; Fri, 23 Aug 2019 09:22:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsri1nIKPfRvkpQm3c2+2x1pVJluWQkb44sqm9dPC9t5b4OyKl01HD0TGzuHvVflpUgGqU X-Received: by 2002:ac8:21bd:: with SMTP id 58mr5663463qty.192.1566577351629; Fri, 23 Aug 2019 09:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566577351; cv=none; d=google.com; s=arc-20160816; b=GpSWcE6gYHp8gO4R3HvcY46DOgZa8gIsHWKluWrl/ShhwYJE+9o2+wjSWA9y2QCRmk IGO7tAybM28hNGiieRO4HkhZhEEImGfBcCtg9NPXZUnfRJwwsmAsbrBQfENjMqwIDyHm eRY27IDoEgHbVmU5hw5DHLmqUO17TsAZdkkGDokCWqYPsWbRFye+Y2lhsq4hNLNM/9Ky 5qDRhkUf7IDhp7fZJOwI1i/GQ4GcfrG8ruDmrxoftMIjb5uXU/f2TgU9annzYkrdG3rh TmBdCd1/OqPiluPP1xyvocgEtE2pNbXzJQCVHZe9H9Yf4uGhWOvVws3LHU+URhRqseSF /Cww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=OhJ4aSjXADNqQ07RCTV5gV91e9QW/Q50WeIbFeyAsa4=; b=BD4jqyJt9LG9o0cJ2DMjxxGN6/WtB3uQ/+vfy9M9yFHdoOXjrFl1eWPJGUy68t0LUa RR3u+YCtSQqEd4EncoVQ59Djs+0dBZ2G9xFmUEFg6WidOraITI/pSWCMny/EsT/EqnVq XSxjDNd2rsC7xJ7daDZwkWzMp+2d4t+RCCJzvRuc/zWxU6c+1ou2wRRPo2QZqUR1zbJN CCalR1Gg/psKnWuP6yHrVJ4iLnNEVNOZTLiTHwSCsjIb8ogdo10JePLl50oZlMrXeN8G rzHN4bO2JFSPgZMf4gE7sP3Ba0e78c95/xTgNDAYIYcKsIZ7IHbgzRmyDwuhAZbpObzr 2ghg== 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 t13si2385928qkj.183.2019.08.23.09.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 09:22:31 -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-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A60F30860BE; Fri, 23 Aug 2019 16:22:30 +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 2C12C60A9F; Fri, 23 Aug 2019 16:22:30 +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 DF5FC24F34; Fri, 23 Aug 2019 16:22:29 +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 x7NGM7sd006012 for ; Fri, 23 Aug 2019 12:22:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8BEEA60605; Fri, 23 Aug 2019 16:22:07 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-122-169.rdu2.redhat.com [10.10.122.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1969F6092D; Fri, 23 Aug 2019 16:22:07 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Aug 2019 12:21:50 -0400 Message-Id: <58e9b4aefdd87f77f681955746ff93e62bb98c5c.1566576129.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [libvirt] [PATCH v2 06/16] qemu: check that qemu is vhost-user-vga capable 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 23 Aug 2019 16:22:30 +0000 (UTC) From: Marc-André Lureau To support virtio VGA with vhost-user, vhost-user-vga device is necessary. Signed-off-by: Marc-André Lureau Signed-off-by: Cole Robinson Reviewed-by: Ján Tomko --- src/qemu/qemu_domain.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d0722f8761..bf0531126d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -12386,9 +12386,14 @@ bool qemuDomainSupportsVideoVga(virDomainVideoDefPtr video, virQEMUCapsPtr qemuCaps) { - if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_VGA)) - return false; + if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO) { + if (video->vhostuser) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_VGA)) + return false; + } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_VGA)) { + return false; + } + } return true; }