[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 21/23] spapr: do proper error propagation in spapr_cp
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 21/23] spapr: do proper error propagation in spapr_cpu_core_realize_child() |
Date: |
Fri, 1 Jul 2016 16:41:57 +1000 |
From: Greg Kurz <address@hidden>
This patch changes spapr_cpu_core_realize_child() to have a local error
pointer and use error_propagate() as it is supposed to be done.
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Bharata B Rao <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index bba3612..2e264fa 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -262,18 +262,20 @@ out:
static int spapr_cpu_core_realize_child(Object *child, void *opaque)
{
- Error **errp = opaque;
+ Error **errp = opaque, *local_err = NULL;
sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine());
CPUState *cs = CPU(child);
PowerPCCPU *cpu = POWERPC_CPU(cs);
- object_property_set_bool(child, true, "realized", errp);
- if (*errp) {
+ object_property_set_bool(child, true, "realized", &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
return 1;
}
- spapr_cpu_init(spapr, cpu, errp);
- if (*errp) {
+ spapr_cpu_init(spapr, cpu, &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
return 1;
}
return 0;
--
2.7.4
- Re: [Qemu-devel] [Qemu-ppc] [PULL 05/23] ppc: Enforce setting MSR:EE, IR and DR when MSR:PR is set, (continued)
- [Qemu-devel] [PULL 18/23] target-ppc: gen_pause for instructions: yield, mdoio, mdoom, miso, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 07/23] ppc: LPCR is a HV resource, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 09/23] hw/ppc/spapr: Add some missing hcall function set strings, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 22/23] spapr: drop duplicate variable in spapr_core_release(), David Gibson, 2016/07/01
- [Qemu-devel] [PULL 11/23] spapr: Restore support for older PowerPC CPU cores, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 13/23] ppc: Fix 64K pages support in full emulation, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 03/23] ppc: Use a helper to filter writes to LPCR, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 12/23] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 23/23] qmp: fix spapr example of query-hotpluggable-cpus, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 21/23] spapr: do proper error propagation in spapr_cpu_core_realize_child(),
David Gibson <=
- [Qemu-devel] [PULL 08/23] ppc: Print HSRR0/HSRR1 in "info registers", David Gibson, 2016/07/01
- [Qemu-devel] [PULL 04/23] ppc: Fix conditions for delivering external interrupts to a guest, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 20/23] spapr: drop reference on child object during core realization, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 01/23] ppc: Add a bunch of hypervisor SPRs to Book3s, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 14/23] ppc/xics: Rename existing xics to xics_spapr, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 16/23] ppc/xics: Implement H_IPOLL using an accessor, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 19/23] spapr: Restore support for 970MP and POWER8NVL CPU cores, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 17/23] ppc/xics: Replace "icp" with "xics" in most places, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 06/23] ppc: Initial HDEC support, David Gibson, 2016/07/01
- [Qemu-devel] [PULL 15/23] ppc/xics: Move SPAPR specific code to a separate file, David Gibson, 2016/07/01