]> Pileus Git - ~andy/linux/blobdiff - arch/arm64/kernel/vmlinux.lds.S
Merge branch 'kvm-arm64/kvm-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / arch / arm64 / kernel / vmlinux.lds.S
index 5e06a1786e267db73909916b39382835ebfff5a0..f5e55747242f3e9562f70224e764e4661d81fb83 100644 (file)
@@ -17,6 +17,19 @@ ENTRY(stext)
 
 jiffies = jiffies_64;
 
+#define HYPERVISOR_TEXT                                        \
+       /*                                              \
+        * Force the alignment to be compatible with    \
+        * the vectors requirements                     \
+        */                                             \
+       . = ALIGN(2048);                                \
+       VMLINUX_SYMBOL(__hyp_idmap_text_start) = .;     \
+       *(.hyp.idmap.text)                              \
+       VMLINUX_SYMBOL(__hyp_idmap_text_end) = .;       \
+       VMLINUX_SYMBOL(__hyp_text_start) = .;           \
+       *(.hyp.text)                                    \
+       VMLINUX_SYMBOL(__hyp_text_end) = .;
+
 SECTIONS
 {
        /*
@@ -49,6 +62,7 @@ SECTIONS
                        TEXT_TEXT
                        SCHED_TEXT
                        LOCK_TEXT
+                       HYPERVISOR_TEXT
                        *(.fixup)
                        *(.gnu.warning)
                . = ALIGN(16);
@@ -116,3 +130,9 @@ SECTIONS
        STABS_DEBUG
        .comment 0 : { *(.comment) }
 }
+
+/*
+ * The HYP init code can't be more than a page long.
+ */
+ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end),
+       "HYP init code too big")