qemu-devel
[Top][All Lists]
Advanced

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

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


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH v2 4/4] vga: compile cirrus_vga in hwlib
Date: Sun, 16 Oct 2011 19:09:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 10/16/2011 06:51 PM, Blue Swirl wrote:
> Remove target dependencies and compile Cirrus VGA in hwlib.
>
>
> +#define CIRRUS_PAGE_SIZE 4096
> +#define CIRRUS_PAGE_MASK (CIRRUS_PAGE_SIZE - 1)

This is inverted from TARGET_PAGE_MASK.

> +
>  #define BLTUNSAFE(s) \
>      ( \
>          ( /* check dst is within bounds */ \
> @@ -618,7 +621,7 @@ 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;
>          memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - 
> off_cur);
>       off_begin += off_pitch;
>      }

You can just drop this masking (and CIRRUS_PAGE_SIZE), provided that
cpu_physical_memory_range_set_dirty() accepts unaligned addresses.

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




reply via email to

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