diff options
author | Will Deacon <will.deacon@arm.com> | 2015-03-23 11:30:32 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-23 11:30:32 +0000 |
commit | 6232cfd0fa01fe392df0b18a3a06628f130b83b2 (patch) | |
tree | 468aeeedd2aed27b2d721a72b7da071ef29ace1e /arch/arm64/kernel | |
parent | ce47fbb7c8956742a6de06b9706b1c6236339f51 (diff) | |
parent | e60a1fec44a2fe2c85ac406a5c1161ca2957a4fa (diff) | |
download | linux-6232cfd0fa01fe392df0b18a3a06628f130b83b2.tar.bz2 |
Merge branch 'aarch64/kvm-bounce-page' into aarch64/for-next/core
Rework of the KVM HYP bounce page from Ard Biesheuvel. Subsequent arm64
idmap rework depends on this, so merge it here with Marc Zyngier's
blessing (kvm-arm co-maintainer).
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/vmlinux.lds.S | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 5d9d2dca530d..a2c29865c3fe 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -23,10 +23,14 @@ jiffies = jiffies_64; #define HYPERVISOR_TEXT \ /* \ - * Force the alignment to be compatible with \ - * the vectors requirements \ + * Align to 4 KB so that \ + * a) the HYP vector table is at its minimum \ + * alignment of 2048 bytes \ + * b) the HYP init code will not cross a page \ + * boundary if its size does not exceed \ + * 4 KB (see related ASSERT() below) \ */ \ - . = ALIGN(2048); \ + . = ALIGN(SZ_4K); \ VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ *(.hyp.idmap.text) \ VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \ @@ -163,10 +167,11 @@ SECTIONS } /* - * The HYP init code can't be more than a page long. + * The HYP init code can't be more than a page long, + * and should not cross a page boundary. */ -ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end), - "HYP init code too big") +ASSERT(__hyp_idmap_text_end - (__hyp_idmap_text_start & ~(SZ_4K - 1)) <= SZ_4K, + "HYP init code too big or misaligned") /* * If padding is applied before .head.text, virt<->phys conversions will fail. |