public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] arm64: Make vector_table and vector_stub weak symbols
@ 2023-05-15 22:15 Nikos Nikoleris
  2023-05-18 16:06 ` Andrew Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Nikos Nikoleris @ 2023-05-15 22:15 UTC (permalink / raw)
  To: kvm, kvmarm, andrew.jones; +Cc: luc.maranget

This changes allows a test to define and override the declared symbols,
taking control of the whole vector_table or a vector_stub.

Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
---
 arm/cstart64.S | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arm/cstart64.S b/arm/cstart64.S
index e4ab7d06..eda0daa5 100644
--- a/arm/cstart64.S
+++ b/arm/cstart64.S
@@ -275,8 +275,11 @@ exceptions_init:
 /*
  * Vector stubs
  * Adapted from arch/arm64/kernel/entry.S
+ * Declare as weak to allow external tests to redefine and override a
+ * vector_stub.
  */
 .macro vector_stub, name, vec
+.weak \name
 \name:
 	stp	 x0,  x1, [sp, #-S_FRAME_SIZE]!
 	stp	 x2,  x3, [sp,  #16]
@@ -369,7 +372,13 @@ vector_stub	el0_error_32, 15
 	b	\label
 .endm
 
+
+/*
+ * Declare as weak to allow external tests to redefine and override the
+ * default vector table.
+ */
 .align 11
+.weak vector_table
 vector_table:
 	ventry	el1t_sync			// Synchronous EL1t
 	ventry	el1t_irq			// IRQ EL1t
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-23  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 22:15 [kvm-unit-tests PATCH] arm64: Make vector_table and vector_stub weak symbols Nikos Nikoleris
2023-05-18 16:06 ` Andrew Jones
2023-05-22 13:54   ` Nikos Nikoleris
2023-05-23  8:56     ` Andrew Jones
2023-05-23  9:52       ` Nikos Nikoleris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox