From patchwork Mon Sep 29 11:36:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 38069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB206201F1 for ; Mon, 29 Sep 2014 11:38:39 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id l4sf10074564lbv.0 for ; Mon, 29 Sep 2014 04:38:38 -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:in-reply-to :references: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=xdw99TzxhtcnfmHaUD66AvcWHowrU6cg/Svlf8CxK+s=; b=P0/ir46AysSPRchoe+i9PbvhpH5NZme6TddI6SW2BumEP/woB6XZiHUMlTw5eR5BOE 1x+aiCb5E+yI+FzPd6WK8v1Txzu6yLMPqjyRIr5DaLHtXOGpFLWXQqsA9niHW8fCo2z9 qkxxrsF61WmYO/x+xmSx6DJj5iKHrmxMSQ8DBrHWxq7mhbIk4d8HTdmXg8G8IkfR9uaD AHbJZ9c4VUQ7v5O71pFCLaVgcGgie1IOOaGRyzry9nGGPfqWUgjsWzdA2tNc9Ja9GYYI IshqbYKGjWzIHjzvDQIlvN7yPxur549ZwGMcycKwWugaCqDN5a3iVRS6/g0sW9eyd5YQ OY0Q== X-Gm-Message-State: ALoCoQlQ2OKI+CBMQYpdB7N1UqkTGzfC/NB2L1hgLMUtGaj77IKnZjQ+1mo8bLwYkCI5yq4vV2uY X-Received: by 10.180.24.225 with SMTP id x1mr8566589wif.2.1411990718654; Mon, 29 Sep 2014 04:38:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.129 with SMTP id o1ls584341lal.75.gmail; Mon, 29 Sep 2014 04:38:38 -0700 (PDT) X-Received: by 10.152.25.129 with SMTP id c1mr39644225lag.14.1411990718499; Mon, 29 Sep 2014 04:38:38 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id a7si17948438lae.59.2014.09.29.04.38.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 04:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gi9so7518547lab.33 for ; Mon, 29 Sep 2014 04:38:38 -0700 (PDT) X-Received: by 10.112.163.103 with SMTP id yh7mr36726216lbb.73.1411990718400; Mon, 29 Sep 2014 04:38:38 -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.112.130.169 with SMTP id of9csp156311lbb; Mon, 29 Sep 2014 04:38:37 -0700 (PDT) X-Received: by 10.221.26.70 with SMTP id rl6mr28849840vcb.0.1411990716926; Mon, 29 Sep 2014 04:38:36 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id fs6si5137540vdb.62.2014.09.29.04.38.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 29 Sep 2014 04:38:36 -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 1XYZGA-0001x3-If; Mon, 29 Sep 2014 11:36:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XYZG9-0001wr-Og for xen-devel@lists.xen.org; Mon, 29 Sep 2014 11:36:53 +0000 Received: from [85.158.137.68:7095] by server-8.bemta-3.messagelabs.com id 88/5C-31195-45449245; Mon, 29 Sep 2014 11:36:52 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-8.tower-31.messagelabs.com!1411990612!12660025!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.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22760 invoked from network); 29 Sep 2014 11:36:52 -0000 Received: from mail-out1.informatik.tu-muenchen.de (HELO smtp1.informatik.tu-muenchen.de) (131.159.0.8) by server-8.tower-31.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 29 Sep 2014 11:36:52 -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 C286A1008D428; Mon, 29 Sep 2014 13:36:51 +0200 (CEST) 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 BA862C28DFF2; Mon, 29 Sep 2014 13:36:51 +0200 (CEST) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Mon, 29 Sep 2014 13:36:42 +0200 Message-Id: <1411990609-22374-3-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411990609-22374-1-git-send-email-tklengyel@sec.in.tum.de> References: <1411990609-22374-1-git-send-email-tklengyel@sec.in.tum.de> Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, dgdegra@tycho.nsa.gov Subject: [Xen-devel] [PATCH for-4.5 v11 2/9] 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.46 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 c5b48ef..439cb01 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -971,7 +971,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,