[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/37] target-i386: if x86_cpu_realize() failed repo
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 03/37] target-i386: if x86_cpu_realize() failed report error and do cleanup |
Date: |
Mon, 22 Oct 2012 17:02:49 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Andreas Färber <address@hidden>
---
v2:
- replaced "if (error_is_set(&error))" with "if (error)"
---
target-i386/helper.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 2ee7c6d..81e0f31 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1243,6 +1243,7 @@ X86CPU *cpu_x86_init(const char *cpu_model)
{
X86CPU *cpu;
CPUX86State *env;
+ Error *error = NULL;
cpu = X86_CPU(object_new(TYPE_X86_CPU));
env = &cpu->env;
@@ -1253,8 +1254,12 @@ X86CPU *cpu_x86_init(const char *cpu_model)
return NULL;
}
- x86_cpu_realize(OBJECT(cpu), NULL);
-
+ x86_cpu_realize(OBJECT(cpu), &error);
+ if (error) {
+ error_free(error);
+ object_delete(OBJECT(cpu));
+ return NULL;
+ }
return cpu;
}
--
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 <=
- [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, 2012/10/22
- [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