Skip to contentSkip to conversation

ppc/pvn.c: fix "system-id" FDT when -uuid is set

PATCH Superseded Daniel Henrique Barboza 3 participants 4 messages Dec 6, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
Reviewed-by on v1 1/1
#1 lore raw
In reply to Daniel Henrique Barboza
Quoted 11 lines · Daniel Henrique Barboza

Setting -uuid in the pnv machine does not work:

./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80
qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADSTATE

This happens because we're using "fdt_property_string" to retrieve a "system-id" attribute that does not exist, instead of using fdt_setprop_string() to create a "system-id" attribute with the uuid provided via command line.

Quoted 7 lines

---

Cedric,

This isn't critical and probably not worth postponing 7.0 for one more week, but since we're pushing MIPS fixes for 6.2 I believe this one can also go in.

As you said, it is not critical :) and 6.2 is due for tomorrow !

Let's take it for 7.0.

Thanks,

C.

Quoted 18 lines
  hw/ppc/pnv.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/pnv.c +1 -1
index 32ab8071a4..9e532caa9f 100644
@@ -552,7 +552,7 @@ static void *pnv_dt_create(MachineState *machine)
      buf =  qemu_uuid_unparse_strdup(&qemu_uuid);
      _FDT((fdt_setprop_string(fdt, 0, "vm,uuid", buf)));
      if (qemu_uuid_set) {
-        _FDT((fdt_property_string(fdt, "system-id", buf)));
+        _FDT((fdt_setprop_string(fdt, 0, "system-id", buf)));
      }
      g_free(buf);
 
#0 lore raw

PATCH 1/1 ppc/pvn.c: fix "system-id" FDT when -uuid is set

Setting -uuid in the pnv machine does not work:

./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80
qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADSTATE

This happens because we're using "fdt_property_string" to retrieve a "system-id" attribute that does not exist, instead of using fdt_setprop_string() to create a "system-id" attribute with the uuid provided via command line.

---

Cedric,

This isn't critical and probably not worth postponing 7.0 for one more week, but since we're pushing MIPS fixes for 6.2 I believe this one can also go in.

 hw/ppc/pnv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/pnv.c +1 -1
index 32ab8071a4..9e532caa9f 100644
@@ -552,7 +552,7 @@ static void *pnv_dt_create(MachineState *machine)
     buf =  qemu_uuid_unparse_strdup(&qemu_uuid);
     _FDT((fdt_setprop_string(fdt, 0, "vm,uuid", buf)));
     if (qemu_uuid_set) {
-        _FDT((fdt_property_string(fdt, "system-id", buf)));
+        _FDT((fdt_setprop_string(fdt, 0, "system-id", buf)));
     }
     g_free(buf);
 
Signature · 1 line
2.31.1
#3 lore raw
Quoted 4 lines · Luis Fernando Fujita Pires

From: Daniel Henrique Barboza <[email protected]>

Quoted 1 line

Subject: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set

I don't know enough to review this, but there's a typo on the commit message (pvn.c -> pnv.c). :)

ooops :D

Quoted 6 lines

--
Luis Pires
Instituto de Pesquisas ELDORADO
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>