Skip to contentSkip to conversation

ppc-for-2.5 queue 20151204

GIT PULL Applied David Gibson 2 participants 5 messages Dec 4, 2015

lore
Share & tools
lore
#0 lore raw

The following changes since commit 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3:

ui: vnc: avoid floating point exception (2015-12-03 13:34:50 +0000)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/ppc-for-2.5-20151204

for you to fetch changes up to ab8bf1d735133df5b5847bef0b0bea496d614a5a:

spapr_drc: Change value of property "fdt" from null back to {} (2015-12-04 16:50:59 +1100)

Peter,

Not sure if you need a pull req for this, or you could just merge Markus' patches directly, but to avoid another round trip if you would prefer a pull req, here is one.

----------------------------------------------------------------
ppc patch queue for 2.5 2015-12-04

This contains some last minute QOM behaviour fixes from Markus Armbruster.

----------------------------------------------------------------
Markus Armbruster (3):
spapr_drc: Handle visitor errors properly
spapr_drc: Make device "spapr-dr-connector" unavailable with -device
spapr_drc: Change value of property "fdt" from null back to {}

 hw/ppc/spapr_drc.c | 41 +++++++++++++++++++++++++++++++++++------
 1 file changed, 35 insertions(+), 6 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 3/3] spapr_drc: Change value of property "fdt" from null back to {}

From: Markus Armbruster <[email protected]>

prop_get_fdt() misuses the visitor API: when fdt is null, it doesn't visit anything. object_property_get_qobject() happily object_property_get_qobject(). Amazingly, the latter survives the misuse. Turns out we've papered over it long before prop_get_fdt() existed, in commit 1d10b44.

However, commit 6c2f9a1 changed how we paper over it, and as a side effect changed qom-get's value from {} to null. Change it right back by fixing the visitor misuse.

---
 hw/ppc/spapr_drc.c | 5 +++++
 1 file changed, 5 insertions(+)
hw/ppc/spapr_drc.c +5 -0
index 404fb3c..8be62c3 100644
@@ -259,6 +259,11 @@ static void prop_get_fdt(Object *obj, Visitor *v, void *opaque,
     void *fdt;
 
     if (!drc->fdt) {
+        visit_start_struct(v, NULL, NULL, name, 0, &err);
+        if (!err) {
+            visit_end_struct(v, &err);
+        }
+        error_propagate(errp, err);
         return;
     }
 
Signature · 1 line
2.5.0
#2 lore raw

[Qemu-devel] [PULL 2/3] spapr_drc: Make device "spapr-dr-connector" unavailable with -device

In reply to David Gibson

From: Markus Armbruster <[email protected]>

It should only be created via spapr_dr_connector_new(). Attempting to create it with -device crashes.

---
 hw/ppc/spapr_drc.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/ppc/spapr_drc.c +4 -0
index 4e7a1d3..404fb3c 100644
@@ -594,6 +594,10 @@ static void spapr_dr_connector_class_init(ObjectClass *k, void *data)
     drck->attach = attach;
     drck->detach = detach;
     drck->release_pending = release_pending;
+    /*
+     * Reason: it crashes FIXME find and document the real reason
+     */
+    dk->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo spapr_dr_connector_info = {
Signature · 1 line
2.5.0
#3 lore raw

[Qemu-devel] [PULL 1/3] spapr_drc: Handle visitor errors properly

In reply to David Gibson

From: Markus Armbruster <[email protected]>

Since prop_get_fdt() is only used with QmpOutputVisitor, errors shouldn't actually happen, so this is only a latent bug.

---
 hw/ppc/spapr_drc.c | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)
hw/ppc/spapr_drc.c +26 -6
index f34bc04..4e7a1d3 100644
@@ -254,6 +254,7 @@ static void prop_get_fdt(Object *obj, Visitor *v, void *opaque,
                         const char *name, Error **errp)
 {
     sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);
+    Error *err = NULL;
     int fdt_offset_next, fdt_offset, fdt_depth;
     void *fdt;
 
@@ -276,24 +277,43 @@ static void prop_get_fdt(Object *obj, Visitor *v, void *opaque,
         case FDT_BEGIN_NODE:
             fdt_depth++;
             name = fdt_get_name(fdt, fdt_offset, &name_len);
-            visit_start_struct(v, NULL, NULL, name, 0, NULL);
+            visit_start_struct(v, NULL, NULL, name, 0, &err);
+            if (err) {
+                error_propagate(errp, err);
+                return;
+            }
             break;
         case FDT_END_NODE:
             /* shouldn't ever see an FDT_END_NODE before FDT_BEGIN_NODE */
             g_assert(fdt_depth > 0);
-            visit_end_struct(v, NULL);
+            visit_end_struct(v, &err);
+            if (err) {
+                error_propagate(errp, err);
+                return;
+            }
             fdt_depth--;
             break;
         case FDT_PROP: {
             int i;
             prop = fdt_get_property_by_offset(fdt, fdt_offset, &prop_len);
             name = fdt_string(fdt, fdt32_to_cpu(prop->nameoff));
-            visit_start_list(v, name, NULL);
+            visit_start_list(v, name, &err);
+            if (err) {
+                error_propagate(errp, err);
+                return;
+            }
             for (i = 0; i < prop_len; i++) {
-                visit_type_uint8(v, (uint8_t *)&prop->data[i], NULL, NULL);
-
+                visit_type_uint8(v, (uint8_t *)&prop->data[i], NULL, &err);
+                if (err) {
+                    error_propagate(errp, err);
+                    return;
+                }
+            }
+            visit_end_list(v, &err);
+            if (err) {
+                error_propagate(errp, err);
+                return;
             }
-            visit_end_list(v, NULL);
             break;
         }
         default:
Signature · 1 line
2.5.0
#4 lore raw
In reply to David Gibson
Quoted 10 lines · David Gibson

The following changes since commit 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3:

ui: vnc: avoid floating point exception (2015-12-03 13:34:50 +0000)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/ppc-for-2.5-20151204

for you to fetch changes up to ab8bf1d735133df5b5847bef0b0bea496d614a5a:

Quoted 8 lines

spapr_drc: Change value of property "fdt" from null back to {} (2015-12-04 16:50:59 +1100)

Peter,

Not sure if you need a pull req for this, or you could just merge Markus' patches directly, but to avoid another round trip if you would prefer a pull req, here is one.

Applied, thanks.

I do prefer pull requests. That's partly because they're a little easier for me to process, but mostly because a pull is an unambigious statement from a submaintainer that they're happy with these patches and want me to apply them to master, in a format that I can automatically filter out of the mass of qemu-devel emails and into a folder where it gets my attention. I don't have anything similar for "please apply this patch", so that kind of request is more at risk of getting missed.

thanks
-- PMM