fix(ipi): small fixes to the ipi implementation

- Fix the return type for the api_hf_interrupt_send_ipi function. In
the case the target vcpu id is not valid it returns -1 so the type
must be signed.
- Fix the cast in the hf_call in hf_interrupt_send_ipi, the arguments
for this function are uint64_t so cast to this.
- Move hf_ipi_init_interrupt to arch_cpu_init as this is a more
appropriate place for it.
- Lock the cpu when setting and getting the target vCPU with
pending IPI.
- Set the IPI and SRI interrupts to enabled during initialization.

Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I81ca43f767a7bfeb803f65b40f8be403daecfa80
diff --git a/src/api.c b/src/api.c
index 2e4d492..957cabe 100644
--- a/src/api.c
+++ b/src/api.c
@@ -4921,13 +4921,12 @@
  * Send an IPI interrupt to a target vcpu belonging to the
  * sender that isn't itself.
  */
-uint64_t api_hf_interrupt_send_ipi(uint32_t target_vcpu_id,
-				   struct vcpu *current)
+int64_t api_hf_interrupt_send_ipi(uint32_t target_vcpu_id, struct vcpu *current)
 {
 	struct vm *vm = current->vm;
 	ffa_vcpu_index_t target_vcpu_index = vcpu_id_to_index(target_vcpu_id);
 
-	if (target_vcpu_index >= vm->vcpu_count &&
+	if (target_vcpu_index >= vm->vcpu_count ||
 	    target_vcpu_index == cpu_index(current->cpu)) {
 		dlog_verbose("Invalid vCPU %d for IPI.\n", target_vcpu_id);
 		return -1;