feat(arch timer): migrate vCPU with pending timer to another CPU

This patch adds necessary support to migrate the vCPU from old CPU
to a new CPU whenever the vCPU has a pending timer. During this
migration, SPMC removes the vCPU timer entry from list maintained on
the old host and adds it to the list on the new host.

Change-Id: Ic1448ca8d1b83f7ede0479db9769f51a85b821a3
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/api.c b/src/api.c
index f84ddac..2e4d492 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1371,6 +1371,7 @@
 
 	plat_ffa_init_schedule_mode_ffa_run(current_locked, vcpu_next_locked);
 
+	timer_migrate_to_other_cpu(current_locked.vcpu->cpu, vcpu_next_locked);
 	vcpu->cpu = current_locked.vcpu->cpu;
 
 	vcpu_set_running(vcpu_next_locked, ffa_run_ret);
@@ -2958,6 +2959,7 @@
 
 	/* Inject timer interrupt if timer has expired. */
 	api_inject_arch_timer_interrupt(current_locked, receiver_vcpu_locked);
+	timer_migrate_to_other_cpu(current->cpu, receiver_vcpu_locked);
 
 	/* The receiver vCPU runs upon direct message invocation */
 	receiver_vcpu->cpu = current->cpu;