summaryrefslogtreecommitdiff
path: root/include/exec/ramlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/exec/ramlist.h')
-rw-r--r--include/exec/ramlist.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/exec/ramlist.h b/include/exec/ramlist.h
index c59880de82..2e2ac6cb99 100644
--- a/include/exec/ramlist.h
+++ b/include/exec/ramlist.h
@@ -4,6 +4,7 @@
#include "qemu/queue.h"
#include "qemu/thread.h"
#include "qemu/rcu.h"
+#include "qemu/rcu_queue.h"
typedef struct RAMBlockNotifier RAMBlockNotifier;
@@ -54,6 +55,10 @@ typedef struct RAMList {
} RAMList;
extern RAMList ram_list;
+/* Should be holding either ram_list.mutex, or the RCU lock. */
+#define RAMBLOCK_FOREACH(block) \
+ QLIST_FOREACH_RCU(block, &ram_list.blocks, next)
+
void qemu_mutex_lock_ramlist(void);
void qemu_mutex_unlock_ramlist(void);
@@ -68,5 +73,6 @@ void ram_block_notifier_remove(RAMBlockNotifier *n);
void ram_block_notify_add(void *host, size_t size);
void ram_block_notify_remove(void *host, size_t size);
+void ram_block_dump(Monitor *mon);
#endif /* RAMLIST_H */