From patchwork Thu Sep 21 12:40:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 113244 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp1845956edb; Thu, 21 Sep 2017 05:42:53 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAgbuD6et8RSIhqlSODVKFE7+1arPoJRRZHVYKwKKv/BjdcGovqDO3zNDUqiRIU++XvYSjj X-Received: by 10.36.176.70 with SMTP id b6mr1341537itj.26.1505997773084; Thu, 21 Sep 2017 05:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505997773; cv=none; d=google.com; s=arc-20160816; b=wJcnnSCbz8bpkX1slWSuMXyzhLiO1U7zpJy5Osw5p6h6c8u73Erj4hFmV4LlU8cCPl lzJv5gqxZrkWSZJB0FvL1hitofmaKyDpCSa4SeCAoL0J+XvYZzBJh4PF17Vn/wEioneS akR1015PocnEpOUWKljVwx6B7O4jQpLR4MJVCH7VjE3M0VOvr/42/ZOQkjKvtx88kFCF Loy1XfKGPn3FtbqgefA+5a68r1k7puJ6HxC6fsEqleiQG3O51q66sznK/WUBZ3J6tclO ND9yJAsbqhtZxIeA3STrOQWy3ZU52Z76m7gXcWlz+KRsZB/id3HtvOIErPDl8uFR9lWO CbWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=5LkedxGVepuXfooI3JX1z2s3xDQvcTzMdVi/Y1RNP78=; b=JMfI9B4eRX2zy9sWJEjQRPkZFfXyVqXWDuEpU6RLR4h+HCXGVccWO5vBSdsQ/lIBu8 nDESz9ASDpxr1H1LKlnyauuwRxOqZzE0KDHfImG32C7gqCgrtXg+1aVc4VC6opVqisj7 D/ndvfbDccATxomB5hmdzYbeFizH6VDixMbuy65WyeoOAcMOhDsRpblPqOWh0zSEIbs8 uMnKgrZ+z+tn77FN7p6RZkSeY5GlvPCACZKlA8EdmdYctl2bxcLMyhwnrTYgSNuMW6zB ScaJwwINZZHq/deHtIWn1Gsp7IRtXajutlcRxlPiy4QaGMMwoWHea93zNafsArVT0jw6 MF9g== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id b65si1129928iob.116.2017.09.21.05.42.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 05:42:52 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv0mh-0001EA-K3; Thu, 21 Sep 2017 12:40:51 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv0mg-0001D1-D7 for xen-devel@lists.xen.org; Thu, 21 Sep 2017 12:40:50 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id 4F/56-03642-153B3C95; Thu, 21 Sep 2017 12:40:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRWlGSWpSXmKPExsVysyfVTddv8+F IgxO/+CyWfFzM4sDocXT3b6YAxijWzLyk/IoE1oztM7rYC46ZVzx5uJ25gfG+RhcjF4eQwGZG iZ1nlzJDOKcZJSZsOM/UxcjJwSagKXHn8ycwW0RAWuLa58uMIEXMAosZJT7v72UGSQgLuEt0n 7zM1sXIwcEioCoxaUEsSJhXwELi7YlrYCUSAvISu9ousoLYnAKWEm2Hv4HZQkA1vyacYJ3AyL 2AkWEVo0ZxalFZapGukaleUlFmekZJbmJmjq6hgZlebmpxcWJ6ak5iUrFecn7uJkaghxmAYAf jqgWBhxglOZiURHl5/hyKFOJLyk+pzEgszogvKs1JLT7EKMPBoSTBa/cXKCdYlJqeWpGWmQMM NZi0BAePkgivIUiat7ggMbc4Mx0idYpRl6Pj5t0/TEIsefl5qVLivO4gRQIgRRmleXAjYGF/i VFWSpiXEegoIZ6C1KLczBJU+VeM4hyMSsK86iBTeDLzSuA2vQI6ggnoiOwNB0COKElESEk1MK oUb8s3lVsr+J2vcI73P8+ejz8O6YU7eJ3o2HHT8nLKpScrTc23OJrsmLdaTqtQ+/nU7x+s3Kv tdtj1Cb4xyrVKrfj/Ku/84w8bs1UK1SaVxU44vfnE173PeL3jLm+/Hce1bJG0QpSc/onEFRop gTwhV8/9+N9odCP83ox/9h3sFUy7Lwi8CldiKc5INNRiLipOBACf1PatdgIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1505997645!60906383!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 61289 invoked from network); 21 Sep 2017 12:40:45 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-6.tower-21.messagelabs.com with SMTP; 21 Sep 2017 12:40:45 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66295164F; Thu, 21 Sep 2017 05:40:45 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 571F33F58C; Thu, 21 Sep 2017 05:40:44 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 21 Sep 2017 13:40:21 +0100 Message-Id: <20170921124035.2410-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170921124035.2410-1-julien.grall@arm.com> References: <20170921124035.2410-1-julien.grall@arm.com> Cc: George Dunlap , Andrew Cooper , Julien Grall , Jan Beulich Subject: [Xen-devel] [PATCH v2 02/16] xen/x86: p2m-pod: Remove trailing whitespaces X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Signed-off-by: Julien Grall Acked-by: Andrew Cooper Reviewed-by: Wei Liu Reviewed-by: George Dunlap --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Changes in v2: - Add Andrew's acked-by --- xen/arch/x86/mm/p2m-pod.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c index fec87e5224..1f07441259 100644 --- a/xen/arch/x86/mm/p2m-pod.c +++ b/xen/arch/x86/mm/p2m-pod.c @@ -1,7 +1,7 @@ /****************************************************************************** * arch/x86/mm/p2m-pod.c * - * Populate-on-demand p2m entries. + * Populate-on-demand p2m entries. * * Copyright (c) 2009-2011 Citrix Systems, Inc. * @@ -76,7 +76,7 @@ p2m_pod_cache_add(struct p2m_domain *p2m, __func__, mfn_x(mfn), order, ((1UL << order) - 1)); return -1; } - + for(i=0; i < 1 << order ; i++) { struct domain * od; @@ -223,8 +223,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p /* If we can't allocate a superpage, try singleton pages */ order = PAGE_ORDER_4K; goto retry; - } - + } + printk("%s: Unable to allocate page for PoD cache (target=%lu cache=%ld)\n", __func__, pod_target, p2m->pod.count); ret = -ENOMEM; @@ -272,7 +272,7 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p if ( test_and_clear_bit(_PGT_pinned, &(page+i)->u.inuse.type_info) ) put_page_and_type(page+i); - + if ( test_and_clear_bit(_PGC_allocated, &(page+i)->count_info) ) put_page(page+i); @@ -296,7 +296,7 @@ out: * definitions: * + M: static_max * + B: number of pages the balloon driver has ballooned down to. - * + P: Number of populated pages. + * + P: Number of populated pages. * + T: Old target * + T': New target * @@ -311,10 +311,10 @@ out: * the remainder of the ram to the guest OS. * T default_access); - + out: gfn_unlock(p2m, gfn, SUPERPAGE_ORDER); return ret; @@ -836,8 +836,8 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) /* If this is ram, and not a pagetable or from the xen heap, and probably not mapped elsewhere, map it; otherwise, skip. */ if ( p2m_is_ram(types[i]) - && ( (mfn_to_page(mfns[i])->count_info & PGC_allocated) != 0 ) - && ( (mfn_to_page(mfns[i])->count_info & (PGC_page_table|PGC_xen_heap)) == 0 ) + && ( (mfn_to_page(mfns[i])->count_info & PGC_allocated) != 0 ) + && ( (mfn_to_page(mfns[i])->count_info & (PGC_page_table|PGC_xen_heap)) == 0 ) && ( (mfn_to_page(mfns[i])->count_info & PGC_count_mask) <= max_ref ) ) map[i] = map_domain_page(mfns[i]); else @@ -915,7 +915,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) t.mfn = mfn_x(mfns[i]); t.d = d->domain_id; t.order = 0; - + __trace_var(TRC_MEM_POD_ZERO_RECLAIM, 0, sizeof(t), &t); } @@ -924,7 +924,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) p2m->pod.entry_count++; } } - + } #define POD_SWEEP_LIMIT 1024 @@ -1046,12 +1046,12 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, pod_lock(p2m); /* This check is done with the pod lock held. This will make sure that - * even if d->is_dying changes under our feet, p2m_pod_empty_cache() + * even if d->is_dying changes under our feet, p2m_pod_empty_cache() * won't start until we're done. */ if ( unlikely(d->is_dying) ) goto out_fail; - + /* Because PoD does not have cache list for 1GB pages, it has to remap * 1GB region to 2MB chunks for a retry. */ if ( order == PAGE_ORDER_1G ) @@ -1107,7 +1107,7 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, set_gpfn_from_mfn(mfn_x(mfn) + i, gfn_aligned + i); paging_mark_dirty(d, mfn_add(mfn, i)); } - + p2m->pod.entry_count -= (1 << order); BUG_ON(p2m->pod.entry_count < 0); @@ -1124,7 +1124,7 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn, t.mfn = mfn_x(mfn); t.d = d->domain_id; t.order = order; - + __trace_var(TRC_MEM_POD_POPULATE, 0, sizeof(t), &t); } @@ -1161,7 +1161,7 @@ remap_and_retry: t.gfn = gfn; t.d = d->domain_id; - + __trace_var(TRC_MEM_POD_SUPERPAGE_SPLINTER, 0, sizeof(t), &t); }