From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] xen: arm: correctly configure NSACR. Date: Wed, 17 Jul 2013 11:35:12 +0100 Message-ID: <1374057312.8960.16.camel@kazak.uk.xensource.com> References: <1373874799-26623-1-git-send-email-ijc@hellion.org.uk> <1373876645-24082-1-git-send-email-ijc@hellion.org.uk> <51E3F27E.9040203@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51E3F27E.9040203@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xen.org, tim@xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 2013-07-15 at 14:00 +0100, Julien Grall wrote: > On 07/15/2013 12:22 PM, Stefano Stabellini wrote: > > On Mon, 15 Jul 2013, Ian Campbell wrote: > >> From: Ian Campbell > >> > >> Previously we were setting it up twice, the second time neglecting to set the > >> NS_SMP bit. > >> > >> NSACR.NS_SMP is a processor specific bit which on Cortex-A7 and -A15 regulates > >> access to the (also processor specific) ACTLR.SMP bit. Not setting NSACR.NS_SMP > >> meant that Xen's attempts to set ACTLR.SMP was silently ignored. Setting this > >> bit is required in order to cause the processor to take part in cache and TLB > >> coherency protocols. Failure to set this bit leads to random memory corruption > >> in guests (although nothing like as catestrophic as you might expect!). > ^ > catastrophic I knew being a spelling pendant would eventually come back and bite me ;-) > >> > >> An alternative fix would have been to set ACTLR.SMP when in Secure World, > >> however Linux expects to set ACTLR.SMP itself in NS mode, so it's a good bet > >> that bootloaders will set NSACR.NS_SMP instead. > >> > >> While here switch to a read-modify-write of NSACR to preserve any existing bits > >> -- seems safer. > >> > >> Signed-off-by: Ian Campbell > >> --- > >> v2: Modify rather than overwrite NSACR. > > > > Acked-by: Stefano Stabellini > > Except the minor typo: > Acked-by: Julien Grall Typo fixed + applied, thanks.