From patchwork Wed Apr 23 11:36:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 28872 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C64CF203AC for ; Wed, 23 Apr 2014 11:39:42 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id rq2sf758946pbb.3 for ; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=BKtK2pBf2wtW90U4cYUkMlcdp8GxS7kyw7nRDxZJRSQ=; b=I+ZhXP7P3frHJwOU0AMZcLrArxqLGLi/dADzPm/cs0OQ1/2SU+6SMSXOAgtnQY0ZdH EnpC4LC74/HUeFHZ4y0B/GldnJ1I1j6Nsb/tDih3itzKkEmWQbZIxYiQWVkHQnRE8RoM 08+fl0+GnbdaUStdI9pbqbXBsOa+XCVLcO+ukSqaKKFyLL26YIY+cAW8EJpY8FFaO6Uz yqrnIqfDcsu37rz7arcT2VNanDlByBC6Y9k+oxo9zSaABRp0O9X2APELBjR2qE1Yx1uj RHfC5s5LqQ6QJfXBbCJLRFlb+RuZPIZp9wBEOj8PCZXtVfUTvcj0zHFsCjc/CpOww2hk whRQ== X-Gm-Message-State: ALoCoQn6K+Pm1+Rh33ixKY8Lj9YdAvGvAMlrxAXmXCNMUdRhSmq2vPBlRTFaKZWwgD+fp/uUKPPg X-Received: by 10.68.216.230 with SMTP id ot6mr25510229pbc.3.1398253181916; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.72 with SMTP id i66ls525572qgf.78.gmail; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-Received: by 10.52.191.100 with SMTP id gx4mr35790476vdc.4.1398253181732; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id ui2si115693vdc.100.2014.04.23.04.39.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:39:41 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so934204veb.7 for ; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-Received: by 10.220.162.6 with SMTP id t6mr42971658vcx.12.1398253181641; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp96681vcb; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) X-Received: by 10.52.130.225 with SMTP id oh1mr35726084vdb.8.1398253181333; Wed, 23 Apr 2014 04:39:41 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id qw5si112687vcb.156.2014.04.23.04.39.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:39:41 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WcvU8-0000wa-BO; Wed, 23 Apr 2014 11:37:04 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WcvU5-0000wS-B5 for xen-devel@lists.xenproject.org; Wed, 23 Apr 2014 11:37:03 +0000 Received: from [85.158.139.211:41338] by server-12.bemta-5.messagelabs.com id 5F/62-03824-CD5A7535; Wed, 23 Apr 2014 11:37:00 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-12.tower-206.messagelabs.com!1398253019!89425!1 X-Originating-IP: [74.125.83.48] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23259 invoked from network); 23 Apr 2014 11:36:59 -0000 Received: from mail-ee0-f48.google.com (HELO mail-ee0-f48.google.com) (74.125.83.48) by server-12.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 23 Apr 2014 11:36:59 -0000 Received: by mail-ee0-f48.google.com with SMTP id b57so665713eek.35 for ; Wed, 23 Apr 2014 04:36:59 -0700 (PDT) X-Received: by 10.15.36.6 with SMTP id h6mr62074451eev.54.1398253019474; Wed, 23 Apr 2014 04:36:59 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id w46sm5492526eeo.35.2014.04.23.04.36.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Apr 2014 04:36:58 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 23 Apr 2014 12:36:56 +0100 Message-Id: <1398253016-27505-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2] xen/arm: create_xen_entries has to flush TLBs on every CPU X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 --- 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". 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;