mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
cpu: add set_memory flag to request dirty logging
Pass the flag to all cpu notifiers, doing nothing at this point. Will be used by follow-up patches. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
afe3ef1d01
commit
0fd542fb7d
4 changed files with 29 additions and 13 deletions
14
exec.c
14
exec.c
|
@ -1711,11 +1711,12 @@ static QLIST_HEAD(memory_client_list, CPUPhysMemoryClient) memory_client_list
|
|||
|
||||
static void cpu_notify_set_memory(target_phys_addr_t start_addr,
|
||||
ram_addr_t size,
|
||||
ram_addr_t phys_offset)
|
||||
ram_addr_t phys_offset,
|
||||
bool log_dirty)
|
||||
{
|
||||
CPUPhysMemoryClient *client;
|
||||
QLIST_FOREACH(client, &memory_client_list, list) {
|
||||
client->set_memory(client, start_addr, size, phys_offset);
|
||||
client->set_memory(client, start_addr, size, phys_offset, log_dirty);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1755,7 +1756,7 @@ static void phys_page_for_each_1(CPUPhysMemoryClient *client,
|
|||
for (i = 0; i < L2_SIZE; ++i) {
|
||||
if (pd[i].phys_offset != IO_MEM_UNASSIGNED) {
|
||||
client->set_memory(client, pd[i].region_offset,
|
||||
TARGET_PAGE_SIZE, pd[i].phys_offset);
|
||||
TARGET_PAGE_SIZE, pd[i].phys_offset, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2600,10 +2601,11 @@ static subpage_t *subpage_init (target_phys_addr_t base, ram_addr_t *phys,
|
|||
start_addr and region_offset are rounded down to a page boundary
|
||||
before calculating this offset. This should not be a problem unless
|
||||
the low bits of start_addr and region_offset differ. */
|
||||
void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
|
||||
void cpu_register_physical_memory_log(target_phys_addr_t start_addr,
|
||||
ram_addr_t size,
|
||||
ram_addr_t phys_offset,
|
||||
ram_addr_t region_offset)
|
||||
ram_addr_t region_offset,
|
||||
bool log_dirty)
|
||||
{
|
||||
target_phys_addr_t addr, end_addr;
|
||||
PhysPageDesc *p;
|
||||
|
@ -2611,7 +2613,7 @@ void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
|
|||
ram_addr_t orig_size = size;
|
||||
subpage_t *subpage;
|
||||
|
||||
cpu_notify_set_memory(start_addr, size, phys_offset);
|
||||
cpu_notify_set_memory(start_addr, size, phys_offset, log_dirty);
|
||||
|
||||
if (phys_offset == IO_MEM_UNASSIGNED) {
|
||||
region_offset = start_addr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue