qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] Memory API


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [RFC] Memory API
Date: Thu, 19 May 2011 11:24:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 19, 2011 at 12:08:51PM +0300, Gleb Natapov wrote:
> On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote:
> > On 05/18/2011 06:36 PM, Jan Kiszka wrote:
> > >>
> > >>  We need to head for the more hardware-like approach.  What happens when
> > >>  you program overlapping BARs?  I imagine the result is
> > >>  implementation-defined, but ends up with one region decoded in
> > >>  preference to the other.  There is simply no way to reject an
> > >>  overlapping mapping.
> > >
> > >But there is also now simple way to allow them. At least not without
> > >exposing control about their ordering AND allowing to hook up managing
> > >code (e.g. of the PCI bridge or the chipset) that controls registrations.
> > 
> > What about memory_region_add_subregion(..., int priority) as I
> > suggested in another message?
> Haven't saw another message yet, but how caller knows about priority?

I dont think it does, overlap behaviour should be decided by nodes in the bus
path from master to slave. I think Anthonys call chain approach makes sense,
but it doesn't mean that one cant create a "flat" cached representation of
it for fast acceses. The bus (interconnects & bridges) must be able to
invalidate it when configuration changes though (leading to a new walk
through the call chain and creation of an updated cached "flat" state).

Some other comments:
On the CPU local aspect, I think it is increasingly common in the
embedded space to see local busses with CPU local peripherals in
addition to the "system" bus with "global" peripherals.

Another thing that was discussed was the ability for devices to know
who is accessing them, I think this is uncommon but still it does
exist. IIRC an example is the MIPS GIC has some internal decoding
based on which CPU is accessing it (but there are other examples).
Would be nice to be able to handle it but the accesor info should
definitely not be passed to devices by default, it'll only lead to
hacks when not strictly necessary...

Overall I like the initiaive and look forward to see code and testing it.

Cheers



reply via email to

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