diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-08-25 20:09:48 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-28 16:09:44 +0200 |
commit | 3e1f50867b6872130cc19b7eadd93ab9ce268cdc (patch) | |
tree | 1cdc9656f5ccac8e30b39c2131a0771f17845fbb | |
parent | dc6c4fe8378b2e94bcf2ee2efa62ed0aba9aa5cc (diff) | |
download | qemu-3e1f50867b6872130cc19b7eadd93ab9ce268cdc.zip qemu-3e1f50867b6872130cc19b7eadd93ab9ce268cdc.tar.gz qemu-3e1f50867b6872130cc19b7eadd93ab9ce268cdc.tar.bz2 |
xen: hvm: Abstract away memory region name ref
The mr->name field is removed. This slipped through compile testing.
Fix.
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | xen-hvm.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -291,6 +291,7 @@ static int xen_add_to_physmap(XenIOState *state, hwaddr pfn, start_gpfn; hwaddr phys_offset = memory_region_get_ram_addr(mr); char path[80], value[17]; + const char *mr_name; if (get_physmapping(state, start_addr, size)) { return 0; @@ -326,11 +327,13 @@ go_physmap: } } + mr_name = memory_region_name(mr); + physmap = g_malloc(sizeof (XenPhysmap)); physmap->start_addr = start_addr; physmap->size = size; - physmap->name = mr->name; + physmap->name = mr_name; physmap->phys_offset = phys_offset; QLIST_INSERT_HEAD(&state->physmap, physmap, list); @@ -354,11 +357,11 @@ go_physmap: if (!xs_write(state->xenstore, 0, path, value, strlen(value))) { return -1; } - if (mr->name) { + if (mr_name) { snprintf(path, sizeof(path), "/local/domain/0/device-model/%d/physmap/%"PRIx64"/name", xen_domid, (uint64_t)phys_offset); - if (!xs_write(state->xenstore, 0, path, mr->name, strlen(mr->name))) { + if (!xs_write(state->xenstore, 0, path, mr_name, strlen(mr_name))) { return -1; } } |