qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 08/17] target-i386: cpu_x86_register(): reorder CPU


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 08/17] target-i386: cpu_x86_register(): reorder CPU property setting
Date: Mon, 12 Nov 2012 19:38:53 -0200

Trivial code movement, before moving the code to another function.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 target-i386/cpu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 9334e0c..7f4e8f0 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1448,18 +1448,19 @@ static int cpu_x86_register(X86CPU *cpu, const char 
*cpu_model, Error **errp)
     object_property_set_int(OBJECT(cpu), def->family, "family", &error);
     object_property_set_int(OBJECT(cpu), def->model, "model", &error);
     object_property_set_int(OBJECT(cpu), def->stepping, "stepping", &error);
+    object_property_set_int(OBJECT(cpu), def->xlevel, "xlevel", &error);
+    object_property_set_int(OBJECT(cpu), (int64_t)def->tsc_khz * 1000,
+                            "tsc-frequency", &error);
+    object_property_set_str(OBJECT(cpu), def->model_id, "model-id", &error);
     env->cpuid_features = def->features;
     env->cpuid_ext_features = def->ext_features;
     env->cpuid_ext2_features = def->ext2_features;
     env->cpuid_ext3_features = def->ext3_features;
-    object_property_set_int(OBJECT(cpu), def->xlevel, "xlevel", &error);
     env->cpuid_kvm_features = def->kvm_features;
     env->cpuid_svm_features = def->svm_features;
     env->cpuid_ext4_features = def->ext4_features;
     env->cpuid_7_0_ebx_features = def->cpuid_7_0_ebx_features;
     env->cpuid_xlevel2 = def->xlevel2;
-    object_property_set_int(OBJECT(cpu), (int64_t)def->tsc_khz * 1000,
-                            "tsc-frequency", &error);
 
     /* On AMD CPUs, some CPUID[8000_0001].EDX bits must match the bits on
      * CPUID[1].EDX.
@@ -1486,7 +1487,6 @@ static int cpu_x86_register(X86CPU *cpu, const char 
*cpu_model, Error **errp)
         filter_features_for_kvm(cpu);
 #endif
     }
-    object_property_set_str(OBJECT(cpu), def->model_id, "model-id", &error);
     if (error) {
         error_propagate(errp, error);
         return -1;
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]