mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
memory: add API for observing updates to the physical memory map
Add an API that allows a client to observe changes in the global memory map: - region added (possibly with logging enabled) - region removed (possibly with logging enabled) - logging started on a region - logging stopped on a region - global logging started - global logging removed This API will eventually replace cpu_register_physical_memory_client(). Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
86e775c654
commit
7664e80c84
3 changed files with 145 additions and 0 deletions
5
exec.c
5
exec.c
|
@ -1762,6 +1762,11 @@ static int cpu_notify_sync_dirty_bitmap(target_phys_addr_t start,
|
|||
static int cpu_notify_migration_log(int enable)
|
||||
{
|
||||
CPUPhysMemoryClient *client;
|
||||
if (enable) {
|
||||
memory_global_dirty_log_start();
|
||||
} else {
|
||||
memory_global_dirty_log_stop();
|
||||
}
|
||||
QLIST_FOREACH(client, &memory_client_list, list) {
|
||||
int r = client->migration_log(client, enable);
|
||||
if (r < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue