[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/37] target-i386: postpone cpuid_level update to r
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 14/37] target-i386: postpone cpuid_level update to realize time |
Date: |
Mon, 22 Oct 2012 17:03:00 +0200 |
delay capping 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 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 951d12b..3131945 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1480,9 +1480,6 @@ static int cpu_x86_find_by_name(X86CPU *cpu, x86_def_t
*x86_cpu_def,
if (check_features_against_host(x86_cpu_def) && enforce_cpuid)
goto error;
}
- if (x86_cpu_def->cpuid_7_0_ebx_features && x86_cpu_def->level < 7) {
- x86_cpu_def->level = 7;
- }
g_free(s);
return 0;
@@ -2040,6 +2037,10 @@ void x86_cpu_realize(Object *obj, Error **errp)
X86CPU *cpu = X86_CPU(obj);
CPUX86State *env = &cpu->env;
+ 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.11.7
- [Qemu-devel] [PATCH 00/37 v5] target-i386: convert CPU features into properties, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 04/37] target-i386: filter out not TCG features if running without kvm at realize time, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 07/37] target-i386: use visit_type_hz to parse tsc_freq property value, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 02/37] target-i386: cpu_x86_register(): report error from property setter, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 10/37] target-i386: parse cpu_model string into set of stringified properties, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 01/37] target-i386: return Error from cpu_x86_find_by_name(), Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 03/37] target-i386: if x86_cpu_realize() failed report error and do cleanup, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 13/37] target-i386: convert "level" to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 06/37] add visitor for parsing hz[KMG] input string, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 14/37] target-i386: postpone cpuid_level update to realize time,
Igor Mammedov <=
- [Qemu-devel] [PATCH 08/37] target-i386: define static properties for cpuid features, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 21/37] target-i386: convert 'hv_relaxed' to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 11/37] target-i386: introduce vendor-override static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 28/37] target-i386: convert "model-id" to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 20/37] target-i386: convert 'hv_spinlocks' to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 19/37] qdev: add DEFINE_ABSTRACT_PROP() helper, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 34/37] qdev: introduce QDEV_FIND_PROP_FROM_BIT and qdev_prop_find_bit(), Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 25/37] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2012/10/22