[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API |
Date: |
Mon, 17 Oct 2011 22:48:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
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 |= cpu_physical_memory_get_dirty(page24 + off, VGA_DIRTY_FLAG);
> > - ret |= cpu_physical_memory_get_dirty(cpage + off, VGA_DIRTY_FLAG);
> > + ret |= memory_region_get_dirty(&s->vram_mem, page24 + off,
> > + DIRTY_MEMORY_VGA);
> > + ret |= memory_region_get_dirty(&s->vram_mem, cpage + off,
> > + DIRTY_MEMORY_VGA);
>
> Like memory_region_set_dirty(), this should be changed to take a range
> so that the for loops and PAGE_SIZEs can be dropped.
Agree. Lets' keep it outside this conversion patchset though.
What would the API look like? accept a range, return true if any of the
pages in the range are dirty?
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
- [Qemu-devel] [PATCH 00/18] Memory API conversions, batch 12, Avi Kivity, 2011/10/17
- [Qemu-devel] [PATCH 01/18] ppc_oldworld: convert to memory API, Avi Kivity, 2011/10/17
- [Qemu-devel] [PATCH 02/18] ppc_prep: convert to memory API, Avi Kivity, 2011/10/17
- [Qemu-devel] [PATCH 06/18] ppcr500_mpc8544ds: convert to memory API, Avi Kivity, 2011/10/17
- [Qemu-devel] [PATCH 16/18] syborg: convert to memory API, Avi Kivity, 2011/10/17
- [Qemu-devel] [PATCH 18/18] tcx: convert to memory API, Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 11/18] spapr: convert to memory API, Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 09/18] s390-virtio: convert to memory API, Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 03/18] pxa2xx: convert to memory API (part I), Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 04/18] pxa2xx: convert to memory API (part II), Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 12/18] spitz: convert to memory API, Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 08/18] realview: convert to memory API, Avi Kivity, 2011/10/17
[Qemu-devel] [PATCH 10/18] sm501: convert to memory API, Avi Kivity, 2011/10/17