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 From: Gerd Hoffmann 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> Subject: [Qemu-devel] [PATCH v2 6/6] add UsageHints to QemuSupportState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Alexander Graf , Eduardo Habkost , Marcel Apfelbaum , "Michael S. Tsirkin" , David Gibson , Eric Blake , qemu-ppc@nongnu.org, Richard Henderson , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Markus Armbruster , Gerd Hoffmann , =?UTF-8?q?Herv=C3=A9=20Poussineau?= 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' ] } -- 2.9.3