fix(runtime): mask off SVE hint bit in SMC function id
Realms with SVE enabled might pass the SVE hint bit in SMC FID. This
results in invalid RSI function call.
Mask off this bit in RSI handler and in RMI handler until RMM supports
the usage of SVE hint bit.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5f9432eec0231081c79f57eaa70c685f302eabb1
diff --git a/runtime/core/handler.c b/runtime/core/handler.c
index 31393b5..93e9927 100644
--- a/runtime/core/handler.c
+++ b/runtime/core/handler.c
@@ -221,6 +221,9 @@
unsigned long handler_id;
const struct smc_handler *handler = NULL;
+ /* Ignore SVE hint bit, until RMM supports SVE hint bit */
+ function_id &= ~MASK(SMC_SVE_HINT);
+
if (IS_SMC64_RMI_FID(function_id)) {
handler_id = SMC_RMI_HANDLER_ID(function_id);
if (handler_id < ARRAY_LEN(smc_handlers)) {