From patchwork Thu Sep 25 11:56:45 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: 37918 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F01EE20560 for ; Thu, 25 Sep 2014 11:58:28 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id n15sf416839lbi.11 for ; Thu, 25 Sep 2014 04:58:27 -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=fvim42VCo7jehcqPol1RzIOYgxCyqJV11ng0/atHreK9KQd/fPXP0lbalBSCpiFfMg fauoZoE4Sqmwoo6zQRnxnK1yfEjNGkdy+Lx9Yx7FyDINAK5nsj1LLlHG2ILaLXkDdprd eg5vNVHKettNeAXylmGnGmaE5wDevRHQhWcahDL73eqkN9flpJWD5SM61rGb1+6T34Ws p/XmQUC68gcpqDQFQV+InBll8uols3QIQuv7hagIilc9PQ9bDzNdXmzoVNVJBJ9SAznZ bNjuRjrqzYWO7JwCc77pZIB2Za/vNPYfmD0JxW5PBH0EVCQ2jsatJjLQ2U+hPuuKsdZW SiNQ== X-Gm-Message-State: ALoCoQmkOPvgig4adGhu6Qp1mWK0hXqddXInVmqwgfrnrYL3+6PD7f4lNL8I+ycbX03GAwgTkSWJ X-Received: by 10.180.83.7 with SMTP id m7mr2498355wiy.5.1411646307749; Thu, 25 Sep 2014 04:58:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.137 with SMTP id y9ls261308laj.93.gmail; Thu, 25 Sep 2014 04:58:27 -0700 (PDT) X-Received: by 10.112.145.100 with SMTP id st4mr2947700lbb.17.1411646307489; Thu, 25 Sep 2014 04:58:27 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id mk4si2731245lbc.48.2014.09.25.04.58.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Sep 2014 04:58:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id pn19so12158230lab.8 for ; Thu, 25 Sep 2014 04:58:27 -0700 (PDT) X-Received: by 10.112.62.200 with SMTP id a8mr12155932lbs.34.1411646307425; Thu, 25 Sep 2014 04:58:27 -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 of9csp736118lbb; Thu, 25 Sep 2014 04:58:26 -0700 (PDT) X-Received: by 10.224.163.83 with SMTP id z19mr18030612qax.68.1411646305934; Thu, 25 Sep 2014 04:58:25 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id p8si2066031qax.109.2014.09.25.04.58.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 25 Sep 2014 04:58:25 -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 1XX7fY-0006vN-KE; Thu, 25 Sep 2014 11:57:08 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XX7fR-0006iD-M6 for xen-devel@lists.xen.org; Thu, 25 Sep 2014 11:57:01 +0000 Received: from [85.158.143.35:47735] by server-3.bemta-4.messagelabs.com id A1/19-06192-C0304245; Thu, 25 Sep 2014 11:57:00 +0000 X-Env-Sender: tklengyel@sec.in.tum.de X-Msg-Ref: server-3.tower-21.messagelabs.com!1411646219!11562499!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 4539 invoked from network); 25 Sep 2014 11:57:00 -0000 Received: from mail-out1.informatik.tu-muenchen.de (HELO smtp1.informatik.tu-muenchen.de) (131.159.0.8) by server-3.tower-21.messagelabs.com with DHE-RSA-AES256-SHA encrypted SMTP; 25 Sep 2014 11:57:00 -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 8F23D10198C15; Thu, 25 Sep 2014 13:56:53 +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 8DB6AC28DFE4; Thu, 25 Sep 2014 13:56:53 +0200 (CEST) From: Tamas K Lengyel To: xen-devel@lists.xen.org Date: Thu, 25 Sep 2014 13:56:45 +0200 Message-Id: <1411646212-17041-13-git-send-email-tklengyel@sec.in.tum.de> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411646212-17041-1-git-send-email-tklengyel@sec.in.tum.de> References: <1411646212-17041-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 v10 12/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.215.49 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,