From: Alexander Barabash <alexander_barabash@mentor.com>
To: qemu-devel@nongnu.org
Cc: Alexander Barabash <alexander_barabash@mentor.com>
Subject: [Qemu-devel] [PATCH 1/1] Added address_space_init2().
Date: Mon, 7 Jan 2013 14:07:05 +0200 [thread overview]
Message-ID: <1357560425-15950-1-git-send-email-alexander_barabash@mentor.com> (raw)
address_space_init2: initializes a named address space.
Signed-off-by: Alexander Barabash <alexander_barabash@mentor.com>
---
include/exec/memory.h | 9 +++++++++
memory.c | 6 ++++++
2 files changed, 15 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 2322732..8f8a31d 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -820,6 +820,15 @@ void mtree_info(fprintf_function mon_printf, void *f);
*/
void address_space_init(AddressSpace *as, MemoryRegion *root);
+/**
+ * address_space_init2: initializes a named address space
+ *
+ * @as: an uninitialized #AddressSpace
+ * @root: a #MemoryRegion that routes addesses for the address space
+ * @name: used for debugging
+ */
+void address_space_init2(AddressSpace *as, MemoryRegion *root,
+ const char *name);
/**
* address_space_destroy: destroy an address space
diff --git a/memory.c b/memory.c
index 410c5f8..1652c10 100644
--- a/memory.c
+++ b/memory.c
@@ -1574,6 +1574,12 @@ void address_space_init(AddressSpace *as, MemoryRegion *root)
address_space_init_dispatch(as);
}
+void address_space_init2(AddressSpace *as, MemoryRegion *root, const char *name)
+{
+ address_space_init(as, root);
+ as->name = g_strdup(name);
+}
+
void address_space_destroy(AddressSpace *as)
{
/* Flush out anything from MemoryListeners listening in on this */
--
1.7.9.5
next reply other threads:[~2013-01-07 12:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 12:07 Alexander Barabash [this message]
2013-01-07 13:05 ` [Qemu-devel] [PATCH 1/1] Added address_space_init2() Andreas Färber
2013-01-08 10:53 ` Alexander Barabash
2013-01-08 11:22 ` [Qemu-devel] [PATCH 1/1] memory: add name in AddressSpace initialization Alexander Barabash
2013-01-08 14:00 ` Anthony Liguori
2013-01-08 18:28 ` Alexander Barabash
2013-01-08 19:18 ` [Qemu-devel] [PATCH v3 " Alexander Barabash
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=1357560425-15950-1-git-send-email-alexander_barabash@mentor.com \
--to=alexander_barabash@mentor.com \
--cc=qemu-devel@nongnu.org \
/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).