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: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC] Memory API
Date: Fri, 20 May 2011 09:51:41 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 05/20/2011 03:56 AM, Avi Kivity wrote:
On 05/19/2011 07:36 PM, Anthony Liguori wrote:
There are no global priorities. Priorities are only used inside each
level of the memory region hierarchy to generate a resulting, flattened
view for the next higher level. At that level, everything imported from
below has the default prio again, ie. the lowest one.


Then SMM is impossible.


It doesn't follow.

Why do we need priorities at all? There should be no overlap at each
level in the hierarchy.

Of course there is overlap. PCI BARs overlap each other, the VGA windows
and ROM overlap RAM.

Here's what I'm still struggling with:

If children normally overlap their parents, but child priorities are always less than their parents, then what's the benefit of having anything more than two priorities settings.

As far as I can understand it, a priority of 0 means "let children windows overlap" whereas a priority of 1 means "don't let children windows overlap".

Is there a use-case for a priority above 1 and if so, what does it mean?

If you have overlapping BARs, the PCI bus will always send the request
to a single device based on something that's implementation specific.
This works because each PCI device advertises the BAR locations and
sizes in it's config space.

BARs in general don't need priority, except we need to decide if BARs
overlap RAM of vice-versa.


To dispatch a request, the PCI bus will walk the config space to find
a match. If you remove something that was previously causing an
overlap, it'll the other device will now get the I/O requests.

That's what *exactl* what priority means. Which device is in front, and
which is in the back.

Why not use registration order to resolve this type of conflict? What are the use cases to use priorities where registration order wouldn't be adequate?

There is no need to have centralized logic to decide this.


I think you're completely missing the point of my proposal.

I'm struggling to find the mental model for priorities. I may just be dense here but the analogy of transparent window ordering isn't helping me.

Regards,

Anthony Liguori





reply via email to

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