memory: change dirty setting APIs to take a size

Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-10-16 16:04:59 +00:00
parent 59abb06198
commit fd4aa97903
12 changed files with 48 additions and 48 deletions

View file

@ -854,7 +854,7 @@ void vga_mem_writeb(VGACommonState *s, target_phys_addr_t addr, uint32_t val)
printf("vga: chain4: [0x" TARGET_FMT_plx "]\n", addr);
#endif
s->plane_updated |= mask; /* only used to detect font change */
memory_region_set_dirty(&s->vram, addr);
memory_region_set_dirty(&s->vram, addr, 1);
}
} else if (s->gr[5] & 0x10) {
/* odd/even mode (aka text mode mapping) */
@ -867,7 +867,7 @@ void vga_mem_writeb(VGACommonState *s, target_phys_addr_t addr, uint32_t val)
printf("vga: odd/even: [0x" TARGET_FMT_plx "]\n", addr);
#endif
s->plane_updated |= mask; /* only used to detect font change */
memory_region_set_dirty(&s->vram, addr);
memory_region_set_dirty(&s->vram, addr, 1);
}
} else {
/* standard VGA latched access */
@ -941,7 +941,7 @@ void vga_mem_writeb(VGACommonState *s, target_phys_addr_t addr, uint32_t val)
printf("vga: latch: [0x" TARGET_FMT_plx "] mask=0x%08x val=0x%08x\n",
addr * 4, write_mask, val);
#endif
memory_region_set_dirty(&s->vram, addr << 2);
memory_region_set_dirty(&s->vram, addr << 2, sizeof(uint32_t));
}
}