diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-18 10:16:38 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-18 13:36:15 +0100 |
commit | 56821559f0ba682fe6b367815572e6f974d329ab (patch) | |
tree | 75e93f8fc47707f61c1f6ad5ac45c7609c8da15a /include | |
parent | 2ccbd47c1def618b31af1d88b550f6d2bdd15b0f (diff) | |
parent | be9b23c4a539090da30b482015ee660850e8bb5f (diff) |
Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging
HMP pull
# gpg: Signature made Wed 17 May 2017 07:03:39 PM BST
# gpg: using RSA key 0x0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7
* dgilbert/tags/pull-hmp-20170517:
ramblock: add new hmp command "info ramblock"
utils: provide size_to_str()
ramblock: add RAMBLOCK_FOREACH()
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/ramlist.h | 6 | ||||
-rw-r--r-- | include/qemu-common.h | 1 |
2 files changed, 7 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 */ diff --git a/include/qemu-common.h b/include/qemu-common.h index d218821c14..387ef520bf 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -145,6 +145,7 @@ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); int parse_debug_env(const char *name, int max, int initial); const char *qemu_ether_ntoa(const MACAddr *mac); +char *size_to_str(uint64_t val); void page_size_init(void); /* returns non-zero if dump is in progress, otherwise zero is |