diff options
author | Dr. David Alan Gilbert | 2018-06-05 18:25:45 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2018-06-15 15:40:56 +0200 |
commit | 343f632c70ab401b1343140c3b19c9fb99395323 (patch) | |
tree | 5a6163850c759e3aa46efc0e762e08d52ac5cc9f /include | |
parent | migration: Fixes for non-migratable RAMBlocks (diff) | |
download | qemu-343f632c70ab401b1343140c3b19c9fb99395323.tar.gz qemu-343f632c70ab401b1343140c3b19c9fb99395323.tar.xz qemu-343f632c70ab401b1343140c3b19c9fb99395323.zip |
migration: Poison ramblock loops in migration
The migration code should be using the
RAMBLOCK_FOREACH_MIGRATABLE and qemu_ram_foreach_block_migratable
not the all-block versions; poison them so that we can't accidentally
use them.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180605162545.80778-3-dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/ramlist.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/exec/ramlist.h b/include/exec/ramlist.h index 2e2ac6cb99..bc4faa1b00 100644 --- a/include/exec/ramlist.h +++ b/include/exec/ramlist.h @@ -56,8 +56,10 @@ typedef struct RAMList { extern RAMList ram_list; /* Should be holding either ram_list.mutex, or the RCU lock. */ -#define RAMBLOCK_FOREACH(block) \ +#define INTERNAL_RAMBLOCK_FOREACH(block) \ QLIST_FOREACH_RCU(block, &ram_list.blocks, next) +/* Never use the INTERNAL_ version except for defining other macros */ +#define RAMBLOCK_FOREACH(block) INTERNAL_RAMBLOCK_FOREACH(block) void qemu_mutex_lock_ramlist(void); void qemu_mutex_unlock_ramlist(void); |