feat(interrupt): clear pending ME interrupts during msg_wait
Managed Exit is no longer required if the SP has returned to the
waiting state. So if there is a managed exit interrupt pending when
we are servicing a message wait or direct response request clear it.
vcpu_increment_clear_decrement is made static to ensure the bitmap,
queue and count are kept in sync.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: Ibd1d41360c09054f8634a203ab09c09ea407415a
diff --git a/src/api.c b/src/api.c
index 7861a2f..7f318ba 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3118,8 +3118,6 @@
}
if (api_ffa_is_managed_exit_ongoing(current_locked)) {
- struct interrupts *interrupts = ¤t->interrupts;
-
CHECK(current->scheduling_mode != SPMC_MODE);
plat_interrupts_set_priority_mask(
@@ -3134,11 +3132,8 @@
*/
current->processing_managed_exit = false;
- if (vcpu_is_virt_interrupt_pending(interrupts,
- HF_MANAGED_EXIT_INTID)) {
- vcpu_interrupt_clear_decrement(current_locked,
- HF_MANAGED_EXIT_INTID);
- }
+ vcpu_virt_interrupt_clear(current_locked,
+ HF_MANAGED_EXIT_INTID);
}
/* Clear direct request origin vm_id and request type for the caller. */