Commit 96f75b59 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Markus Armbruster
Browse files

qapi: make query-cpu-model-expansion depend on s390 or x86



Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Acked-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-Id: <20190214152251.2073-14-armbru@redhat.com>
parent 84c6499e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -33,7 +33,4 @@ int kvm_available(void);
int xen_available(void);

CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp);
CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionType type,
                                                      CpuModelInfo *mode,
                                                      Error **errp);
#endif
+0 −3
Original line number Diff line number Diff line
@@ -1145,9 +1145,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
 */
static void qmp_unregister_commands_hack(void)
{
#if !defined(TARGET_S390X) && !defined(TARGET_I386)
    qmp_unregister_command(&qmp_commands, "query-cpu-model-expansion");
#endif
#if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \
    && !defined(TARGET_S390X)
    qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
+0 −51
Original line number Diff line number Diff line
@@ -2199,57 +2199,6 @@
  'data': [ 'static', 'full' ] }


##
# @CpuModelExpansionInfo:
#
# The result of a cpu model expansion.
#
# @model: the expanded CpuModelInfo.
#
# Since: 2.8.0
##
{ 'struct': 'CpuModelExpansionInfo',
  'data': { 'model': 'CpuModelInfo' } }


##
# @query-cpu-model-expansion:
#
# Expands a given CPU model (or a combination of CPU model + additional options)
# to different granularities, allowing tooling to get an understanding what a
# specific CPU model looks like in QEMU under a certain configuration.
#
# This interface can be used to query the "host" CPU model.
#
# The data returned by this command may be affected by:
#
# * QEMU version: CPU models may look different depending on the QEMU version.
#   (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine-type: CPU model  may look different depending on the machine-type.
#   (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine options (including accelerator): in some architectures, CPU models
#   may look different depending on machine and accelerator options. (Except for
#   CPU models reported as "static" in query-cpu-definitions.)
# * "-cpu" arguments and global properties: arguments to the -cpu option and
#   global properties may affect expansion of CPU models. Using
#   query-cpu-model-expansion while using these is not advised.
#
# Some architectures may not support all expansion types. s390x supports
# "full" and "static".
#
# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
#          not supported, if the model cannot be expanded, if the model contains
#          an unknown CPU definition name, unknown properties or properties
#          with a wrong type. Also returns an error if an expansion type is
#          not supported.
#
# Since: 2.8.0
##
{ 'command': 'query-cpu-model-expansion',
  'data': { 'type': 'CpuModelExpansionType',
            'model': 'CpuModelInfo' },
  'returns': 'CpuModelExpansionInfo' }

##
# @CpuModelCompareResult:
#
+52 −0
Original line number Diff line number Diff line
@@ -373,3 +373,55 @@
##
{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
  'if': 'defined(TARGET_ARM)' }

##
# @CpuModelExpansionInfo:
#
# The result of a cpu model expansion.
#
# @model: the expanded CpuModelInfo.
#
# Since: 2.8.0
##
{ 'struct': 'CpuModelExpansionInfo',
  'data': { 'model': 'CpuModelInfo' },
  'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }

##
# @query-cpu-model-expansion:
#
# Expands a given CPU model (or a combination of CPU model + additional options)
# to different granularities, allowing tooling to get an understanding what a
# specific CPU model looks like in QEMU under a certain configuration.
#
# This interface can be used to query the "host" CPU model.
#
# The data returned by this command may be affected by:
#
# * QEMU version: CPU models may look different depending on the QEMU version.
#   (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine-type: CPU model  may look different depending on the machine-type.
#   (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine options (including accelerator): in some architectures, CPU models
#   may look different depending on machine and accelerator options. (Except for
#   CPU models reported as "static" in query-cpu-definitions.)
# * "-cpu" arguments and global properties: arguments to the -cpu option and
#   global properties may affect expansion of CPU models. Using
#   query-cpu-model-expansion while using these is not advised.
#
# Some architectures may not support all expansion types. s390x supports
# "full" and "static".
#
# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
#          not supported, if the model cannot be expanded, if the model contains
#          an unknown CPU definition name, unknown properties or properties
#          with a wrong type. Also returns an error if an expansion type is
#          not supported.
#
# Since: 2.8.0
##
{ 'command': 'query-cpu-model-expansion',
  'data': { 'type': 'CpuModelExpansionType',
            'model': 'CpuModelInfo' },
  'returns': 'CpuModelExpansionInfo',
  'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }
+0 −7
Original line number Diff line number Diff line
@@ -610,13 +610,6 @@ CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)
    return arch_query_cpu_definitions(errp);
}

CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
                                                     CpuModelInfo *model,
                                                     Error **errp)
{
    return arch_query_cpu_model_expansion(type, model, errp);
}

void qmp_add_client(const char *protocol, const char *fdname,
                    bool has_skipauth, bool skipauth, bool has_tls, bool tls,
                    Error **errp)
Loading