[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvmloader: Write address of VM generation id buffer into xenstore



# HG changeset patch
# User Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1322666291 28800
# Node ID 3c4c29899d8a2a0c0f9109b7236da95bb72b77b6
# Parent  08716a7f1b7426864615460760cc076e99555e0a
hvmloader: Write address of VM generation id buffer into xenstore

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 08716a7f1b74 -r 3c4c29899d8a tools/firmware/hvmloader/acpi/build.c
--- a/tools/firmware/hvmloader/acpi/build.c     Wed Nov 30 07:12:41 2011 -0800
+++ b/tools/firmware/hvmloader/acpi/build.c     Wed Nov 30 07:18:11 2011 -0800
@@ -301,10 +301,16 @@
 {
     uint64_t gid;
     unsigned char *buf;
+    char addr[11];
 
     buf = mem_alloc(8, 8);
     if (!buf) return 0;
 
+    if ( snprintf(addr, sizeof(addr), "0x%lx", virt_to_phys(buf))
+         >= sizeof(addr) )
+        return 0;
+    xenstore_write("data/generation-id", addr);
+
     gid = strtoll(xenstore_read("platform/generation-id", "0"), NULL, 0);
     *(uint64_t *)buf = gid;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.