[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/23] target-i386: postpone cpuid_level update to r
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 17/23] target-i386: postpone cpuid_level update to realize time |
Date: |
Tue, 2 Oct 2012 17:37:09 +0200 |
delay force set cpuid_level to 7 to realize time so property setters
for cpuid_7_0_ebx_features and "level" could be used in any order/time
between x86_cpu_initfn() and x86_cpu_realize().
Signed-off-by: Igor Mammedov <address@hidden>
---
target-i386/cpu.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 038b37e..0e9a2f1 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1554,9 +1554,7 @@ static int cpu_x86_find_by_name(X86CPU *cpu, x86_def_t
*x86_cpu_def,
x86_cpu_def->kvm_features &= ~minus_kvm_features;
x86_cpu_def->svm_features &= ~minus_svm_features;
x86_cpu_def->cpuid_7_0_ebx_features &= ~minus_7_0_ebx_features;
- if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
- x86_cpu_def->level = 7;
- }
+
g_free(s);
return 0;
@@ -2120,6 +2118,10 @@ void x86_cpu_realize(Object *obj, Error **errp)
return;
}
+ if (env->cpuid_7_0_ebx_features && env->cpuid_level < 7) {
+ env->cpuid_level = 7;
+ }
+
if (!kvm_enabled()) {
env->cpuid_features &= TCG_FEATURES;
env->cpuid_ext_features &= TCG_EXT_FEATURES;
--
1.7.1
- [Qemu-devel] [PATCH 18/23] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, (continued)
- [Qemu-devel] [PATCH 18/23] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 13/23] add visitor for parsing hz[KMG] input string, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 21/23] target-i386: move init of "hypervisor" feature into CPU initializer from cpudef, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 14/23] target-i386: use visit_type_hz to parse tsc_freq property value, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 19/23] target-i386: parse cpu_model string into set of stringified properties, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 20/23] target-i386: use properties to set/unset user specified features on CPU, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 12/23] target-i386: convert 'check' and 'enforce' features into properties, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 23/23] target-i386: cleanup cpu_x86_find_by_name(), only fill x86_def_t in it, Igor Mammedov, 2012/10/02
- [Qemu-devel] [PATCH 17/23] target-i386: postpone cpuid_level update to realize time,
Igor Mammedov <=