[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU 0 |
Date: |
Wed, 31 Aug 2016 18:34:15 +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>
---
So that you can dump the cpu list with the monitor :
(qemu) info cpus
* CPU #8: nip=0x0000000000000010 thread_id=7742
CPU #16: nip=0x0000000000000010 thread_id=7740
CPU #24: nip=0x0000000000000010 thread_id=7740
CPU #32: nip=0x0000000000000010 thread_id=7740
CPU #40: nip=0x0000000000000010 thread_id=7740
CPU #48: nip=0x0000000000000010 thread_id=7740
CPU #72: nip=0x0000000000000010 thread_id=7740
CPU #80: nip=0x0000000000000010 thread_id=7740
CPU #136: nip=0x0000000000000010 thread_id=7740
CPU #144: nip=0x0000000000000010 thread_id=7740
CPU #152: nip=0x0000000000000010 thread_id=7740
CPU #160: nip=0x0000000000000010 thread_id=7740
CPU #168: nip=0x0000000000000010 thread_id=7740
CPU #176: nip=0x0000000000000010 thread_id=7740
CPU #200: nip=0x0000000000000010 thread_id=7740
CPU #208: nip=0x0000000000000010 thread_id=7740
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index e9009de09a6c..19b8ec14f40e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1027,7 +1027,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
- [Qemu-ppc] [PATCH v2 0/7] ppc/pnv: add a minimal platform, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 1/7] ppc/pnv: add skeleton PowerNV platform, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 2/7] ppc/pnv: add a PnvChip object, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 4/7] ppc/pnv: add a core mask to PnvChip, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 5/7] ppc/pnv: add a PnvCore object, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 6/7] ppc/pnv: add a XScomDevice to PnvCore, Cédric Le Goater, 2016/08/31
- [Qemu-ppc] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU 0,
Cédric Le Goater <=