[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU i
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU is realized |
Date: |
Fri, 26 Apr 2013 19:51:52 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index f1cecc0..0d9493d 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1284,11 +1284,18 @@ static void x86_cpuid_set_apic_id(Object *obj, Visitor
*v, void *opaque,
const char *name, Error **errp)
{
X86CPU *cpu = X86_CPU(obj);
+ DeviceState *dev = DEVICE(obj);
const int64_t min = 0;
const int64_t max = UINT32_MAX;
Error *error = NULL;
int64_t value;
+ if (dev->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
[Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 05/15] target-i386: introduce ICC bus/device/bridge, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 06/15] target-i386: cpu: attach ICC bus to CPU on its creation, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 07/15] target-i386: replace MSI_SPACE_SIZE with APIC_SPACE_SIZE, Igor Mammedov, 2013/04/25
[Qemu-devel] [PATCH 08/15] target-i386: kvmvapic: make expilict dependency on sysbus.h, Igor Mammedov, 2013/04/25