qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized
Date: Fri, 26 Apr 2013 19:29:56 +0200

Signed-off-by: Igor Mammedov <address@hidden>
---
 target-i386/cpu.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index f1cecc0..3152ad5 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1289,6 +1289,12 @@ static void x86_cpuid_set_apic_id(Object *obj, Visitor 
*v, void *opaque,
     Error *error = NULL;
     int64_t value;
 
+    if (DEVICE(obj)->realized) {
+        error_setg(errp, "Attempt to set property '%s' on '%s' after "
+                   "it was realized", name, object_get_typename(obj));
+        return;
+    }
+
     visit_type_int(v, &value, name, &error);
     if (error) {
         error_propagate(errp, error);
-- 
1.8.2.1




reply via email to

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