diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-12-07 13:40:43 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-06-07 09:03:32 -0400 |
commit | 2240bbb697354f5617d95e3ee104ca61bb812507 (patch) | |
tree | 40381f354ba18bdac75de83ce11e4417d525136b /arch/arm64 | |
parent | 363116073a26dbc2903d8417047597eebcc05273 (diff) |
arm64: KVM: HYP mode idmap support
Add the necessary infrastructure for identity-mapped HYP page
tables. Idmap-ed code must be in the ".hyp.idmap.text" linker
section.
The rest of the HYP ends up in ".hyp.text".
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/vmlinux.lds.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 3fae2be8b016..b0c51b7d6293 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S | |||
@@ -17,6 +17,19 @@ ENTRY(stext) | |||
17 | 17 | ||
18 | jiffies = jiffies_64; | 18 | jiffies = jiffies_64; |
19 | 19 | ||
20 | #define HYPERVISOR_TEXT \ | ||
21 | /* \ | ||
22 | * Force the alignment to be compatible with \ | ||
23 | * the vectors requirements \ | ||
24 | */ \ | ||
25 | . = ALIGN(2048); \ | ||
26 | VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ | ||
27 | *(.hyp.idmap.text) \ | ||
28 | VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \ | ||
29 | VMLINUX_SYMBOL(__hyp_text_start) = .; \ | ||
30 | *(.hyp.text) \ | ||
31 | VMLINUX_SYMBOL(__hyp_text_end) = .; | ||
32 | |||
20 | SECTIONS | 33 | SECTIONS |
21 | { | 34 | { |
22 | /* | 35 | /* |
@@ -49,6 +62,7 @@ SECTIONS | |||
49 | TEXT_TEXT | 62 | TEXT_TEXT |
50 | SCHED_TEXT | 63 | SCHED_TEXT |
51 | LOCK_TEXT | 64 | LOCK_TEXT |
65 | HYPERVISOR_TEXT | ||
52 | *(.fixup) | 66 | *(.fixup) |
53 | *(.gnu.warning) | 67 | *(.gnu.warning) |
54 | . = ALIGN(16); | 68 | . = ALIGN(16); |
@@ -124,3 +138,9 @@ SECTIONS | |||
124 | STABS_DEBUG | 138 | STABS_DEBUG |
125 | .comment 0 : { *(.comment) } | 139 | .comment 0 : { *(.comment) } |
126 | } | 140 | } |
141 | |||
142 | /* | ||
143 | * The HYP init code can't be more than a page long. | ||
144 | */ | ||
145 | ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end), | ||
146 | "HYP init code too big") | ||