Skip to contentSkip to conversation

ppc-for-2.10 queue 20170731

GIT PULL Applied David Gibson 2 participants 4 messages Jul 31, 2017

lore
Share & tools
lore
#0 lore raw

The following changes since commit a588c4985eff363154d65aee8607d0a4601655f7:

Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-28' into staging (2017-07-28 18:17:44 +0100)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170731

for you to fetch changes up to fc7e0765fc385eed08c19a8823a970f4e98379b0:

Revert "spapr: populate device tree depending on XIVE_EXPLOIT option" (2017-07-29 16:22:14 +1000)

----------------------------------------------------------------
ppc patch queue 2017-07-31

This has a couple of last minute bugfixes for qemu 2.10.

----------------------------------------------------------------
David Gibson (1):
Revert "spapr: populate device tree depending on XIVE_EXPLOIT option"

Greg Kurz (1):
spapr_drc: fix realize and unrealize

 hw/ppc/spapr.c     | 10 ++++------
 hw/ppc/spapr_drc.c | 15 ++++++---------
 2 files changed, 10 insertions(+), 15 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/2] spapr_drc: fix realize and unrealize

From: Greg Kurz <[email protected]>

If object_property_add_alias() returns an error in realize(), we should propagate it to the caller and certainly not unref the DRC.

Same thing goes for unrealize(). Since object_property_del() is the last call, we can even get rid of the intermediate Error *.

And finally, unrealize() should undo all registrations performed by realize().

---
 hw/ppc/spapr_drc.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
hw/ppc/spapr_drc.c +6 -9
index 15bae5c216..47d94e782a 100644
@@ -506,11 +506,11 @@ static void realize(DeviceState *d, Error **errp)
     trace_spapr_drc_realize_child(spapr_drc_index(drc), child_name);
     object_property_add_alias(root_container, link_name,
                               drc->owner, child_name, &err);
+    g_free(child_name);
     if (err) {
-        error_report_err(err);
-        object_unref(OBJECT(drc));
+        error_propagate(errp, err);
+        return;
     }
-    g_free(child_name);
     vmstate_register(DEVICE(drc), spapr_drc_index(drc), &vmstate_spapr_drc,
                      drc);
     qemu_register_reset(drc_reset, drc);
@@ -522,16 +522,13 @@ static void unrealize(DeviceState *d, Error **errp)
     sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(d);
     Object *root_container;
     char name[256];
-    Error *err = NULL;
 
     trace_spapr_drc_unrealize(spapr_drc_index(drc));
+    qemu_unregister_reset(drc_reset, drc);
+    vmstate_unregister(DEVICE(drc), &vmstate_spapr_drc, drc);
     root_container = container_get(object_get_root(), DRC_CONTAINER_PATH);
     snprintf(name, sizeof(name), "%x", spapr_drc_index(drc));
-    object_property_del(root_container, name, &err);
-    if (err) {
-        error_report_err(err);
-        object_unref(OBJECT(drc));
-    }
+    object_property_del(root_container, name, errp);
 }
 
 sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type,
Signature · 1 line
2.13.3
#2 lore raw

[Qemu-devel] [PULL 2/2] Revert "spapr: populate device tree depending on XIVE_EXPLOIT option"

In reply to David Gibson

This reverts commit b87680427e8a3ff682f66514e99a8344e7437247.

I thought this was a harmless preliminary for XIVE enablement patches we expect later on. However, due to some subtle interactions between qemu and SLOF (guest firmware) this breaks some things. Revert it for now, we'll work out how to fix it when the rest of the XIVE patches are ready.

---
 hw/ppc/spapr.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
hw/ppc/spapr.c +4 -6
index 2a3e53d5d5..f7a19720dc 100644
@@ -776,11 +776,6 @@ static int spapr_dt_cas_updates(sPAPRMachineState *spapr, void *fdt,
         }
     }
 
-    /* /interrupt controller */
-    if (!spapr_ovec_test(ov5_updates, OV5_XIVE_EXPLOIT)) {
-        spapr_dt_xics(xics_max_server_number(), fdt, PHANDLE_XICP);
-    }
-
     offset = fdt_path_offset(fdt, "/chosen");
     if (offset < 0) {
         offset = fdt_add_subnode(fdt, 0, "chosen");
@@ -804,7 +799,7 @@ int spapr_h_cas_compose_response(sPAPRMachineState *spapr,
 
     size -= sizeof(hdr);
 
-    /* Create skeleton */
+    /* Create sceleton */
     fdt_skel = g_malloc0(size);
     _FDT((fdt_create(fdt_skel, size)));
     _FDT((fdt_begin_node(fdt_skel, "")));
@@ -1077,6 +1072,9 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
     _FDT(fdt_setprop_cell(fdt, 0, "#address-cells", 2));
     _FDT(fdt_setprop_cell(fdt, 0, "#size-cells", 2));
 
+    /* /interrupt controller */
+    spapr_dt_xics(xics_max_server_number(), fdt, PHANDLE_XICP);
+
     ret = spapr_populate_memory(spapr, fdt);
     if (ret < 0) {
         error_report("couldn't setup memory nodes in fdt");
Signature · 1 line
2.13.3
#3 lore raw
In reply to David Gibson
Quoted 15 lines · David Gibson

The following changes since commit a588c4985eff363154d65aee8607d0a4601655f7:

Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-07-28' into staging (2017-07-28 18:17:44 +0100)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170731

for you to fetch changes up to fc7e0765fc385eed08c19a8823a970f4e98379b0:

Revert "spapr: populate device tree depending on XIVE_EXPLOIT option" (2017-07-29 16:22:14 +1000)

----------------------------------------------------------------
ppc patch queue 2017-07-31

Quoted 8 lines

This has a couple of last minute bugfixes for qemu 2.10.

----------------------------------------------------------------
David Gibson (1):
Revert "spapr: populate device tree depending on XIVE_EXPLOIT option"

Greg Kurz (1):
spapr_drc: fix realize and unrealize

Applied, thanks.

-- PMM