From patchwork Wed Sep 17 20:51:18 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: 37539 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E20E22057E for ; Wed, 17 Sep 2014 20:52:55 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf38917wib.6 for ; Wed, 17 Sep 2014 13:52:55 -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=TP5LNmxyvSSnj6DBRHp+gRN1H9NSMHqjr5/LJA8J3SA=; b=JRxjYdIzJaFbcaRz0sSxi0ytGWwRwmTTcNu2d85OpK142wNS6KKm32h66GqTTC4Gug PmcDakF5Ig+rluhM/gKCZa5kWa5FvYJflwPNbbngSKecLd1OFKZ9clNie1NasIa64k0t jktwye1EfWHkOnfk3LgPDbcM73PVUrbf6r5PinDgBFavicI/8AQIINQgWQl2j0CNhFsb qgZilYLk9L+Glxk8DeRyBiYi2i+SKRaJAQGz/D55gWlGzPeIpMmE6NNU6pKGIeowA68k wktwCdpjySSRhD801ze83/wtZoKiTDyi/vQaZ2E162ksuZHKcBXeZJoMcbXyMMFqCWvg gH0Q== X-Gm-Message-State: ALoCoQmUWCjnwkdK0deHU0oXqHA4Ywx1o3XFbezz/Bm+08UthKDN06hIHvOE5uYn7npMR/cJxQQO X-Received: by 10.112.131.33 with SMTP id oj1mr324348lbb.7.1410987175092; Wed, 17 Sep 2014 13:52:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.40 with SMTP id 8ls146116laj.65.gmail; Wed, 17 Sep 2014 13:52:55 -0700 (PDT) X-Received: by 10.152.22.200 with SMTP id g8mr237977laf.1.1410987174762; Wed, 17 Sep 2014 13:52:54 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by mx.google.com with ESMTPS id jf4si30057027lbc.100.2014.09.17.13.52.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Sep 2014 13:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id b17so2671586lan.4 for ; Wed, 17 Sep 2014 13:52:54 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr43197431lbh.67.1410987174698; Wed, 17 Sep 2014 13:52:54 -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 of9csp654927lbb; Wed, 17 Sep 2014 13:52:54 -0700 (PDT) X-Received: by 10.224.21.68 with SMTP id i4mr61896578qab.83.1410987173302; Wed, 17 Sep 2014 13:52:53 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id q67si23800380qgd.122.2014.09.17.13.52.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 17 Sep 2014 13:52:53 -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 1XUMCi-000536-Ln; Wed, 17 Sep 2014 20:51:56 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XUMCc-0004xa-Ig for xen-devel@lists.xen.org; Wed, 17 Sep 2014 20:51:50 +0000 Received: from [85.158.143.35:8513] by server-1.bemta-4.messagelabs.com id 81/63-05872-364F9145; Wed, 17 Sep 2014 20:51:47 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-16.tower-21.messagelabs.com!1410987106!10100275!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.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4898 invoked from network); 17 Sep 2014 20:51:47 -0000 Received: from mail-out2.informatik.tu-muenchen.de (HELO smtp2.informatik.tu-muenchen.de) (131.159.0.36) by server-16.tower-21.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 17 Sep 2014 20:51:47 -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 6EB98101724D6; Wed, 17 Sep 2014 22:51:41 +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 6D33FC218A35; Wed, 17 Sep 2014 22:51:41 +0200 (CEST) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Wed, 17 Sep 2014 22:51:18 +0200 Message-Id: <1410987084-11899-16-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410987084-11899-1-git-send-email-tklengyel@sec.in.tum.de> References: <1410987084-11899-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 v7 15/21] 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.45 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 0a243b0..e4a1e5e 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -954,7 +954,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,