[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 11/21] qapi: Make CpuDefinitionInfo target agnostic
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 11/21] qapi: Make CpuDefinitionInfo target agnostic |
Date: |
Fri, 15 Mar 2024 14:08:59 +0100 |
Generate the CpuDefinitionInfo type once for all targets.
In few commits @query-cpu-definitions will become generic
and all target will return their CPUs list.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
qapi/machine-target.json | 69 ----------------------------------------
qapi/machine.json | 63 ++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 69 deletions(-)
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index 0412400df3..7480921d33 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -212,75 +212,6 @@
'TARGET_LOONGARCH64',
'TARGET_RISCV' ] } }
-##
-# @CpuDefinitionInfo:
-#
-# Virtual CPU definition.
-#
-# @name: the name of the CPU definition
-#
-# @migration-safe: whether a CPU definition can be safely used for
-# migration in combination with a QEMU compatibility machine when
-# migrating between different QEMU versions and between hosts with
-# different sets of (hardware or software) capabilities. If not
-# provided, information is not available and callers should not
-# assume the CPU definition to be migration-safe. (since 2.8)
-#
-# @static: whether a CPU definition is static and will not change
-# depending on QEMU version, machine type, machine options and
-# accelerator options. A static model is always migration-safe.
-# (since 2.8)
-#
-# @unavailable-features: List of properties that prevent the CPU model
-# from running in the current host. (since 2.8)
-#
-# @typename: Type name that can be used as argument to
-# @device-list-properties, to introspect properties configurable
-# using -cpu or -global. (since 2.9)
-#
-# @alias-of: Name of CPU model this model is an alias for. The target
-# of the CPU model alias may change depending on the machine type.
-# Management software is supposed to translate CPU model aliases
-# in the VM configuration, because aliases may stop being
-# migration-safe in the future (since 4.1)
-#
-# @deprecated: If true, this CPU model is deprecated and may be
-# removed in in some future version of QEMU according to the QEMU
-# deprecation policy. (since 5.2)
-#
-# @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
-##
-{ 'struct': 'CpuDefinitionInfo',
- 'data': { 'name': 'str',
- '*migration-safe': 'bool',
- 'static': 'bool',
- '*unavailable-features': [ 'str' ],
- 'typename': 'str',
- '*alias-of' : 'str',
- 'deprecated' : 'bool' },
- 'if': { 'any': [ 'TARGET_PPC',
- 'TARGET_ARM',
- 'TARGET_I386',
- 'TARGET_S390X',
- 'TARGET_MIPS',
- 'TARGET_LOONGARCH64',
- 'TARGET_RISCV' ] } }
-
##
# @query-cpu-definitions:
#
diff --git a/qapi/machine.json b/qapi/machine.json
index 65702c2c78..9c44b8fa82 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -10,6 +10,69 @@
{ 'include': 'common.json' }
+##
+# @CpuDefinitionInfo:
+#
+# Virtual CPU definition.
+#
+# @name: the name of the CPU definition
+#
+# @migration-safe: whether a CPU definition can be safely used for
+# migration in combination with a QEMU compatibility machine when
+# migrating between different QEMU versions and between hosts with
+# different sets of (hardware or software) capabilities. If not
+# provided, information is not available and callers should not
+# assume the CPU definition to be migration-safe. (since 2.8)
+#
+# @static: whether a CPU definition is static and will not change
+# depending on QEMU version, machine type, machine options and
+# accelerator options. A static model is always migration-safe.
+# (since 2.8)
+#
+# @unavailable-features: List of properties that prevent the CPU model
+# from running in the current host. (since 2.8)
+#
+# @typename: Type name that can be used as argument to
+# @device-list-properties, to introspect properties configurable
+# using -cpu or -global. (since 2.9)
+#
+# @alias-of: Name of CPU model this model is an alias for. The target
+# of the CPU model alias may change depending on the machine type.
+# Management software is supposed to translate CPU model aliases
+# in the VM configuration, because aliases may stop being
+# migration-safe in the future (since 4.1)
+#
+# @deprecated: If true, this CPU model is deprecated and may be
+# removed in in some future version of QEMU according to the QEMU
+# deprecation policy. (since 5.2)
+#
+# @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
+##
+{ 'struct': 'CpuDefinitionInfo',
+ 'data': { 'name': 'str',
+ '*migration-safe': 'bool',
+ 'static': 'bool',
+ '*unavailable-features': [ 'str' ],
+ 'typename': 'str',
+ '*alias-of' : 'str',
+ 'deprecated' : 'bool' }
+}
+
##
# @CpuModelInfo:
#
--
2.41.0
- Re: [PATCH-for-9.1 09/21] qapi: Merge machine-common.json with qapi/machine.json, (continued)
- [PATCH-for-9.1 05/21] cpus: Open code OBJECT_DECLARE_TYPE() in OBJECT_DECLARE_CPU_TYPE(), Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 07/21] target/mips: Make MIPS_CPU common to new MIPS32_CPU / MIPS64_CPU types, Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 15/21] target/arm: Use QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 08/21] target/sparc: Make SPARC_CPU common to new SPARC32_CPU/SPARC64_CPU types, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 10/21] qapi: Make CpuModel* definitions target agnostic, Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 11/21] qapi: Make CpuDefinitionInfo target agnostic,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 12/21] system: Introduce QemuArchBit enum, Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 16/21] target/loongarch: Use QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 17/21] target/riscv: Use QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 13/21] system: Introduce cpu_typename_by_arch_bit(), Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 14/21] system: Introduce QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15
- [RFC PATCH-for-9.1 18/21] target/i386: Use QMP generic_query_cpu_definitions(), Philippe Mathieu-Daudé, 2024/03/15
- [PATCH-for-9.1 19/21] target/ppc: Factor ppc_add_alias_definitions() out, Philippe Mathieu-Daudé, 2024/03/15