From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, sw@weilnetz.de,
stefano.stabellini@eu.citrix.com, peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH memory v2 2/3] xen: hvm: Abstract away memory region name ref
Date: Mon, 25 Aug 2014 20:09:48 -0700 [thread overview]
Message-ID: <ad8e83c38643d688e508b10fa9c5bb7128653d85.1409018983.git.peter.crosthwaite@xilinx.com> (raw)
In-Reply-To: <cover.1409018983.git.peter.crosthwaite@xilinx.com>
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>
---
changed since v1:
Removed dodgy (char *) cast
xen-hvm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/xen-hvm.c b/xen-hvm.c
index d763e86..0d09940 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -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;
}
}
--
2.1.0.1.g27b9230
next prev parent reply other threads:[~2014-08-26 3:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 3:08 [Qemu-devel] [PATCH memory v2 0/3] Memory Region Naming - take 2 Peter Crosthwaite
2014-08-26 3:09 ` [Qemu-devel] [PATCH memory v2 1/3] xen-hvm: Constify string Peter Crosthwaite
2014-08-26 5:37 ` Stefan Weil
2014-08-26 3:09 ` Peter Crosthwaite [this message]
2014-08-26 3:10 ` [Qemu-devel] [PATCH memory v2 3/3] memory: Lazy init name from QOM name as needed Peter Crosthwaite
2014-08-26 12:51 ` Paolo Bonzini
2014-08-28 14:06 ` Paolo Bonzini
2014-08-28 14:27 ` Peter Crosthwaite
2014-08-28 14:57 ` Paolo Bonzini
2014-08-28 23:17 ` Peter Crosthwaite
2014-09-03 0:17 ` [Qemu-devel] [PATCH memory v2 0/3] Memory Region Naming - take 2 Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad8e83c38643d688e508b10fa9c5bb7128653d85.1409018983.git.peter.crosthwaite@xilinx.com \
--to=peter.crosthwaite@xilinx.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).