ia64/xen-unstable

changeset 6545:9c011dd3f6b7

Implement cpu_physical_memory_reset_dirty()

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
author adsharma@los-vmm.sc.intel.com
date Mon Aug 22 11:31:19 2005 -0700 (2005-08-22)
parents 20bbe519f743
children cd984b3478f6
files tools/ioemu/cpu-all.h tools/ioemu/exec.c tools/ioemu/hw/vga.c
line diff
     1.1 --- a/tools/ioemu/cpu-all.h	Mon Aug 22 11:04:15 2005 -0700
     1.2 +++ b/tools/ioemu/cpu-all.h	Mon Aug 22 11:31:19 2005 -0700
     1.3 @@ -672,6 +672,8 @@ static inline void cpu_physical_memory_w
     1.4  int cpu_memory_rw_debug(CPUState *env, target_ulong addr, 
     1.5                          uint8_t *buf, int len, int is_write);
     1.6  
     1.7 +#define VGA_DIRTY_FLAG	0x01
     1.8 +
     1.9  /* read dirty bit (return 0 or 1) */
    1.10  static inline int cpu_physical_memory_is_dirty(target_ulong addr)
    1.11  {
     2.1 --- a/tools/ioemu/exec.c	Mon Aug 22 11:04:15 2005 -0700
     2.2 +++ b/tools/ioemu/exec.c	Mon Aug 22 11:31:19 2005 -0700
     2.3 @@ -461,4 +461,14 @@ int cpu_memory_rw_debug(CPUState *env, t
     2.4  
     2.5  void cpu_physical_memory_reset_dirty(target_ulong start, target_ulong end)
     2.6  {
     2.7 +	uint8_t *p;
     2.8 +	int len;
     2.9 +
    2.10 +	if ((len = (end - start)) <= 0)
    2.11 +		return;
    2.12 +	p = phys_ram_dirty + (start >> TARGET_PAGE_BITS);
    2.13 +	len = len >> TARGET_PAGE_BITS;
    2.14 +	while (len > 0)
    2.15 +		p[--len] &= ~VGA_DIRTY_FLAG;
    2.16 +	return;
    2.17  }
     3.1 --- a/tools/ioemu/hw/vga.c	Mon Aug 22 11:04:15 2005 -0700
     3.2 +++ b/tools/ioemu/hw/vga.c	Mon Aug 22 11:31:19 2005 -0700
     3.3 @@ -1620,7 +1620,6 @@ static CPUWriteMemoryFunc *vga_mem_write
     3.4  static void vga_save(QEMUFile *f, void *opaque)
     3.5  {
     3.6      VGAState *s = opaque;
     3.7 -    int i;
     3.8  
     3.9      qemu_put_be32s(f, &s->latch);
    3.10      qemu_put_8s(f, &s->sr_index);
    3.11 @@ -1661,7 +1660,7 @@ static void vga_save(QEMUFile *f, void *
    3.12  static int vga_load(QEMUFile *f, void *opaque, int version_id)
    3.13  {
    3.14      VGAState *s = opaque;
    3.15 -    int is_vbe, i;
    3.16 +    int is_vbe;
    3.17  
    3.18      if (version_id != 1)
    3.19          return -EINVAL;