From patchwork Fri Aug 23 16:21:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 172113 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp885974ily; Fri, 23 Aug 2019 09:22:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmA0AzIFCbugG7byfbNRL460aoNBA2+22YoxZsMDd/7KO5yMPfukRzuyElHDdoY3MPeCIR X-Received: by 2002:a05:620a:1345:: with SMTP id c5mr4709516qkl.109.1566577347075; Fri, 23 Aug 2019 09:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566577347; cv=none; d=google.com; s=arc-20160816; b=OMAW6o8ho0o4RRpK33yJM11rrEFD+kEs//Y1ybYJws0jNwYxIEse19UjQBRp0+yLE3 gBcRb0UTBgo7sDNtcwtnobaB2SSL4gWgkunO7rpGnhcBOP1cJv10ZgJSX6Ot1tNFqf1x MviWU9cn331axPQ48pvgF3kG6+0evF5w93z2f8F9IW74rPn7mqKG+iZ6YaG5Cgpz90z3 8GoQV7mMz9JXoa2lAnwl43OmbCPHM5d4+LhjSiWdWs3YNUPCumwtCb3sjEFrklkNaswK 5Om/t9cPfls1+/IKwV1YFhTkY31ewliZXGn7pOR0PvMrW4ZVJIxGHMLtd3lOyitBjyP4 +Fkg== 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=zYiL0PmFcv/Ngi+rcEYNYb+jqB988T/9G81b1XUz1ok=; b=eHfbAHQN8Rv7qsVBEgMEw4Bj8T29Okzy0OTVVCMUF1NYBm///p2BBt9PMR8ETFPdjy PmuE+g5moS4GIw+Cc0OxRMWAkYCV1SBAkogpUx94JhAda3vlqZCpmLhnEJ/pr7RHooCk iCCPXB/InXnlCsTCFCW9K35nJ+3sOmV07iQ2HhUg8ddDbwcgvdoMzre1OU1l6Pn21sTc MiIMnoWxMptFS6wEZ9GTOZzMh1XoCBOcTgk94FPsDCEF0dQ1bnFv7EmumPgkeyY+Yi2s IbpPILrHA+hlrSIZhokwV6RGtnEd7H+Qk/r7AZ9vx9kE1VEbC+ywoiDyqUt4sVK124QT 3tQQ== 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 c31si2458296qtc.234.2019.08.23.09.22.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 09:22:27 -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-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 D5B33881361; Fri, 23 Aug 2019 16:22:25 +0000 (UTC) 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 B10492634D; Fri, 23 Aug 2019 16:22:25 +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 76ABA180221F; Fri, 23 Aug 2019 16:22:25 +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 x7NGM6oe006004 for ; Fri, 23 Aug 2019 12:22:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id E3DE660606; Fri, 23 Aug 2019 16:22:06 +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 71AEB60872; Fri, 23 Aug 2019 16:22:06 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Aug 2019 12:21:49 -0400 Message-Id: <662e7bc629a2b549b4be48471e36fb798ca08d22.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 05/16] qemu: add vhost-user-gpu capabilities checks 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Fri, 23 Aug 2019 16:22:26 +0000 (UTC) From: Marc-André Lureau Those new devices are merged for QEMU 4.1. Signed-off-by: Marc-André Lureau Signed-off-by: Cole Robinson Reviewed-by: Ján Tomko --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 2 ++ tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 73300128ea..d27f54d16e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -537,6 +537,8 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 335 */ "bochs-display", "migration-file-drop-cache", + "vhost-user-gpu", + "vhost-user-vga", ); @@ -1127,6 +1129,8 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "virtio-serial-pci-non-transitional", QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL }, { "max-x86_64-cpu", QEMU_CAPS_X86_MAX_CPU }, { "bochs-display", QEMU_CAPS_DEVICE_BOCHS_DISPLAY }, + { "vhost-user-gpu", QEMU_CAPS_DEVICE_VHOST_USER_GPU }, + { "vhost-user-vga", QEMU_CAPS_DEVICE_VHOST_USER_VGA }, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 68ef6c49b4..6f1e1dd2f3 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -518,6 +518,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 335 */ QEMU_CAPS_DEVICE_BOCHS_DISPLAY, /* -device bochs-display */ QEMU_CAPS_MIGRATION_FILE_DROP_CACHE, /* migration with disk cache on is safe for type='file' disks */ + QEMU_CAPS_DEVICE_VHOST_USER_GPU, /* -device vhost-user-gpu */ + QEMU_CAPS_DEVICE_VHOST_USER_VGA, /* -device vhost-user-vga */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml index f4583d7fe7..5d4540b3f7 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -209,6 +209,8 @@ + + 4000050 0 43100759