Skip to contentSkip to conversation

support >3 level p2m tree

PATCH Superseded Juergen Gross 1 participant 2 messages Sep 9, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover support >3 level p2m tree

Pv domains write the mfn of a 3 level p2m tree to arch_shared_info structure. Consumers of this information are the domain save/restore functions of the Xen tools.

Being defined as having 3 levels the maximum supported domain size of 64 bit domains is 512 GB. The following patch expands the arch_shared_info structure to support more levels.

The Xen tools are not covered in this patch as the patch series "Libxl migration v2 support":
http://lists.xen.org/archives/html/xen-devel/2014-09/msg00427.html
should be applied first.

Juergen Gross (1):
expand x86 arch_shared_info to support >3 level p2m tree

 xen/include/public/arch-x86/xen.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH v2 1/1 expand x86 arch_shared_info to support >3 level p2m tree

The x86 struct arch_shared_info field pfn_to_mfn_frame_list_list currently contains the mfn of the top level page frame of the 3 level p2m tree, which is used by the Xen tools during saving and restoring (and live migration) of pv domains. With three levels of the p2m tree it is possible to support up to 512 GB of RAM for a 64 bit pv domain. A 32 bit pv domain can support more, as each memory page can hold 1024 instead of 512 entries, leading to a limit of 4 TB. To be able to support more RAM on x86-64 an additional level is to be added.

This patch expands struct arch_shared_info with a new p2m tree root and the number of levels of the p2m tree. The new information is indicated by the domain to be valid by storing ~0UL into pfn_to_mfn_frame_list_list (this should be done only if more than three levels are needed, of course).

---
 xen/include/public/arch-x86/xen.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
xen/include/public/arch-x86/xen.h +7 -1
index f35804b..23046d6 100644
@@ -224,7 +224,13 @@ struct arch_shared_info {
     /* Frame containing list of mfns containing list of mfns containing p2m. */
     xen_pfn_t     pfn_to_mfn_frame_list_list;
     unsigned long nmi_reason;
-    uint64_t pad[32];
+    /*
+     * Following two fields are valid if pfn_to_mfn_frame_list_list contains
+     * ~0UL.
+     */
+    unsigned long p2m_levels;   /* number of levels of p2m tree */
+    xen_pfn_t     p2m_root;     /* p2m tree top level mfn */
+    uint64_t pad[32 - (sizeof(unsigned long) + sizeof(xen_pfn_t)) / 8];
 };
 typedef struct arch_shared_info arch_shared_info_t;
 
Signature · 1 line
1.8.4.5