aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-i386/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index eb1825b53d..b43847835b 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1751,6 +1751,7 @@ X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge,
CPUX86State *env;
gchar **model_pieces;
char *name, *features;
+ char *typename;
Error *error = NULL;
model_pieces = g_strsplit(cpu_model, ",", 2);
@@ -1778,6 +1779,14 @@ X86CPU *cpu_x86_create(const char *cpu_model, DeviceState *icc_bridge,
goto out;
}
+ /* Emulate per-model subclasses for global properties */
+ typename = g_strdup_printf("%s-" TYPE_X86_CPU, name);
+ qdev_prop_set_globals_for_type(DEVICE(cpu), typename, &error);
+ g_free(typename);
+ if (error) {
+ goto out;
+ }
+
cpu_x86_parse_featurestr(cpu, features, &error);
if (error) {
goto out;