mirror of https://github.com/xemu-project/xemu.git
xen: convert framebuffer dirty tracking to memory API
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
8f77558f22
commit
5a97065b01
|
@ -409,7 +409,6 @@ static int xen_sync_dirty_bitmap(XenIOState *state,
|
||||||
ram_addr_t size)
|
ram_addr_t size)
|
||||||
{
|
{
|
||||||
target_phys_addr_t npages = size >> TARGET_PAGE_BITS;
|
target_phys_addr_t npages = size >> TARGET_PAGE_BITS;
|
||||||
target_phys_addr_t vram_offset = 0;
|
|
||||||
const int width = sizeof(unsigned long) * 8;
|
const int width = sizeof(unsigned long) * 8;
|
||||||
unsigned long bitmap[(npages + width - 1) / width];
|
unsigned long bitmap[(npages + width - 1) / width];
|
||||||
int rc, i, j;
|
int rc, i, j;
|
||||||
|
@ -426,7 +425,6 @@ static int xen_sync_dirty_bitmap(XenIOState *state,
|
||||||
} else if (state->log_for_dirtybit != physmap) {
|
} else if (state->log_for_dirtybit != physmap) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
vram_offset = physmap->phys_offset;
|
|
||||||
|
|
||||||
rc = xc_hvm_track_dirty_vram(xen_xc, xen_domid,
|
rc = xc_hvm_track_dirty_vram(xen_xc, xen_domid,
|
||||||
start_addr >> TARGET_PAGE_BITS, npages,
|
start_addr >> TARGET_PAGE_BITS, npages,
|
||||||
|
@ -440,7 +438,8 @@ static int xen_sync_dirty_bitmap(XenIOState *state,
|
||||||
while (map != 0) {
|
while (map != 0) {
|
||||||
j = ffsl(map) - 1;
|
j = ffsl(map) - 1;
|
||||||
map &= ~(1ul << j);
|
map &= ~(1ul << j);
|
||||||
cpu_physical_memory_set_dirty(vram_offset + (i * width + j) * TARGET_PAGE_SIZE);
|
memory_region_set_dirty(framebuffer,
|
||||||
|
(i * width + j) * TARGET_PAGE_SIZE);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue