aboutsummaryrefslogtreecommitdiff
path: root/target-i386/cpu.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2013-01-11 03:10:15 +0100
committerAndreas Färber <afaerber@suse.de>2013-01-15 04:09:14 +0100
commit077c68c32897ea02b88c9a919627d93d3878ef15 (patch)
tree5eb938e58379c1d4494ae6ff263c84384bec2690 /target-i386/cpu.c
parent07ca59450c9a0c5df65665ce46aa8487af59a1dd (diff)
target-i386: Move setting defaults out of cpu_x86_parse_featurestr()
No functional change, needed for simplifying conversion to properties. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r--target-i386/cpu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 9a48e3f007..e75b293f0f 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1343,15 +1343,11 @@ static int cpu_x86_parse_featurestr(x86_def_t *x86_cpu_def, char *features)
unsigned int i;
char *featurestr; /* Single 'key=value" string being parsed */
/* Features to be added */
- FeatureWordArray plus_features = {
- [FEAT_KVM] = kvm_default_features,
- };
+ FeatureWordArray plus_features = { 0 };
/* Features to be removed */
FeatureWordArray minus_features = { 0 };
uint32_t numvalue;
- add_flagname_to_bitmaps("hypervisor", plus_features);
-
featurestr = features ? strtok(features, ",") : NULL;
while (featurestr) {
@@ -1607,6 +1603,9 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
goto error;
}
+ def->kvm_features |= kvm_default_features;
+ def->ext_features |= CPUID_EXT_HYPERVISOR;
+
if (cpu_x86_parse_featurestr(def, features) < 0) {
goto error;
}