target/arm/monitor: Introduce qmp_query_cpu_model_expansion
commite19afd5667819d74ab25d1a1171efe7b5002c6ee
authorAndrew Jones <drjones@redhat.com>
Thu, 31 Oct 2019 14:27:26 +0000 (31 15:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 1 Nov 2019 08:49:10 +0000 (1 08:49 +0000)
treeb9808f7fa19b524e56c4feca31af7b8879ebae9d
parentb7c9a7f353c0e260519bf735ff0d4aa01e72784b
target/arm/monitor: Introduce qmp_query_cpu_model_expansion

Add support for the query-cpu-model-expansion QMP command to Arm. We
do this selectively, only exposing CPU properties which represent
optional CPU features which the user may want to enable/disable.
Additionally we restrict the list of queryable cpu models to 'max',
'host', or the current type when KVM is in use. And, finally, we only
implement expansion type 'full', as Arm does not yet have a "base"
CPU type. More details and example queries are described in a new
document (docs/arm-cpu-features.rst).

Note, certainly more features may be added to the list of advertised
features, e.g. 'vfp' and 'neon'. The only requirement is that we can
detect invalid configurations and emit failures at QMP query time.
For 'vfp' and 'neon' this will require some refactoring to share a
validation function between the QMP query and the CPU realize
functions.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Beata Michalska <beata.michalska@linaro.org>
Message-id: 20191031142734.8590-2-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/arm-cpu-features.rst [new file with mode: 0644]
qapi/machine-target.json
target/arm/monitor.c