All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset()
Date: Mon, 09 Jan 2012 10:49:01 +0200	[thread overview]
Message-ID: <4F0AA9FD.5080005@redhat.com> (raw)
In-Reply-To: <4F09E789.1030108@suse.de>

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	other threads:[~2012-01-09  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 17:57 [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset() Avi Kivity
2012-01-08 17:57 ` [Qemu-devel] [PATCH 1/2] ioport: change portio_list not to use memory_region_set_offset() Avi Kivity
2012-01-08 17:57 ` [Qemu-devel] [PATCH 2/2] memory: remove memory_region_set_offset() Avi Kivity
2012-01-08 18:59 ` [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset() Andreas Färber
2012-01-09  8:49   ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0AA9FD.5080005@redhat.com \
    --to=avi@redhat.com \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.