hvmloader: Write address of VM generation id buffer into xenstore

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Paul Durrant committed 2011-11-30 07:18:11 -08:00
1 parent a9f743f88c
commit a6aed45cf3
1 file changed
+6
+6
View File
@@ -301,10 +301,16 @@ unsigned long new_vm_gid(void)
{
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.