[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 44/44] monitor: fix crash for platforms without a CPU 0
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 44/44] monitor: fix crash for platforms without a CPU 0 |
Date: |
Thu, 22 Sep 2016 16:37:42 +1000 |
Now that we allow CPU hot unplug on a few platforms, we can end up in a
situation where we don't have a CPU with index 0. Or at least we could,
if we didn't have code to explicitly prohibit unplug of CPU 0.
Longer term we want to allow CPU 0 unplug, this patch is an early step in
allowing this, by removing an assumption in the monitor code that CPU 0
always exists.
Signed-off-by: Cédric Le Goater <address@hidden>
[dwg: Rewrote commit message to better explain background]
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index 8bb8bbf..83c4edf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1025,7 +1025,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] [PULL 23/44] target-ppc: convert ld64 to use new macro, (continued)
- [Qemu-ppc] [PULL 23/44] target-ppc: convert ld64 to use new macro, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 08/44] ppc: Fix signal delivery in ppc-user and ppc64-user, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 22/44] target-ppc: consolidate load operations, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 27/44] target-ppc: convert st[16, 32, 64]r to use new macro, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 14/44] adb.c: add support for QKeyCode, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 25/44] target-ppc: consolidate store operations, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 41/44] ppc/xics: An ICS with offset 0 is assumed to be uninitialized, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 24/44] target-ppc: convert ld[16, 32, 64]ur to use new macro, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 30/44] target-ppc: consolidate store conditional, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 29/44] target-ppc: move out stqcx impementation, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 44/44] monitor: fix crash for platforms without a CPU 0,
David Gibson <=
- [Qemu-ppc] [PULL 39/44] Enable H_CLEAR_MOD and H_CLEAR_REF hypercalls on KVM/PPC64., David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 03/44] target-ppc: add vector insert instructions, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 05/44] target-ppc: add vector count trailing zeros instructions, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 38/44] target-ppc: tlbie/tlbivax should have global effect, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 37/44] target-ppc: add flag in check_tlb_flush(), David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 21/44] spapr_vscsi: convert to trace framework instead of DPRINTF, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 07/44] target-ppc: add vector permute right indexed instruction, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 11/44] tests: add RTAS command in the protocol, David Gibson, 2016/09/22
- [Qemu-ppc] [PULL 28/44] target-ppc: consolidate load with reservation, David Gibson, 2016/09/22
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/44] ppc-for-2.8 queue 20160922, no-reply, 2016/09/22