From patchwork Mon Sep 29 15:55:12 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: 38086 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8395F201F1 for ; Mon, 29 Sep 2014 15:57:10 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e51sf731378eek.7 for ; Mon, 29 Sep 2014 08:57:09 -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=LW+5H6lSQaaZbrzlkg2NItHHY5B1ITlwiFs5+jRji7JmhxFM3x5pHW2wHkEpds5+Dd G/1ubGqKXcSwR7DTxF/A+trF20gMpwESoFhzJ0iFTUA7FG5aYbxTI15KAalSZAKa/jXF CQYg2MwmhUHng9ja1f5hetawzqlBBCHYwAWqxxE9LjV3953wPQW2vSwIYNLE4i1v/KbW J2VBA2432Vu6OvlCzs2rj9tVH+Lar95i/LpTFfOk3Ka18JdadfFjfA6rGpvLXGs3PgYf HESlAxBXt+egI4qO1ty3XcVLjD4jEksBWHmXCRmErfKMw4ixnGTgwFUpxwngogRNq/Rq Fk4Q== X-Gm-Message-State: ALoCoQnDPbiCPHtNSa6/b3PBJD58r6AsuSXZrF7GzLUhcfSNqYcBKvJjSpXjeaeYyzjs/p5A1Z3g X-Received: by 10.112.132.37 with SMTP id or5mr5978704lbb.2.1412006229491; Mon, 29 Sep 2014 08:57:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.8 with SMTP id bc8ls602499lab.86.gmail; Mon, 29 Sep 2014 08:57:09 -0700 (PDT) X-Received: by 10.112.253.165 with SMTP id ab5mr38454677lbd.1.1412006229270; Mon, 29 Sep 2014 08:57:09 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id 2si18810263lay.98.2014.09.29.08.57.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 08:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id mc6so18039766lab.6 for ; Mon, 29 Sep 2014 08:57:09 -0700 (PDT) X-Received: by 10.152.42.136 with SMTP id o8mr40374487lal.71.1412006228984; Mon, 29 Sep 2014 08:57:08 -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 of9csp201460lbb; Mon, 29 Sep 2014 08:57:08 -0700 (PDT) X-Received: by 10.220.91.136 with SMTP id n8mr875673vcm.57.1412006227333; Mon, 29 Sep 2014 08:57:07 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id m9si5345713vcl.104.2014.09.29.08.57.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 29 Sep 2014 08:57:07 -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 1XYdIF-0003pQ-BT; Mon, 29 Sep 2014 15:55:19 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XYdID-0003ot-CM for xen-devel@lists.xen.org; Mon, 29 Sep 2014 15:55:17 +0000 Received: from [85.158.137.68:57601] by server-8.bemta-3.messagelabs.com id E4/21-31195-4E089245; Mon, 29 Sep 2014 15:55:16 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-6.tower-31.messagelabs.com!1412006115!8280166!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 2050 invoked from network); 29 Sep 2014 15:55:15 -0000 Received: from mail-out2.informatik.tu-muenchen.de (HELO smtp2.informatik.tu-muenchen.de) (131.159.0.36) by server-6.tower-31.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 29 Sep 2014 15:55:15 -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 E36F810110FD0; Mon, 29 Sep 2014 17:55:14 +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 DF931C0027DC; Mon, 29 Sep 2014 17:55:14 +0200 (CEST) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Mon, 29 Sep 2014 17:55:12 +0200 Message-Id: <1412006113-31551-3-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412006113-31551-1-git-send-email-tklengyel@sec.in.tum.de> References: <1412006113-31551-1-git-send-email-tklengyel@sec.in.tum.de> Cc: tim@xen.org, dgdegra@tycho.nsa.gov, Julien Grall , stefano.stabellini@citrix.com, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH for-4.5 v12 2/3] 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.47 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,