From patchwork Tue Nov 6 10:23:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 10670051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F11814E2 for ; Tue, 6 Nov 2018 10:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9A9284B5 for ; Tue, 6 Nov 2018 10:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12A652857D; Tue, 6 Nov 2018 10:43:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BAD23284B5 for ; Tue, 6 Nov 2018 10:43:52 +0000 (UTC) Received: from localhost ([::1]:40157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJyps-0006Ig-2k for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Nov 2018 05:43:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJykL-0005Rx-Sf for qemu-devel@nongnu.org; Tue, 06 Nov 2018 05:38:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJyWQ-0005H4-Gy for qemu-devel@nongnu.org; Tue, 06 Nov 2018 05:23:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJyWQ-0005GV-AJ; Tue, 06 Nov 2018 05:23:46 -0500 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 4D8393086258; Tue, 6 Nov 2018 10:23:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D1FC648A3; Tue, 6 Nov 2018 10:23:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D48848FB0; Tue, 6 Nov 2018 11:23:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 6 Nov 2018 11:23:35 +0100 Message-Id: <20181106102335.20027-7-kraxel@redhat.com> In-Reply-To: <20181106102335.20027-1-kraxel@redhat.com> References: <20181106102335.20027-1-kraxel@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.49]); Tue, 06 Nov 2018 10:23:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 6/6] add UsageHints to QemuSupportState X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , Alexander Graf , Markus Armbruster , =?utf-8?q?Herv=C3=A9_Poussineau?= , qemu-ppc@nongnu.org, Gerd Hoffmann , Paolo Bonzini , Richard Henderson , =?utf-8?q?Andreas_F=C3=A4rber?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP So we can add device usage recommendations to devices, independant from support state. Signed-off-by: Gerd Hoffmann --- include/qemu/support-state.h | 1 + qapi/common.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/include/qemu/support-state.h b/include/qemu/support-state.h index 6567d8702b..6ea0d03bd5 100644 --- a/include/qemu/support-state.h +++ b/include/qemu/support-state.h @@ -5,6 +5,7 @@ typedef struct QemuSupportState { SupportState state; + UsageHints hints; const char *help; } QemuSupportState; diff --git a/qapi/common.json b/qapi/common.json index 00374127b8..6952ea2074 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -183,3 +183,32 @@ 'unsupported', 'obsolete', 'deprecated' ] } + +## +# @UsageHints: +# +# Usage recommendations. +# +# @unspecified: not specified (zero-initialized). +# +# @green: Best choice. Typically paravirtual devices go into this +# category. +# Example (nic): virtio-net. +# Example (usb); xhci. +# +# @yellow: Reasonable choice. Typically emulated devices with +# good performance go into this category. +# Example (nic): e1000, e1000e +# +# @red: Bad choice. Avoid this unless you run an old guest which +# lacks support for something better. +# Example (nic): rtl8139, pcnet, ne2k, ... +# Example (usb): ehci, uhci, ohci +# +# Since: 3.2 +## +{ 'enum': 'UsageHints', + 'data': [ 'unspecified', + 'green', + 'yellow', + 'red' ] }