[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/10] target-i386: cpu: use cpu_generic_init() in c
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 04/10] target-i386: cpu: use cpu_generic_init() in cpu_x86_init() |
Date: |
Mon, 6 Jun 2016 17:16:46 +0200 |
now cpu_x86_init() does nothing more or less
than duplicating cpu_generic_init() logic.
So simplify it by using cpu_generic_init().
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index ae67a15..349b971 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2217,25 +2217,7 @@ out:
X86CPU *cpu_x86_init(const char *cpu_model)
{
- Error *error = NULL;
- X86CPU *cpu;
-
- cpu = cpu_x86_create(cpu_model, &error);
- if (error) {
- goto out;
- }
-
- object_property_set_bool(OBJECT(cpu), true, "realized", &error);
-
-out:
- if (error) {
- error_report_err(error);
- if (cpu != NULL) {
- object_unref(OBJECT(cpu));
- cpu = NULL;
- }
- }
- return cpu;
+ return X86_CPU(cpu_generic_init(TYPE_X86_CPU, cpu_model));
}
static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)
--
1.8.3.1
- [Qemu-devel] [PATCH] target-i386: Remove assert(kvm_enabled()) from host_x86_cpu_initfn(), (continued)
- [Qemu-devel] [PATCH 01/10] target-i386: Remove xlevel & hv-spinlocks option fixups, Igor Mammedov, 2016/06/06
- [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Igor Mammedov, 2016/06/06
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Paolo Bonzini, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Igor Mammedov, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Paolo Bonzini, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Igor Mammedov, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Paolo Bonzini, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Igor Mammedov, 2016/06/07
- Re: [Qemu-devel] [PATCH 06/10] target-i386: print obsolete warnings if +-features are used, Eduardo Habkost, 2016/06/07
[Qemu-devel] [PATCH 04/10] target-i386: cpu: use cpu_generic_init() in cpu_x86_init(),
Igor Mammedov <=
[Qemu-devel] [PATCH 10/10] pc: parse cpu features only once, Igor Mammedov, 2016/06/06
[Qemu-devel] [PATCH 05/10] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr, Igor Mammedov, 2016/06/06
[Qemu-devel] [PATCH 07/10] target-sparc: cpu: use sparc_cpu_parse_features() directly, Igor Mammedov, 2016/06/06