feat(interrupts): precedence in NS interrupt action

An SP execution context in a call chain could specify a less
permissive action than subsequent SP execution contexts in the same
call chain. The less permissive action takes precedence over the more
permissive actions specified by the subsequent execution contexts.

Permissive order:
NS_ACTION_QUEUED < NS_ACTION_ME < NS_ACTION_SIGNALED

Consequently, NS interrupts are masked prior to resuming a vCPU if
the effective action for NS interrupts is set to QUEUED.

Moreover, this patch also performs saving and restoring of the priority
mask as required during winding and unwinding of a call chain.

Change-Id: Ia5b6ba1ff61db245964175eb3680c05065eefee4
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index da604cc..2fd7829 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -1017,6 +1017,8 @@
 	struct vcpu *current_vcpu = current();
 	int64_t ret;
 
+	assert(current_vcpu->vm->ns_interrupts_action != NS_ACTION_QUEUED);
+
 	if (plat_ffa_vm_managed_exit_supported(current_vcpu->vm)) {
 		uint8_t pmr = plat_interrupts_get_priority_mask();