]> git.proxmox.com Git - mirror_qemu.git/commitdiff
spapr: Add /system-id
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 9 Nov 2015 06:47:17 +0000 (17:47 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 11 Jan 2016 04:29:04 +0000 (15:29 +1100)
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.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c

index 6bfb908da7e9c5db3e99aaef70c8b6bb0c375c43..29a16b74519b3396e765803942cc369416cac9dc 100644 (file)
@@ -375,6 +375,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()) {