Skip to content

Commit 666095c

Browse files
committed
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging
x86 queue, 2017-02-27 "-cpu max" and query-cpu-model-expansion support for x86. This should be the last x86 pull request before 2.9 soft freeze. # gpg: Signature made Mon 27 Feb 2017 16:24:15 GMT # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-pull-request: i386: Improve query-cpu-model-expansion full mode i386: Implement query-cpu-model-expansion QMP command i386: Define static "base" CPU model i386: Don't set CPUClass::cpu_def on "max" model i386: Make "max" model not use any host CPUID info on TCG i386: Create "max" CPU model qapi-schema: Comment about full expansion of non-migration-safe models i386: Reorganize and document CPUID initialization steps i386: Rename X86CPU::host_features to X86CPU::max_features i386: Add ordering field to CPUClass i386: Unset cannot_destroy_with_object_finalize_yet on "host" model Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 parents f1d6405 + b8097de commit 666095c

File tree

5 files changed

+397
-81
lines changed

5 files changed

+397
-81
lines changed

monitor.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,8 +984,10 @@ static void qmp_unregister_commands_hack(void)
984984
#ifndef TARGET_ARM
985985
qmp_unregister_command("query-gic-capabilities");
986986
#endif
987-
#if !defined(TARGET_S390X)
987+
#if !defined(TARGET_S390X) && !defined(TARGET_I386)
988988
qmp_unregister_command("query-cpu-model-expansion");
989+
#endif
990+
#if !defined(TARGET_S390X)
989991
qmp_unregister_command("query-cpu-model-baseline");
990992
qmp_unregister_command("query-cpu-model-comparison");
991993
#endif

qapi-schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4274,6 +4274,15 @@
42744274
# migration-safe, but allows tooling to get an insight and work with
42754275
# model details.
42764276
#
4277+
# Note: When a non-migration-safe CPU model is expanded in static mode, some
4278+
# features enabled by the CPU model may be omitted, because they can't be
4279+
# implemented by a static CPU model definition (e.g. cache info passthrough and
4280+
# PMU passthrough in x86). If you need an accurate representation of the
4281+
# features enabled by a non-migration-safe CPU model, use @full. If you need a
4282+
# static representation that will keep ABI compatibility even when changing QEMU
4283+
# version or machine-type, use @static (but keep in mind that some features may
4284+
# be omitted).
4285+
#
42774286
# Since: 2.8.0
42784287
##
42794288
{ 'enum': 'CpuModelExpansionType',

target/i386/cpu-qom.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ typedef struct X86CPUDefinition X86CPUDefinition;
4848
* X86CPUClass:
4949
* @cpu_def: CPU model definition
5050
* @kvm_required: Whether CPU model requires KVM to be enabled.
51+
* @ordering: Ordering on the "-cpu help" CPU model list.
5152
* @migration_safe: See CpuDefinitionInfo::migration_safe
53+
* @static_model: See CpuDefinitionInfo::static
5254
* @parent_realize: The parent class' realize handler.
5355
* @parent_reset: The parent class' reset handler.
5456
*
@@ -59,11 +61,15 @@ typedef struct X86CPUClass {
5961
CPUClass parent_class;
6062
/*< public >*/
6163

62-
/* Should be eventually replaced by subclass-specific property defaults. */
64+
/* CPU definition, automatically loaded by instance_init if not NULL.
65+
* Should be eventually replaced by subclass-specific property defaults.
66+
*/
6367
X86CPUDefinition *cpu_def;
6468

6569
bool kvm_required;
70+
int ordering;
6671
bool migration_safe;
72+
bool static_model;
6773

6874
/* Optional description of CPU model.
6975
* If unavailable, cpu_def->model_id is used */

0 commit comments

Comments
 (0)