Skip to content


Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request'…
Browse files Browse the repository at this point in the history
… 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 <>"
# 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 <>
  • Loading branch information
pm215 committed Mar 2, 2017
2 parents f1d6405 + b8097de commit 666095c
Show file tree
Hide file tree
Showing 5 changed files with 397 additions and 81 deletions.
4 changes: 3 additions & 1 deletion monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,10 @@ static void qmp_unregister_commands_hack(void)
#ifndef TARGET_ARM
#if !defined(TARGET_S390X)
#if !defined(TARGET_S390X) && !defined(TARGET_I386)
#if !defined(TARGET_S390X)
Expand Down
9 changes: 9 additions & 0 deletions qapi-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4274,6 +4274,15 @@
# migration-safe, but allows tooling to get an insight and work with
# model details.
# Note: When a non-migration-safe CPU model is expanded in static mode, some
# features enabled by the CPU model may be omitted, because they can't be
# implemented by a static CPU model definition (e.g. cache info passthrough and
# PMU passthrough in x86). If you need an accurate representation of the
# features enabled by a non-migration-safe CPU model, use @full. If you need a
# static representation that will keep ABI compatibility even when changing QEMU
# version or machine-type, use @static (but keep in mind that some features may
# be omitted).
# Since: 2.8.0
{ 'enum': 'CpuModelExpansionType',
Expand Down
8 changes: 7 additions & 1 deletion target/i386/cpu-qom.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ typedef struct X86CPUDefinition X86CPUDefinition;
* X86CPUClass:
* @cpu_def: CPU model definition
* @kvm_required: Whether CPU model requires KVM to be enabled.
* @ordering: Ordering on the "-cpu help" CPU model list.
* @migration_safe: See CpuDefinitionInfo::migration_safe
* @static_model: See CpuDefinitionInfo::static
* @parent_realize: The parent class' realize handler.
* @parent_reset: The parent class' reset handler.
Expand All @@ -59,11 +61,15 @@ typedef struct X86CPUClass {
CPUClass parent_class;
/*< public >*/

/* Should be eventually replaced by subclass-specific property defaults. */
/* CPU definition, automatically loaded by instance_init if not NULL.
* Should be eventually replaced by subclass-specific property defaults.
X86CPUDefinition *cpu_def;

bool kvm_required;
int ordering;
bool migration_safe;
bool static_model;

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

0 comments on commit 666095c

Please sign in to comment.