From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 01/10] xen: arm: map memory as inner shareable. Date: Tue, 2 Jul 2013 15:26:21 +0100 Message-ID: <1372775181.27768.127.camel@zakaz.uk.xensource.com> References: <1372435809.8976.169.camel@zakaz.uk.xensource.com> <1372435856-14040-1-git-send-email-ian.campbell@citrix.com> <20130702140919.GE18151@rocoto.smurfnet.nu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130702140919.GE18151@rocoto.smurfnet.nu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Leif Lindholm Cc: julien.grall@citrix.com, stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2013-07-02 at 16:09 +0200, Leif Lindholm wrote: > On Fri, Jun 28, 2013 at 05:10:47PM +0100, Ian Campbell wrote: > > The inner shareable domain contains all SMP processors, including different > > clusters (e.g. big.LITTLE). Therefore this is the correct thing to use for Xen > > memory mappings. The outer shareable domain is for devices on busses which are > > barriers (e.g. AMBA4). > > I think this should say something like "which are coherent and > barrier-aware". > > And to be technically correct, the example should say "AMBA4 AXI with > ACE"). > > > While the system domain is for things behind bridges > which do not. > > And given the above ... -> which "are" not. > > > One wrinkle is that Normal memory with attributes Inner Non-cacheable, Outer > > Non-cacheable (which we call BUFFERABLE) must be mapped Outer Shareable on ARM > > v7. Therefore change the prototype of mfn_to_xen_entry to take the attribute > > index so we can DTRT. On ARMv8 the sharability is ignored and considered to > > always be Outer Shareable. > > > > While I'm here change all the dmb/dsb with an implicit sy to an explicit sy, > > to make future changes simpler. Other than that don't adjust the barriers, > > flushes etc, those remain as they were (which is more than is now required). > > I'll change those in a later patch. > > > > Many thanks to Leif for explaining the difference between Inner- and > > Outer-Shareable in words of two or less syllables, I hope I've replicated that > > explanation properly above! > > Apart from my usual nitpicking, indeed :) Thanks, I was sure I was playing a bit fast and loose with the specifics! > [...] > > + switch ( attr ) > > + { > > + case BUFFERABLE: > > + /* > > + * ARM ARM: Overlaying the shareability attribute (B3-1376 to 1377) > > It would be worth to indicate the revision of the ARM ARM here (in this > instance DDI 0406C.b). Good idea, thanks. Ian.