From patchwork Mon Oct 2 12:59:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 114600 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp653619qgn; Mon, 2 Oct 2017 06:02:01 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCKv+LtvvIcqskpKpHcj3TjKtBEEZGehtY5VjhpOv5URvtAaX8yf9Y/c3SXd2yEHiErpl1k X-Received: by 10.36.117.79 with SMTP id y76mr18190217itc.16.1506949320858; Mon, 02 Oct 2017 06:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506949320; cv=none; d=google.com; s=arc-20160816; b=DoYPOvwbBVDZ3DUwJDFVYSqNAIc185tn2+LNqLhlLEcueimSgIF8xJNTjGY3UppjvB i+OsBOarKXPN0QWLLlfrlYb0MH8iRDOr/ARbHEM36iTIhpKQ73yuTw8ehR2NmguaUqHi RZT5AtcJIK42l2OaxCjV3lyPgbqDBKCSPqAV5WpHxSD6qGh1461Xcg42xW/eqHmljczO +E/XlqOxRCW1IdPcH0cORTsMSoFXzUsLJGRUzzmticHg6EhwlgmvMGXnRWOCCcelS+9x Sz0p8FNbKqW6TZNR78zME+NIo8NOLqVHy6Ezp7KWi8ovH0qrZgf+hTEvpEgZfaDjndTH UODQ== 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=uizgJnW2irPAiXDwSH+XDhgAj0yhQrEmDoEmWfchh/s=; b=HnLhgbCWZ8tdcxA7ZTqet6MhrJTqC92WH1EeYdwMhliaa4kY8oGoPuAdxOiVuI+ERS Kj+Tpr/xXvfPk1hMvKOJ0WhPdnmnzui5o0sStdr2xBCrPw5a7kCYmyA5hsHUa0u3nkfs oG9vU9ks+lHPZobWRMKVGCR8Bm4qlhuZBSgFtTA25v/+DDp3p3RBAiEt6pzkA6/HMGxj oQE+uY+9daXrmuJ780TXXCqcKBJipqZ0xUtOqGb0rUec8IT9h1K7cg8pq+u6/Gxs2HkI cqnuWV3fKfOYZGiYwUgXo4lqmqI4aiiWOb3khoa6fAA1zkJnOFi4fGn4KtaVVm8KviJD ZSzA== 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 n73si9033197ioe.331.2017.10.02.06.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Oct 2017 06:02:00 -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 1dz0KG-0003dV-2e; Mon, 02 Oct 2017 13:00:00 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz0KE-0003cS-9Q for xen-devel@lists.xen.org; Mon, 02 Oct 2017 12:59:58 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id B7/C8-25121-D4832D95; Mon, 02 Oct 2017 12:59:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsVysyfVTdfD4lK kQfNpXYslHxezODB6HN39mymAMYo1My8pvyKBNeP/f5OCFxYV/zZ/Z2lgfKzZxcjFISSwmVHi 1KKDjBDOaUaJRYf2s3UxcnKwCWhK3Pn8iQnEFhGQlrj2+TJYEbPAYkaJz/t7mUESwgLuEi9Ob 2cHsVkEVCV2ndwGFucVsJRo3v6VBcSWEJCX2NV2kRXE5hSwknh//COYLQRUc7x7EtMERu4FjA yrGNWLU4vKUot0zfSSijLTM0pyEzNzdA0NjPVyU4uLE9NTcxKTivWS83M3MQL9W8/AwLiD8Uq b8yFGSQ4mJVFeZsNLkUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeDXMgXKCRanpqRVpmTnAQINJ S3DwKInwmoKkeYsLEnOLM9MhUqcYdTk6bt79wyTEkpeflyolzvvfDKhIAKQoozQPbgQs6C8xy koJ8zIyMDAI8RSkFuVmlqDKv2IU52BUEublAlnFk5lXArfpFdARTEBHzOm6AHJESSJCSqqB8a ZU0zS13ZmXloa5nTZ3+G9UdlyAvWPGjNY7t/+UB7MZvPx1RmVRms2lCQ9ubtqSK7bxi/7GubX Tnb3UAtqs/H9u2Xn083zHCessLOsVUyJlukWtxP6c28R8Zsnlaq2Tz+vONrkuu39H9T1vWZNl CE/i1rk2RvckN/3qXb/XQaD7l43yJIW+LiWW4oxEQy3mouJEACy8hL51AgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-2.tower-31.messagelabs.com!1506949192!105812660!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 23311 invoked from network); 2 Oct 2017 12:59:52 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-2.tower-31.messagelabs.com with SMTP; 2 Oct 2017 12:59:52 -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 CA8FE15A2; Mon, 2 Oct 2017 05:59:51 -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 BB9D63F53D; Mon, 2 Oct 2017 05:59:50 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 2 Oct 2017 13:59:28 +0100 Message-Id: <20171002125941.11274-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171002125941.11274-1-julien.grall@arm.com> References: <20171002125941.11274-1-julien.grall@arm.com> Cc: George Dunlap , Andrew Cooper , Julien Grall , Jan Beulich Subject: [Xen-devel] [PATCH v3 02/15] 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: George Dunlap Reviewed-by: Wei Liu --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Changes in v3: - Add George's and Wei's reviewed-by 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); }