qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	John Williams <jwilliams@xilinx.com>,
	John Williams <john.williams@xilinx.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Peter Crosthwaite <pcrost@xilinx.com>
Subject: Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions
Date: Tue, 30 Oct 2012 09:35:20 +0100	[thread overview]
Message-ID: <20121030083519.GA25405@edde.se.axis.com> (raw)
In-Reply-To: <508EB01D.5010608@redhat.com>

On Mon, Oct 29, 2012 at 06:34:37PM +0200, Avi Kivity wrote:
> On 10/29/2012 01:37 AM, John Williams wrote:
> 
> >> IMO, an mr per reg would just add a massive overhead for no win.
> > 
> > I tend to agree with Edgar here - QEMU has a careful line to walk between being an emulator and an RTL simulator.
> > 
> > Any WAG on the runtime overhead of a mem region per register vs a switch-based decodes in read/write handlers?
> > 
> 
> Actually a region-per-register can be faster, since the subpage logic
> will dispatch the access directly to the handler, instead of going first
> to the device handler, then following the switch.


I understood the suggestion as if you would need to allocate a MemoryRegion
per reg. That sounds to me like a massive overhead. Many of these regs
hold pure configuration state and have no side effects. Some devices map
huge amount of address space and use bits in the addresses to decide the
effect of the access. At minimum you'd have to allow for old style decoding
without forcing the device to put a function pointer to the same func for
every address.

But as long as it is optional and it doesn't slow things down, I agree
that some device models will benefit.

Cheers,
Edgar

  reply	other threads:[~2012-10-30  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26  7:03 [Qemu-devel] [RFC] Memory API and fine grained Memory Regions Peter Crosthwaite
2012-10-26  7:31 ` Gerd Hoffmann
2012-10-27  4:12 ` Edgar E. Iglesias
2012-10-28 23:37   ` John Williams
2012-10-29 16:34     ` Avi Kivity
2012-10-30  8:35       ` Edgar E. Iglesias [this message]
2012-10-29 16:36   ` Avi Kivity

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=20121030083519.GA25405@edde.se.axis.com \
    --to=edgar.iglesias@gmail.com \
    --cc=avi@redhat.com \
    --cc=john.williams@xilinx.com \
    --cc=jwilliams@xilinx.com \
    --cc=pcrost@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).