From patchwork Fri Apr 18 16:12:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 28640 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6A6E02013D for ; Fri, 18 Apr 2014 16:14:21 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf6875188pbc.10 for ; Fri, 18 Apr 2014 09:14:20 -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=7BJndKh4aOffRjz8fmgI9Wi4mNLIqAiIiw9J33Rzoo0=; b=luuwvOgQyI4r6t6DTWYgKQA3ptphR3fgkQbAqLDoSrgYyMu6r/qiTdboJ7s13RxJTX WEuKhKBoQxqCCmFdtzL5tmhESh2LlQcO2F9FDXBwneAZWYD4LsY0K9OIBS7zrfh2iOty Mqv48yNoYNv6j14C78ElT8HyA8b816ugJWIHo/ilcvXbxUZiOuz0QyxICVeYahLztG1i XVlsMKdHOL6HbRpv640pgLJ4Uo4CNYSU/AZG5vyuUhllvnbPXebyGJx3ObmzxDlWHIUm YtRMSrLWGO8ULj71oM4JXjnrckdp5+jUiG18mMXI/VrLndx/6wTC4tR3W2xA/1c5yqDg ehAw== X-Gm-Message-State: ALoCoQkuZUuFvVy81JKFzpsIGXa7L1FHQ6hkkRowXHDzpAtyZmW4EGMiy01V0e+vFGRm2S0LhzZn X-Received: by 10.67.4.202 with SMTP id cg10mr10291823pad.42.1397837660597; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.103 with SMTP id k94ls1626119qgd.30.gmail; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr3577138vcb.30.1397837660476; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id sh5si5020659vdc.122.2014.04.18.09.14.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Apr 2014 09:14:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so3228311veb.14 for ; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) X-Received: by 10.58.186.71 with SMTP id fi7mr3366532vec.32.1397837660404; Fri, 18 Apr 2014 09:14:20 -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 ib8csp123253vcb; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) X-Received: by 10.140.83.37 with SMTP id i34mr4027786qgd.100.1397837660030; Fri, 18 Apr 2014 09:14:20 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id n7si12055191qas.56.2014.04.18.09.14.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 18 Apr 2014 09:14:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) 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 1WbBOi-0003S3-R3; Fri, 18 Apr 2014 16:12:16 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WbBOh-0003Ry-00 for xen-devel@lists.xenproject.org; Fri, 18 Apr 2014 16:12:15 +0000 Received: from [85.158.143.35:56588] by server-2.bemta-4.messagelabs.com id 86/8E-06539-EDE41535; Fri, 18 Apr 2014 16:12:14 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-21.messagelabs.com!1397837533!9969247!1 X-Originating-IP: [74.125.83.50] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 315 invoked from network); 18 Apr 2014 16:12:13 -0000 Received: from mail-ee0-f50.google.com (HELO mail-ee0-f50.google.com) (74.125.83.50) by server-14.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 18 Apr 2014 16:12:13 -0000 Received: by mail-ee0-f50.google.com with SMTP id c13so1732194eek.23 for ; Fri, 18 Apr 2014 09:12:13 -0700 (PDT) X-Received: by 10.14.45.6 with SMTP id o6mr23355663eeb.24.1397837533152; Fri, 18 Apr 2014 09:12:13 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id m8sm77806011eeg.11.2014.04.18.09.12.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Apr 2014 09:12:12 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 18 Apr 2014 17:12:10 +0100 Message-Id: <1397837530-12301-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] xen/arm: create_p2m_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: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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_p2m_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". 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. --- 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;