[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] include/public: add new elf note for support of huge physical addresses



Current pv guests will only see physical addresses up to 46 bits wide.
In order to be able to run on a host supporting 5 level paging and to
make use of any possible memory page there, physical addresses with up
to 52 bits have to be supported.

As Xen needs to know whether a pv guest can handle such large addresses
the kernel of the guest has to advertise this capability.

Add a new ELF note for the maximum physical address the kernel can
make use of.

Please note that it is not required for a pv guest to support 5 level
paging in order to use high physical addresses.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
As I'd like to add support for large physical addresses in pv guests
rather sooner than later to the Linux kernel, I'm suggesting this
public interface change way before any 5 level paging support is added
to Xen.
---
 xen/include/public/elfnote.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/elfnote.h b/xen/include/public/elfnote.h
index 936aa65822..8d76437f19 100644
--- a/xen/include/public/elfnote.h
+++ b/xen/include/public/elfnote.h
@@ -212,9 +212,18 @@
 #define XEN_ELFNOTE_PHYS32_ENTRY 18
 
 /*
+ * Maximum physical address size the kernel can handle.
+ *
+ * All memory of the PV guest must be allocated below this boundary,
+ * as the guest kernel can't handle page table entries with MFNs referring
+ * to memory above this value.
+ */
+#define XEN_ELFNOTE_MAXPHYS_SIZE 19
+
+/*
  * The number of the highest elfnote defined.
  */
-#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY
+#define XEN_ELFNOTE_MAX XEN_ELFNOTE_MAXPHYS_SIZE
 
 /*
  * System information exported through crash notes.
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.