Revision 0fd542fb
b/cpu-common.h | ||
---|---|---|
34 | 34 |
typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); |
35 | 35 |
typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr); |
36 | 36 |
|
37 |
void cpu_register_physical_memory_offset(target_phys_addr_t start_addr, |
|
38 |
ram_addr_t size, |
|
39 |
ram_addr_t phys_offset, |
|
40 |
ram_addr_t region_offset); |
|
37 |
void cpu_register_physical_memory_log(target_phys_addr_t start_addr, |
|
38 |
ram_addr_t size, |
|
39 |
ram_addr_t phys_offset, |
|
40 |
ram_addr_t region_offset, |
|
41 |
bool log_dirty); |
|
42 |
|
|
43 |
static inline void cpu_register_physical_memory_offset(target_phys_addr_t start_addr, |
|
44 |
ram_addr_t size, |
|
45 |
ram_addr_t phys_offset, |
|
46 |
ram_addr_t region_offset) |
|
47 |
{ |
|
48 |
cpu_register_physical_memory_log(start_addr, size, phys_offset, |
|
49 |
region_offset, false); |
|
50 |
} |
|
51 |
|
|
41 | 52 |
static inline void cpu_register_physical_memory(target_phys_addr_t start_addr, |
42 | 53 |
ram_addr_t size, |
43 | 54 |
ram_addr_t phys_offset) |
... | ... | |
91 | 102 |
void (*set_memory)(struct CPUPhysMemoryClient *client, |
92 | 103 |
target_phys_addr_t start_addr, |
93 | 104 |
ram_addr_t size, |
94 |
ram_addr_t phys_offset); |
|
105 |
ram_addr_t phys_offset, |
|
106 |
bool log_dirty); |
|
95 | 107 |
int (*sync_dirty_bitmap)(struct CPUPhysMemoryClient *client, |
96 | 108 |
target_phys_addr_t start_addr, |
97 | 109 |
target_phys_addr_t end_addr); |
b/exec.c | ||
---|---|---|
1711 | 1711 |
|
1712 | 1712 |
static void cpu_notify_set_memory(target_phys_addr_t start_addr, |
1713 | 1713 |
ram_addr_t size, |
1714 |
ram_addr_t phys_offset) |
|
1714 |
ram_addr_t phys_offset, |
|
1715 |
bool log_dirty) |
|
1715 | 1716 |
{ |
1716 | 1717 |
CPUPhysMemoryClient *client; |
1717 | 1718 |
QLIST_FOREACH(client, &memory_client_list, list) { |
1718 |
client->set_memory(client, start_addr, size, phys_offset); |
|
1719 |
client->set_memory(client, start_addr, size, phys_offset, log_dirty);
|
|
1719 | 1720 |
} |
1720 | 1721 |
} |
1721 | 1722 |
|
... | ... | |
1755 | 1756 |
for (i = 0; i < L2_SIZE; ++i) { |
1756 | 1757 |
if (pd[i].phys_offset != IO_MEM_UNASSIGNED) { |
1757 | 1758 |
client->set_memory(client, pd[i].region_offset, |
1758 |
TARGET_PAGE_SIZE, pd[i].phys_offset); |
|
1759 |
TARGET_PAGE_SIZE, pd[i].phys_offset, false);
|
|
1759 | 1760 |
} |
1760 | 1761 |
} |
1761 | 1762 |
} else { |
... | ... | |
2600 | 2601 |
start_addr and region_offset are rounded down to a page boundary |
2601 | 2602 |
before calculating this offset. This should not be a problem unless |
2602 | 2603 |
the low bits of start_addr and region_offset differ. */ |
2603 |
void cpu_register_physical_memory_offset(target_phys_addr_t start_addr,
|
|
2604 |
void cpu_register_physical_memory_log(target_phys_addr_t start_addr,
|
|
2604 | 2605 |
ram_addr_t size, |
2605 | 2606 |
ram_addr_t phys_offset, |
2606 |
ram_addr_t region_offset) |
|
2607 |
ram_addr_t region_offset, |
|
2608 |
bool log_dirty) |
|
2607 | 2609 |
{ |
2608 | 2610 |
target_phys_addr_t addr, end_addr; |
2609 | 2611 |
PhysPageDesc *p; |
... | ... | |
2611 | 2613 |
ram_addr_t orig_size = size; |
2612 | 2614 |
subpage_t *subpage; |
2613 | 2615 |
|
2614 |
cpu_notify_set_memory(start_addr, size, phys_offset); |
|
2616 |
cpu_notify_set_memory(start_addr, size, phys_offset, log_dirty);
|
|
2615 | 2617 |
|
2616 | 2618 |
if (phys_offset == IO_MEM_UNASSIGNED) { |
2617 | 2619 |
region_offset = start_addr; |
b/hw/vhost.c | ||
---|---|---|
300 | 300 |
static void vhost_client_set_memory(CPUPhysMemoryClient *client, |
301 | 301 |
target_phys_addr_t start_addr, |
302 | 302 |
ram_addr_t size, |
303 |
ram_addr_t phys_offset) |
|
303 |
ram_addr_t phys_offset, |
|
304 |
bool log_dirty) |
|
304 | 305 |
{ |
305 | 306 |
struct vhost_dev *dev = container_of(client, struct vhost_dev, client); |
306 | 307 |
ram_addr_t flags = phys_offset & ~TARGET_PAGE_MASK; |
b/kvm-all.c | ||
---|---|---|
625 | 625 |
|
626 | 626 |
static void kvm_client_set_memory(struct CPUPhysMemoryClient *client, |
627 | 627 |
target_phys_addr_t start_addr, |
628 |
ram_addr_t size, ram_addr_t phys_offset) |
|
628 |
ram_addr_t size, ram_addr_t phys_offset, |
|
629 |
bool log_dirty) |
|
629 | 630 |
{ |
630 | 631 |
kvm_set_phys_mem(start_addr, size, phys_offset); |
631 | 632 |
} |
Also available in: Unified diff