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: Avi Kivity
Subject: Re: [Qemu-devel] [RFC] Memory API
Date: Thu, 19 May 2011 14:44:29 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10

On 05/19/2011 12:14 PM, Gleb Natapov wrote:
On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote:
>  On 05/19/2011 12:08 PM, 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?
>
>  The caller is emulating some hub or router and should decide on
>  priority like real hardware.
>
>  For example, piix gives higher priority to the vga window over RAM.
>
Hmm, but if a caller of the memory_region_add_subregion() function is a
device itself how does it know about chipset priorities. All it wants to
tell to the system is that it is ready to handle mmio access in this phys
range, but chipset may decide to forward those accesses elsewhere.

In this case the device would call a chipset function, passing the memory region as a parameter, and the chipset would call m_r_add_subregion(). Alternatively, the chipset can instantiate the device (if it is an embedded one) and call m_r_add_subregion() itself.

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




reply via email to

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