From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq2tA-00032I-HU for qemu-devel@nongnu.org; Fri, 30 Sep 2016 14:50:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq2t9-0003IL-91 for qemu-devel@nongnu.org; Fri, 30 Sep 2016 14:50:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq2t9-0003IC-07 for qemu-devel@nongnu.org; Fri, 30 Sep 2016 14:50:27 -0400 From: Eduardo Habkost Date: Fri, 30 Sep 2016 15:49:45 -0300 Message-Id: <1475261386-20211-12-git-send-email-ehabkost@redhat.com> In-Reply-To: <1475261386-20211-1-git-send-email-ehabkost@redhat.com> References: <1475261386-20211-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH v5 11/12] qmp: Add runnability information to query-cpu-definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dahi@linux.vnet.ibm.com, Paolo Bonzini , Igor Mammedov , Jiri Denemark , Markus Armbruster , Richard Henderson , libvir-list@redhat.com, Michael Mueller , Christian Borntraeger , Cornelia Huck Add a new optional field to query-cpu-definitions schema: "unavailable-features". It will contain a list of QOM properties that prevent the CPU model from running in the current host. Cc: David Hildenbrand Cc: Michael Mueller Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Jiri Denemark Cc: libvir-list@redhat.com Reviewed-by: Eric Blake Signed-off-by: Eduardo Habkost --- Changes v3 -> v4: * Changed doc to "since 2.8" as we missed 2.7 * Reported-by: Eric Blake Changes v2 -> v3: * Small documentation reword * Suggested-by: Markus Armbruster Changes v1 -> v2: * Remove @runnable field, non-empty @unavailable-features is enough to report CPU model as not runnable. * Documentation updates: * Changed to "(since 2.7)"; * Add more details about the exact meaning of unavailable-features, and what it would mean to see read-only QOM properties in the list, and that implementations can return "type" if there's no extra information available; --- qapi-schema.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index c3dcf11..abb163b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3114,10 +3114,31 @@ # QEMU version, machine type, machine options and accelerator options. # A static model is always migration-safe. (since 2.8) # +# @unavailable-features: #optional List of properties that prevent +# the CPU model from running in the current +# host. (since 2.8) +# +# @unavailable-features is a list of QOM property names that +# represent CPU model attributes that prevent the CPU from running. +# If the QOM property is read-only, that means there's no known +# way to make the CPU model run in the current host. Implementations +# that choose not to provide specific information return the +# property name "type". +# If the property is read-write, it means that it MAY be possible +# to run the CPU model in the current host if that property is +# changed. Management software can use it as hints to suggest or +# choose an alternative for the user, or just to generate meaningful +# error messages explaining why the CPU model can't be used. +# If @unavailable-features is an empty list, the CPU model is +# runnable using the current host and machine-type. +# If @unavailable-features is not present, runnability +# information for the CPU is not available. +# # Since: 1.2.0 ## { 'struct': 'CpuDefinitionInfo', - 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool' } } + 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', + '*unavailable-features': [ 'str' ] } } ## # @query-cpu-definitions: -- 2.7.4