From: Ian Campbell Subject: Re: [PATCH] xen/arm: create_p2m_entries has to flush TLBs on every CPU Date: Wed, 23 Apr 2014 12:06:05 +0100 Message-ID: <1398251165.18537.34.camel@kazak.uk.xensource.com> References: <1397837530-12301-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wcv0H-0005XU-TZ for xen-devel@lists.xenproject.org; Wed, 23 Apr 2014 11:06:14 +0000 In-Reply-To: <1397837530-12301-1-git-send-email-julien.grall@linaro.org> 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.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2014-04-18 at 17:12 +0100, Julien Grall wrote: > The function create_p2m_entries creates mappings in second-level page tables > which is shared between every CPU. You say create_p2m_entries twice but then patch create_xen_entries. Is it the patch or the description which is wrong? > Only flushing TLBs on local processor may result to wrong behaviour > when io{re,un}map is used. >From this sounds like it's the desription? > Signed-off-by: Julien Grall > --- > > This patch is candidate to be backported to Xen 4.4. > > create_p2m_entries is only used by vmap ( iore{,un}map functions. > > Upstream Xen 4.4 calls these functions only when 1 CPU is online so it's > "safe". People might want to use them when multiple CPUs are online. > > Ian: Do you plan to backport your tlb series? If not, this patch will have > to slighty change because Xen 4.4 doesn't have TLBs helper to flush xen > data on every cpus. I wasn't planning to backport the tlb series, but I could look at backporting the required bits I suppose. However, is it needed? Does 4.4 make any ioremap calls where this would actually hurt? I think all the uses in xen/arch/arm/platforms/*.c are short lived and only accessed from the current cpu. The one in xen/drivers/video/arm_hdlcd.c is done before we go SMP anyway. Ian.