fix: simplify secure interrupt handling
Now that hafnium supports queueing of virtual interrupts for each
execution context of an SP, there is no need to disallow high priority
interrupts from preempting a vCPU while it is handling a virtual
interrupt.
Hence, remove the actions of masking and unmasking physical interrupts
before/after vCPU is run.
Arm recommends the priority for G1 non-secure interrupts to be in the
range 0x80 to 0xff when programming from secure world. Currently, the
SRI priority is incorrect. This patch also fixes the priority value.
Change-Id: Icdc36f3aa09fab83cb58214e14e5a9bd174bc28b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/api.c b/src/api.c
index db7c538..79278ce 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3176,15 +3176,10 @@
if (api_ffa_is_managed_exit_ongoing(current_locked)) {
struct interrupts *interrupts = ¤t->interrupts;
- /*
- * Per FF-A v1.1 EAC0 section 8.3.1.2.1 rule 6, SPMC can signal
- * a secure interrupt to a SP that is performing managed exit.
- * We have taken a implementation defined choice to not allow
- * Managed exit while a SP is processing a secure interrupt.
- */
CHECK(current->scheduling_mode != SPMC_MODE);
- plat_interrupts_set_priority_mask(current->priority_mask);
+ plat_interrupts_set_priority_mask(
+ current->prev_interrupt_priority);
/*
* A SP may be signaled a managed exit but actually not trap
* the virtual interrupt, probably because it has virtual