Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-30 Thread Edgar E. Iglesias
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 si

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-29 Thread Avi Kivity
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 regist

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-29 Thread Avi Kivity
On 10/27/2012 06:12 AM, Edgar E. Iglesias wrote: > > Hi, > > If well designed, most hw has a well designed symtery between regs > that makes things simpler if you can just opencode the decding. > IMO, an mr per reg would just add a massive overhead for no win. > And also, hw implemented decoders

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-28 Thread John Williams
> -Original Message- > From: Edgar E. Iglesias [mailto:edgar.igles...@gmail.com] > Sent: Saturday, 27 October 2012 2:12 PM > To: Peter Crosthwaite > Cc: qemu-devel@nongnu.org Developers; Avi Kivity; Peter Maydell; John > Williams > Subject: Re: [Qemu-devel] [RFC

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-26 Thread Edgar E. Iglesias
On Fri, Oct 26, 2012 at 05:03:04PM +1000, Peter Crosthwaite wrote: > In my recent USB series Avi mentioned he wanted to do some work with > the memory API and encourage devices to use the memory API to do > fine-grained register decoding, i.e. each register is its own > MemoryRegion. This has the a

Re: [Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-26 Thread Gerd Hoffmann
Hi, > For actually writing into the device registers, its just uses an array > index, no need to switch (ret = s->regs[addr]). However for my side > effects I will need to populate that switch. If we convert to fine > grained memory regions then the switch goes away and my side effect > become p

[Qemu-devel] [RFC] Memory API and fine grained Memory Regions

2012-10-26 Thread Peter Crosthwaite
In my recent USB series Avi mentioned he wanted to do some work with the memory API and encourage devices to use the memory API to do fine-grained register decoding, i.e. each register is its own MemoryRegion. This has the advantage of getting rid of the symmetric switch statements in the read and