diff mbox

[v5] target-i386: Register QOM properties for feature flags

Message ID 20150522191355.GG28075@thinpad.lan.raisama.net
State New
Headers show

Commit Message

Eduardo Habkost May 22, 2015, 7:13 p.m. UTC
On Tue, Apr 14, 2015 at 12:28:24PM -0300, Eduardo Habkost wrote:
> This uses the feature name arrays to register QOM properties for feature
> flags. This simply adds properties that can be configured using -global,
> but doesn't change x86_cpu_parse_featurestr() to use them yet.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

This is being applied to x86 tree with the following change, because the
object_property_add_alias() strdup() fix wasn't merged yet.


The g_strdup() call will be removed after the
object_property_add_alias() fix is applied.
diff mbox

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index b2cf128..7042117 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2947,7 +2947,8 @@  static void x86_cpu_register_feature_bit_props(X86CPU *cpu,
 
     for (i = 1; names[i]; i++) {
         feat2prop(names[i]);
-        object_property_add_alias(obj, names[i], obj, names[0], &error_abort);
+        object_property_add_alias(obj, names[i], obj, g_strdup(names[0]),
+                                  &error_abort);
     }
 
     g_strfreev(names);