From patchwork Tue Sep 23 13:14:24 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: 37731 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3C75320970 for ; Tue, 23 Sep 2014 13:16:25 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id w62sf1843925wes.3 for ; Tue, 23 Sep 2014 06:16:24 -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=N+1gNJI31bWJGthKqTgWPRtbDJRVqZfZlPp39dFVqpPmx1WdCsExFSyUeMq5jdmNL8 CDYc5+oswmoRJ70+P5OkgTW5se/Smi6HtRhnzjya52MOSP56dBhEG9LMfRG5Z/CIq49P Ero9oaf4LI9k8TRaNa1JoXJdEy59FwscPaRAZvNnW8SFEXyVqp0s6jaQ9lz6gbTAwoid qilU9oUXFxU254Up6MsDPFF/ND6u4ffjVYd/UeO/ZdwvOQVIwzrk61WzSl0LSc2tCoHZ 9GVC7MSIkru3MGez4d+pTDv9jJoVX1m/YszFC2W4tSDgKlpfh71QarQutojI1LyCW/Ob u9Bw== X-Gm-Message-State: ALoCoQl9WnPs+DDh3ZXbCyCQJdv3u8AdHdGi07g0Uz56GAWlIwDkquo5nfLjUFp8i/5rQsw45KS5 X-Received: by 10.112.170.166 with SMTP id an6mr353736lbc.17.1411478184279; Tue, 23 Sep 2014 06:16:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.103 with SMTP id bf7ls47309lab.11.gmail; Tue, 23 Sep 2014 06:16:24 -0700 (PDT) X-Received: by 10.152.18.199 with SMTP id y7mr33233646lad.0.1411478184086; Tue, 23 Sep 2014 06:16:24 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by mx.google.com with ESMTPS id mq7si18602151lbc.88.2014.09.23.06.16.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 06:16:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id z11so3324062lbi.15 for ; Tue, 23 Sep 2014 06:16:24 -0700 (PDT) X-Received: by 10.112.75.233 with SMTP id f9mr2984619lbw.102.1411478184016; Tue, 23 Sep 2014 06:16:24 -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 of9csp408027lbb; Tue, 23 Sep 2014 06:16:23 -0700 (PDT) X-Received: by 10.221.24.7 with SMTP id rc7mr289230vcb.54.1411478182517; Tue, 23 Sep 2014 06:16:22 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 9si4270349vcq.96.2014.09.23.06.16.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 23 Sep 2014 06:16:22 -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 1XWPvW-0008PG-La; Tue, 23 Sep 2014 13:14:42 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWPvS-0008K0-1p for xen-devel@lists.xen.org; Tue, 23 Sep 2014 13:14:38 +0000 Received: from [85.158.143.35:4802] by server-3.bemta-4.messagelabs.com id 5C/AA-06192-B3271245; Tue, 23 Sep 2014 13:14:35 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-12.tower-21.messagelabs.com!1411478074!12655427!1 X-Originating-IP: [131.159.0.36] 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 21863 invoked from network); 23 Sep 2014 13:14:35 -0000 Received: from mail-out2.informatik.tu-muenchen.de (HELO smtp2.informatik.tu-muenchen.de) (131.159.0.36) by server-12.tower-21.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 23 Sep 2014 13:14:35 -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 333F4101963CF; Tue, 23 Sep 2014 15:14:32 +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 31CDDC6EBECC; Tue, 23 Sep 2014 15:14:32 +0200 (CEST) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Tue, 23 Sep 2014 15:14:24 +0200 Message-Id: <1411478070-13836-14-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411478070-13836-1-git-send-email-tklengyel@sec.in.tum.de> References: <1411478070-13836-1-git-send-email-tklengyel@sec.in.tum.de> Cc: ian.campbell@citrix.com, tim@xen.org, julien.grall@linaro.org, ian.jackson@eu.citrix.com, stefano.stabellini@citrix.com, andres@lagarcavilla.org, jbeulich@suse.com, dgdegra@tycho.nsa.gov Subject: [Xen-devel] [PATCH for-4.5 v8 13/19] 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.217.170 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,