From: Ian Campbell Subject: Re: [PATCH v2] xen/arm: create_xen_entries has to flush TLBs on every CPU Date: Fri, 2 May 2014 13:58:08 +0100 Message-ID: <1399035488.4085.0.camel@kazak.uk.xensource.com> References: <1398253016-27505-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgD2b-0003Jr-FC for xen-devel@lists.xenproject.org; Fri, 02 May 2014 12:58:13 +0000 In-Reply-To: <1398253016-27505-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 Wed, 2014-04-23 at 12:36 +0100, Julien Grall wrote: > The function create_xen_entries creates mappings in second-level page tables > which is shared between every CPU. > > Only flushing TLBs on local processor may result to wrong behaviour > when io{re,un}map is used. > > Signed-off-by: Julien Grall Acked + applied. > --- > > This patch is candidate to be backported to Xen 4.4. Noted. I think you said this would need some backporting? Given that I'm inclined to hold off on backporting this until someone who is using 4.4 and tripping over the issue reports/requests it. > > 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". But people who make product based on Xen 4.4 might want to use theses > functions when all CPUs are UP. > > Changes in v2: > - The patch change create_xen_entries not create_p2m_entries > --- > xen/arch/arm/mm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > index 362bc8d..eac228c 100644 > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -845,7 +845,7 @@ static int create_xen_entries(enum xenmap_operation op, > BUG(); > } > } > - flush_xen_data_tlb_range_va_local(virt, PAGE_SIZE * nr_mfns); > + flush_xen_data_tlb_range_va(virt, PAGE_SIZE * nr_mfns); > > rc = 0; >