From patchwork Fri Mar 6 21:24:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 45497 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 62A73204BC for ; Fri, 6 Mar 2015 21:27:11 +0000 (UTC) Received: by wivz2 with SMTP id z2sf3764253wiv.1 for ; Fri, 06 Mar 2015 13:27:10 -0800 (PST) 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:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=bB4NIi7mwsMovpu0YTbV+631ckUHCaKZQCnRwSkRj1o=; b=fP3ykBwAiNvNzehvZaW4t50I7SVKdzWxWmM2OU2B6L+br86tua8rgml2XqMRssRTTG vbpsCS9frotyOT/WWrL+hiy+n32TI5uUo97BSwksuJfJgM8vYtVc06AztMpLF/UyZcNQ 1JsHmPfX32V/zx7K3vvZBGYIpmtHNo47C0uxpuehhX88teyDLcmd9eWCCydhHaurklw/ 9cztyw37Y4t+XvAoSGZACUGgJefpU+1LWMn/P30y5OCWQy4G49Ty/C51rZMNtqrGOQN4 Uf3TKTPyn88RmwYskZsqfok+l1rJXLRYBYUE34qMJ0KzaNSD37gcoDezU0oTHlbjpmk2 mUjQ== X-Gm-Message-State: ALoCoQnU81hCw8iPAxjSc/ntNY42c0KoKE37iUFEZXP4xyhp5H8TcopNmrP+KMgJb/C8XTH6hYXV X-Received: by 10.112.219.102 with SMTP id pn6mr2568434lbc.12.1425677230667; Fri, 06 Mar 2015 13:27:10 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.68 with SMTP id y4ls124997lay.12.gmail; Fri, 06 Mar 2015 13:27:10 -0800 (PST) X-Received: by 10.152.7.132 with SMTP id j4mr14975399laa.100.1425677230480; Fri, 06 Mar 2015 13:27:10 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id r2si8117063lbb.46.2015.03.06.13.27.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 13:27:10 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lamq1 with SMTP id q1so37151512lam.0 for ; Fri, 06 Mar 2015 13:27:10 -0800 (PST) X-Received: by 10.112.162.167 with SMTP id yb7mr14507671lbb.76.1425677230351; Fri, 06 Mar 2015 13:27:10 -0800 (PST) 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.112.35.133 with SMTP id h5csp149817lbj; Fri, 6 Mar 2015 13:27:09 -0800 (PST) X-Received: by 10.140.217.200 with SMTP id n191mr21897052qhb.29.1425677227510; Fri, 06 Mar 2015 13:27:07 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g75si10618462qge.60.2015.03.06.13.27.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Mar 2015 13:27:07 -0800 (PST) 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 1YTzkS-0000v4-8x; Fri, 06 Mar 2015 21:25:32 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YTzkL-0000pa-Gh for xen-devel@lists.xen.org; Fri, 06 Mar 2015 21:25:25 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 41/D0-02896-14B1AF45; Fri, 06 Mar 2015 21:25:21 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-8.tower-31.messagelabs.com!1425677121!13895412!1 X-Originating-IP: [131.159.0.8] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6678 invoked from network); 6 Mar 2015 21:25:21 -0000 Received: from mail-out1.informatik.tu-muenchen.de (HELO mail-out1.informatik.tu-muenchen.de) (131.159.0.8) by server-8.tower-31.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 6 Mar 2015 21:25:21 -0000 Received: from files.sec.in.tum.de (files.sec.in.tum.de [131.159.50.1]) by services.sec.in.tum.de (Postfix) with ESMTP id 38932105AC337; Fri, 6 Mar 2015 22:25:18 +0100 (CET) Received: from ourea.sec.in.tum.de (ourea.sec.in.tum.de [131.159.50.52]) by files.sec.in.tum.de (Postfix) with ESMTP id 357D3C1332C3; Fri, 6 Mar 2015 22:25:18 +0100 (CET) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Fri, 6 Mar 2015 22:24:28 +0100 Message-Id: <1425677073-13729-3-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425677073-13729-1-git-send-email-tklengyel@sec.in.tum.de> References: <1425677073-13729-1-git-send-email-tklengyel@sec.in.tum.de> Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, keir@xen.org Subject: [Xen-devel] [PATCH V13 2/7] xen/arm: Implement domain_get_maximum_gpfn 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: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) 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: From: Julien Grall The function domain_get_maximum_gpfn is returning the maximum gpfn ever mapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose. We use this in xenaccess as to avoid the user attempting to set page permissions on pages which don't exist for the domain, as a non-arch specific sanity check. Signed-off-by: Julien Grall --- 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 7d4ba0c..ca0aa69 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -985,7 +985,7 @@ int page_is_ram_type(unsigned long mfn, unsigned long mem_type) unsigned long domain_get_maximum_gpfn(struct domain *d) { - return -ENOSYS; + return d->arch.p2m.max_mapped_gfn; } void share_xen_page_with_guest(struct page_info *page,