]> Git Repo - qemu.git/commitdiff
RAMBlocks: qemu_ram_is_shared
authorDr. David Alan Gilbert <[email protected]>
Tue, 7 Mar 2017 18:36:36 +0000 (18:36 +0000)
committerJuan Quintela <[email protected]>
Thu, 16 Mar 2017 08:00:58 +0000 (09:00 +0100)
Provide a helper to say whether a RAMBlock was created as a
shared mapping.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
exec.c
include/exec/cpu-common.h

diff --git a/exec.c b/exec.c
index a22f5a03858a2c2a400d68036dde63b4f81f8b81..e57a8a217894c181010a35759e892d5b102462b1 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1561,6 +1561,11 @@ const char *qemu_ram_get_idstr(RAMBlock *rb)
     return rb->idstr;
 }
 
+bool qemu_ram_is_shared(RAMBlock *rb)
+{
+    return rb->flags & RAM_SHARED;
+}
+
 /* Called with iothread lock held.  */
 void qemu_ram_set_idstr(RAMBlock *new_block, const char *name, DeviceState *dev)
 {
index b62f0d82e49eca74950bb0c8d441a64dff0da650..4d45a72ea9940a5cd75e8b75cb032b8997ae308c 100644 (file)
@@ -69,6 +69,7 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
 void qemu_ram_set_idstr(RAMBlock *block, const char *name, DeviceState *dev);
 void qemu_ram_unset_idstr(RAMBlock *block);
 const char *qemu_ram_get_idstr(RAMBlock *rb);
+bool qemu_ram_is_shared(RAMBlock *rb);
 size_t qemu_ram_pagesize(RAMBlock *block);
 size_t qemu_ram_pagesize_largest(void);
 
This page took 0.030266 seconds and 4 git commands to generate.