From patchwork Fri May 10 02:17:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16821 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35EAF238F7 for ; Fri, 10 May 2013 02:19:37 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b10sf4689641qen.9 for ; Thu, 09 May 2013 19:19:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=P4xzJKFo29ZhGEt4ajYNZym2hPOxnSRYIrnoHRT24p0=; b=AgRCG1N34cYAOQi73OqviV6YGljVD2+6mmbJPoc/L1r7YTIQAQPgMtUniYv6tmBeRt b9S73cyoqdXJhYLHdOtDtfEfDs1Q+7vUw7yIcSO8bko+dnC1XApN0u3N1zcwNbZlU6PP 6TJhcNkP/Ue0KRTRju2+0gR0InNPP9/Lofo0+K/hRCojdzrgPCVO8NHocV+ORjnIMVNl ARcHijzh5U5vR3p13IgSrB/DkL3hYz027Bj8LbgjNZtV0KxFqUHD08pb7YfjQ4xzjLdQ dLEQQVwSQqIlB4xJD/zaXc/g+mptcewodtFI6DQfdneTPVQ8efutDPaRUMB4Xv6o6K94 EVdQ== X-Received: by 10.224.217.195 with SMTP id hn3mr11080931qab.5.1368152352626; Thu, 09 May 2013 19:19:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.96.234 with SMTP id dv10ls1901280qeb.87.gmail; Thu, 09 May 2013 19:19:12 -0700 (PDT) X-Received: by 10.52.16.49 with SMTP id c17mr8245677vdd.106.1368152352390; Thu, 09 May 2013 19:19:12 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id bb6si324280vcb.84.2013.05.09.19.19.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf10so3307889vcb.34 for ; Thu, 09 May 2013 19:19:12 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr2748252vdj.8.1368152352124; Thu, 09 May 2013 19:19:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp36206vcb; Thu, 9 May 2013 19:19:11 -0700 (PDT) X-Received: by 10.180.185.114 with SMTP id fb18mr658334wic.33.1368152351189; Thu, 09 May 2013 19:19:11 -0700 (PDT) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id hh3si182475wib.29.2013.05.09.19.19.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:11 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::229; Received: by mail-wi0-f169.google.com with SMTP id h11so194443wiv.0 for ; Thu, 09 May 2013 19:19:10 -0700 (PDT) X-Received: by 10.180.189.41 with SMTP id gf9mr663147wic.32.1368152350710; Thu, 09 May 2013 19:19:10 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id dj7sm597075wib.6.2013.05.09.19.19.09 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:10 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH V3 09/41] xen/arm: Extend create_xen_entries prototype to take mapping attribute Date: Fri, 10 May 2013 03:17:55 +0100 Message-Id: <1368152307-598-10-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368152307-598-1-git-send-email-julien.grall@linaro.org> References: <1368152307-598-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQlnM5AiqKe7fXBVewh9z53/cAdnNu8UCFKTiy8jemzMPIRGTIl5rD737CUAmy5xSaeOWuAB X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Julien Grall Acked-by: Ian Campbell --- xen/arch/arm/mm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 2836cbb..96297d3 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -631,7 +631,8 @@ enum xenmap_operation { static int create_xen_entries(enum xenmap_operation op, unsigned long virt, unsigned long mfn, - unsigned long nr_mfns) + unsigned long nr_mfns, + unsigned int flags) { int rc; unsigned long addr = virt, addr_end = addr + nr_mfns * PAGE_SIZE; @@ -664,6 +665,7 @@ static int create_xen_entries(enum xenmap_operation op, } pte = mfn_to_xen_entry(mfn); pte.pt.table = 1; + pte.pt.ai = flags; write_pte(&third[third_table_offset(addr)], pte); break; case REMOVE: @@ -693,12 +695,11 @@ int map_pages_to_xen(unsigned long virt, unsigned long nr_mfns, unsigned int flags) { - ASSERT(flags == PAGE_HYPERVISOR); - return create_xen_entries(INSERT, virt, mfn, nr_mfns); + return create_xen_entries(INSERT, virt, mfn, nr_mfns, flags); } void destroy_xen_mappings(unsigned long v, unsigned long e) { - create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT); + create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT, 0); } enum mg { mg_clear, mg_ro, mg_rw, mg_rx };