Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186446

[Patch V6 03/16] xen: don't build mfn tree if tools don't need it

From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject [Patch V6 03/16] xen: don't build mfn tree if tools don't need it
Date 2015-07-17 07:00 +0200
Message-ID <pN5UE-3zO-45@gated-at.bofh.it> (permalink)
References <pN5UC-3zO-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In case the Xen tools indicate they don't need the p2m 3 level tree
as they support the virtual mapped linear p2m list, just omit building
the tree.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <Konrad.wilk@oracle.com>
---
 arch/x86/xen/p2m.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index b89983e..c719f7c 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -199,7 +199,8 @@ void __ref xen_build_mfn_list_list(void)
 	unsigned int level, topidx, mididx;
 	unsigned long *mid_mfn_p;
 
-	if (xen_feature(XENFEAT_auto_translated_physmap))
+	if (xen_feature(XENFEAT_auto_translated_physmap) ||
+	    xen_start_info->flags & SIF_VIRT_P2M_4TOOLS)
 		return;
 
 	/* Pre-initialize p2m_top_mfn to be completely missing */
@@ -260,8 +261,11 @@ void xen_setup_mfn_list_list(void)
 
 	BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info);
 
-	HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
-		virt_to_mfn(p2m_top_mfn);
+	if (xen_start_info->flags & SIF_VIRT_P2M_4TOOLS)
+		HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = ~0UL;
+	else
+		HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
+			virt_to_mfn(p2m_top_mfn);
 	HYPERVISOR_shared_info->arch.max_pfn = xen_max_p2m_pfn;
 	HYPERVISOR_shared_info->arch.p2m_generation = 0;
 	HYPERVISOR_shared_info->arch.p2m_vaddr = (unsigned long)xen_p2m_addr;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[Patch V6 00/16] xen: support pv-domains larger than 512GB Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200
  [Patch V6 14/16] xen: move p2m list if conflicting with e820 map Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200
  [Patch V6 05/16] xen: move static e820 map to global scope Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200
  [Patch V6 16/16] xen: remove no longer needed p2m.h Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200
  [Patch V6 08/16] xen: find unused contiguous memory area Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200
  [Patch V6 03/16] xen: don't build mfn tree if tools don't need it Juergen Gross <jgross@suse.com> - 2015-07-17 07:00 +0200

csiph-web