summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2020-08-21 15:07:05 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2020-08-28 15:23:42 +0100
commite9ee186bb735bfc17fa81dbc9aebf268aee5b41e (patch)
tree2691a94dbb362cecc47361363cffc7746317d51f /arch/arm64/kernel/vmlinux.lds.S
parent5d28ba5f8a0cfa3a874fa96c33731b8fcd141b3a (diff)
downloadlinux-e9ee186bb735bfc17fa81dbc9aebf268aee5b41e.tar.gz
linux-e9ee186bb735bfc17fa81dbc9aebf268aee5b41e.tar.bz2
linux-e9ee186bb735bfc17fa81dbc9aebf268aee5b41e.zip
KVM: arm64: Add kvm_extable for vaxorcism code
KVM has a one instruction window where it will allow an SError exception to be consumed by the hypervisor without treating it as a hypervisor bug. This is used to consume asynchronous external abort that were caused by the guest. As we are about to add another location that survives unexpected exceptions, generalise this code to make it behave like the host's extable. KVM's version has to be mapped to EL2 to be accessible on nVHE systems. The SError vaxorcism code is a one instruction window, so has two entries in the extable. Because the KVM code is copied for VHE and nVHE, we end up with four entries, half of which correspond with code that isn't mapped. Signed-off-by: James Morse <james.morse@arm.com> Reviewed-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm64/kernel/vmlinux.lds.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index ec8e894684a7..7cba7623fcec 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -20,6 +20,13 @@ ENTRY(_text)
jiffies = jiffies_64;
+
+#define HYPERVISOR_EXTABLE \
+ . = ALIGN(SZ_8); \
+ __start___kvm_ex_table = .; \
+ *(__kvm_ex_table) \
+ __stop___kvm_ex_table = .;
+
#define HYPERVISOR_TEXT \
/* \
* Align to 4 KB so that \
@@ -35,6 +42,7 @@ jiffies = jiffies_64;
__hyp_idmap_text_end = .; \
__hyp_text_start = .; \
*(.hyp.text) \
+ HYPERVISOR_EXTABLE \
__hyp_text_end = .;
#define IDMAP_TEXT \