qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] vga: compile cirrus_vga in hwlib


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 3/3] vga: compile cirrus_vga in hwlib
Date: Sun, 09 Oct 2011 18:19:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 10/09/2011 12:24 PM, Blue Swirl wrote:
Remove target dependencies and compile Cirrus VGA in hwlib.

@@ -618,10 +621,10 @@ static void
cirrus_invalidate_region(CirrusVGAState * s, int off_begin,
      for (y = 0; y<  lines; y++) {
        off_cur = off_begin;
        off_cur_end = (off_cur + bytesperline)&  s->cirrus_addr_mask;
-       off_cur&= TARGET_PAGE_MASK;
+        off_cur&= CIRRUS_PAGE_MASK;
        while (off_cur<  off_cur_end) {
            memory_region_set_dirty(&s->vga.vram, off_cur);
-           off_cur += TARGET_PAGE_SIZE;
+            off_cur += CIRRUS_PAGE_SIZE;
        }
        off_begin += off_pitch;
      }


Won't that miss some pages, if CIRRUS_PAGE_SIZE > TARGET_PAGE_SIZE?

We probably need to change memory_region_set_dirty() to take a range, or add a new API that accepts a range. The only time you can assume you only modify a single page is when you write an aligned natural type; not general DMA.

--
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]