[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/6] spapr: init CPUState->cpu_index with index relat
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 1/6] spapr: init CPUState->cpu_index with index relative to core-id |
Date: |
Fri, 29 Jul 2016 14:53:39 +1000 |
From: Igor Mammedov <address@hidden>
It will enshure that cpu_index for a given cpu stays the same
regardless of the order cpus has been created/deleted and so
it would be possible to migrate QEMU instance with out of order
created CPU.
Signed-off-by: Igor Mammedov <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index c04aaa4..1f3f4dd 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -307,9 +307,13 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error
**errp)
sc->threads = g_malloc0(size * cc->nr_threads);
for (i = 0; i < cc->nr_threads; i++) {
char id[32];
+ CPUState *cs;
+
obj = sc->threads + i * size;
object_initialize(obj, size, typename);
+ cs = CPU(obj);
+ cs->cpu_index = cc->core_id + i;
snprintf(id, sizeof(id), "thread[%d]", i);
object_property_add_child(OBJECT(sc), id, obj, &local_err);
if (local_err) {
--
2.7.4
- [Qemu-devel] [PULL 0/6] ppc-for-2.7 queue 20160729, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 1/6] spapr: init CPUState->cpu_index with index relative to core-id,
David Gibson <=
- [Qemu-devel] [PULL 6/6] tests: add drive_del-test to ppc/ppc64, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 3/6] test: port postcopy test to ppc64, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 5/6] spapr: Prevent boot CPU core removal, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 2/6] Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order", David Gibson, 2016/07/29
- [Qemu-devel] [PULL 4/6] ppc: Fix fault PC reporting for lve*/stve* VMX instructions, David Gibson, 2016/07/29
- Re: [Qemu-devel] [PULL 0/6] ppc-for-2.7 queue 20160729, Peter Maydell, 2016/07/29