ramlist.h (2ef2f16781af9dee6ba6517755e9073ba5799fa2) ramlist.h (d73415a315471ac0b127ed3fad45c8ec5d711de1)
1#ifndef RAMLIST_H
2#define RAMLIST_H
3
4#include "qemu/queue.h"
5#include "qemu/thread.h"
6#include "qemu/rcu.h"
7#include "qemu/rcu_queue.h"
8

--- 5 unchanged lines hidden (view full) ---

14#define DIRTY_MEMORY_NUM 3 /* num of dirty bits */
15
16/* The dirty memory bitmap is split into fixed-size blocks to allow growth
17 * under RCU. The bitmap for a block can be accessed as follows:
18 *
19 * rcu_read_lock();
20 *
21 * DirtyMemoryBlocks *blocks =
1#ifndef RAMLIST_H
2#define RAMLIST_H
3
4#include "qemu/queue.h"
5#include "qemu/thread.h"
6#include "qemu/rcu.h"
7#include "qemu/rcu_queue.h"
8

--- 5 unchanged lines hidden (view full) ---

14#define DIRTY_MEMORY_NUM 3 /* num of dirty bits */
15
16/* The dirty memory bitmap is split into fixed-size blocks to allow growth
17 * under RCU. The bitmap for a block can be accessed as follows:
18 *
19 * rcu_read_lock();
20 *
21 * DirtyMemoryBlocks *blocks =
22 * atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);
22 * qatomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);
23 *
24 * ram_addr_t idx = (addr >> TARGET_PAGE_BITS) / DIRTY_MEMORY_BLOCK_SIZE;
25 * unsigned long *block = blocks.blocks[idx];
26 * ...access block bitmap...
27 *
28 * rcu_read_unlock();
29 *
30 * Remember to check for the end of the block when accessing a range of

--- 50 unchanged lines hidden ---
23 *
24 * ram_addr_t idx = (addr >> TARGET_PAGE_BITS) / DIRTY_MEMORY_BLOCK_SIZE;
25 * unsigned long *block = blocks.blocks[idx];
26 * ...access block bitmap...
27 *
28 * rcu_read_unlock();
29 *
30 * Remember to check for the end of the block when accessing a range of

--- 50 unchanged lines hidden ---