Skip to contentSkip to conversation

spapr: Add /system-id

PATCH Applied Alexey Kardashevskiy 4 participants 9 messages Nov 9, 2015 – Nov 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spapr: Add /system-id

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

---
 hw/ppc/spapr.c | 3 +++
 1 file changed, 3 insertions(+)
hw/ppc/spapr.c +3 -0
index de77528..e8b407d 100644
@@ -374,6 +374,9 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
                           qemu_uuid[14], qemu_uuid[15]);
 
     _FDT((fdt_property_string(fdt, "vm,uuid", buf)));
+    if (qemu_uuid_set) {
+        _FDT((fdt_property_string(fdt, "system-id", buf)));
+    }
     g_free(buf);
 
     if (qemu_get_vm_name()) {
Signature · 1 line
2.5.0.rc3
#1 lore raw
Quoted 8 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

Quoted 7 lines

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

Quoted 19 lines
---
 hw/ppc/spapr.c | 3 +++
 1 file changed, 3 insertions(+)
hw/ppc/spapr.c +3 -0
index de77528..e8b407d 100644
@@ -374,6 +374,9 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
                           qemu_uuid[14], qemu_uuid[15]);
 
     _FDT((fdt_property_string(fdt, "vm,uuid", buf)));
+    if (qemu_uuid_set) {
+        _FDT((fdt_property_string(fdt, "system-id", buf)));
+    }
     g_free(buf);
 
     if (qemu_get_vm_name()) {
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#2 lore raw
Quoted 12 lines · David Gibson
Quoted 11 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

---

Quoted 7 lines
Quoted 4 lines

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

so this did not go anywhere yet, did it?

Quoted 20 lines
Quoted 19 lines
---
  hw/ppc/spapr.c | 3 +++
  1 file changed, 3 insertions(+)
hw/ppc/spapr.c +3 -0
index de77528..e8b407d 100644
@@ -374,6 +374,9 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
                            qemu_uuid[14], qemu_uuid[15]);
 
      _FDT((fdt_property_string(fdt, "vm,uuid", buf)));
+    if (qemu_uuid_set) {
+        _FDT((fdt_property_string(fdt, "system-id", buf)));
+    }
      g_free(buf);
 
      if (qemu_get_vm_name()) {
Signature · 1 line
Alexey
#3 lore raw
Quoted 18 lines · Alexey Kardashevskiy
Quoted 17 lines · David Gibson
Quoted 15 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Quoted 5 lines
Quoted 2 lines

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

so this did not go anywhere yet, did it?

No.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw
Quoted 19 lines · David Gibson
Quoted 18 lines · Alexey Kardashevskiy
Quoted 17 lines · David Gibson
Quoted 15 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

so this did not go anywhere yet, did it?

No.

So where is it stuck?

Alex

#5 lore raw
Quoted 26 lines · Alexander Graf
Quoted 23 lines · David Gibson
Quoted 22 lines · Alexey Kardashevskiy
Quoted 19 lines · David Gibson
Quoted 8 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

Quoted 7 lines

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

so this did not go anywhere yet, did it?

No.

So where is it stuck?

I was waiting for a respin which didn't set the property when a UUID hadn't been given.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#6 lore raw
Quoted 27 lines · David Gibson
Quoted 26 lines · Alexander Graf
Quoted 23 lines · David Gibson
Quoted 22 lines · Alexey Kardashevskiy
Quoted 19 lines · David Gibson
Quoted 8 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

Quoted 7 lines

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

so this did not go anywhere yet, did it?

No.

So where is it stuck?

I was waiting for a respin which didn't set the property when a UUID hadn't been given.

This is the original patch:

+ if (qemu_uuid_set) {
+ _FDT((fdt_property_string(fdt, "system-id", buf)));
+ }

I does not set property if qemu_uuid_set==false already. What did I miss?

Signature · 1 line
Alexey
#7 lore raw
Quoted 45 lines · On Thu, 26 Nov 2015 15:29:07 +1100 Alexey Kardashevskiy <[email protected]> wrote:
Quoted 27 lines · David Gibson
Quoted 26 lines · Alexander Graf
Quoted 23 lines · David Gibson
Quoted 22 lines · Alexey Kardashevskiy
Quoted 19 lines · David Gibson
Quoted 8 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

Quoted 7 lines

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

so this did not go anywhere yet, did it?

No.

So where is it stuck?

I was waiting for a respin which didn't set the property when a UUID hadn't been given.

This is the original patch:

(quoted diff) +3 -0
+    if (qemu_uuid_set) {
+        _FDT((fdt_property_string(fdt, "system-id", buf)));
+    }
Quoted 2 lines

I does not set property if qemu_uuid_set==false already. What did I miss?

It looks like the confusion lies in David's answer to your question about nil UUID... BTW does it make sense to assign nil UUID to a system ?

--
Greg

Applied
#8 lore raw
In reply to Alexey Kardashevskiy
Quoted 45 lines · Alexey Kardashevskiy
Quoted 27 lines · David Gibson
Quoted 26 lines · Alexander Graf
Quoted 23 lines · David Gibson
Quoted 22 lines · Alexey Kardashevskiy
Quoted 19 lines · David Gibson
Quoted 8 lines · Alexey Kardashevskiy

Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id".

This adds "system-id" property to the device tree root when not empty.

Quoted 7 lines

---

This might be expected by AIX so here is the patch.
I am really not sure if it makes sense to initialize property when UUID is all zeroes as the requirement is "unique" and zero-uuid is not.

Yeah, I think it would be better to omit system-id entirely when a UUID hasn't been supplied.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

so this did not go anywhere yet, did it?

No.

So where is it stuck?

I was waiting for a respin which didn't set the property when a UUID hadn't been given.

This is the original patch:

(quoted diff) +3 -0
+    if (qemu_uuid_set) {
+        _FDT((fdt_property_string(fdt, "system-id", buf)));
+    }
Quoted 1 line

I does not set property if qemu_uuid_set==false already. What did I miss?

Oh, sorry, I misread the original patch. I thought you were saying that if UUID wasn't specified, it would appear as a system-id of all 0s.

Applied to ppc-for-2.6.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson