[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 06/10] monitor: fix crash for platforms without a C
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v3 06/10] monitor: fix crash for platforms without a CPU 0 |
Date: |
Thu, 15 Sep 2016 14:45:56 +0200 |
On PowerNV, CPU ids start at 0x8 or 0x20, we don't have a CPU 0
anymore. So let's use the first_cpu index to initialize the monitor.
Signed-off-by: Cédric Le Goater <address@hidden>
---
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index 5c003731e288..0192209a7915 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1023,7 +1023,7 @@ int monitor_set_cpu(int cpu_index)
CPUState *mon_get_cpu(void)
{
if (!cur_mon->mon_cpu) {
- monitor_set_cpu(0);
+ monitor_set_cpu(first_cpu->cpu_index);
}
cpu_synchronize_state(cur_mon->mon_cpu);
return cur_mon->mon_cpu;
--
2.7.4