feat(ipi): introduce IPI paravirtualised interface
Interprocessor Interrupts (IPIs) allow an SP to send an interrupt to
itself on another CPU. This patch starts the implementation of this
feature and enables it for the case where the SP is in the RUNNING
state on the target_vcpu.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: Idd0e1a5863730ae0f169bd0f56ac3abcd2916870
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 64df9f4..5bcb30c 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -395,6 +395,15 @@
return vm->id == HF_PRIMARY_VM_ID;
}
+/**
+ * Convert a CPU ID for a secondary VM to the corresponding vCPU index.
+ */
+static inline ffa_vcpu_index_t vcpu_id_to_index(cpu_id_t vcpu_id)
+{
+ /* For now we use indices as IDs. */
+ return vcpu_id;
+}
+
struct interrupt_descriptor *vm_interrupt_set_target_mpidr(
struct vm_locked vm_locked, uint32_t id, uint32_t target_mpidr);
struct interrupt_descriptor *vm_interrupt_set_sec_state(