[Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-19 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/tcx.c | 152 ++--- 1 files changed, 85 insertions(+), 67 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 309600d..cd24100 100644 --- a/hw/tcx.c +++ b/hw/tcx.c @@ -40,7 +40,15 @@

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-18 Thread Blue Swirl
On Mon, Oct 17, 2011 at 8:48 PM, Avi Kivity a...@redhat.com wrote: On 10/17/2011 09:13 PM, Blue Swirl wrote: -    ret = cpu_physical_memory_get_dirty(page, VGA_DIRTY_FLAG); +    ret = memory_region_get_dirty(s-vram_mem, page, DIRTY_MEMORY_VGA);     for (off = 0; off TARGET_PAGE_SIZE * 4;

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-18 Thread Avi Kivity
On 10/18/2011 08:08 PM, Blue Swirl wrote: What would the API look like? accept a range, return true if any of the pages in the range are dirty? That would be 1:1 conversion but maybe better approach would be to return the first dirty address (or zero if not found), then various bitmap

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-18 Thread Blue Swirl
On Tue, Oct 18, 2011 at 7:40 PM, Avi Kivity a...@redhat.com wrote: On 10/18/2011 08:08 PM, Blue Swirl wrote: What would the API look like?  accept a range, return true if any of the pages in the range are dirty? That would be 1:1 conversion but maybe better approach would be to return the

[Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-17 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- hw/tcx.c | 152 ++--- 1 files changed, 85 insertions(+), 67 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index 309600d..cd24100 100644 --- a/hw/tcx.c +++ b/hw/tcx.c @@ -40,7 +40,15 @@

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-17 Thread Blue Swirl
On Mon, Oct 17, 2011 at 2:02 PM, Avi Kivity a...@redhat.com wrote: Signed-off-by: Avi Kivity a...@redhat.com ---  hw/tcx.c |  152 ++---  1 files changed, 85 insertions(+), 67 deletions(-) diff --git a/hw/tcx.c b/hw/tcx.c index

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API

2011-10-17 Thread Avi Kivity
On 10/17/2011 09:13 PM, Blue Swirl wrote: -ret = cpu_physical_memory_get_dirty(page, VGA_DIRTY_FLAG); +ret = memory_region_get_dirty(s-vram_mem, page, DIRTY_MEMORY_VGA); for (off = 0; off TARGET_PAGE_SIZE * 4; off += TARGET_PAGE_SIZE) { -ret |=