qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset()


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset()
Date: Mon, 09 Jan 2012 10:49:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/08/2012 08:59 PM, Andreas Färber wrote:
> Am 08.01.2012 18:57, schrieb Avi Kivity:
> > memory_region_set_offset() is used in only one place, and is deprecated.
> > Remove the single use and the function itself.
>
> Does the removal of the offset mean that memory_region_find() can be
> simplified to just return a MemoryRegion* now? :)

No.  In particular, aliases allow almost the same offsetting
capabilities (the difference is that aliases cannot offset beyond ->size
(or before 0) while set_offset() can.

Consider a vga window at 0xa0000 pointing at the framebuffer at
0xe0000000, with alias_offset 0x10000.

A memory_region_find() that finds it will return (mr,
.offset_within_region = 0x10000), .size = 0x8000, there is no way this
can be expressed by returning just a memory region (well you could
return the alias, but that complicates things for the caller).

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




reply via email to

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