refactor(interrupts): remove npi_injected from vm struct

The npi_injected field in the vm struct is redundant as the information
it represents can be found elsewhere. So remove it and its
helpers.

Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: Ief6475bc66c5fed79ae30d91bf1c0560309024f0
diff --git a/src/api.c b/src/api.c
index c9fac89..b3953f5 100644
--- a/src/api.c
+++ b/src/api.c
@@ -4458,11 +4458,6 @@
 	ret = api_ffa_notification_get_success_return(
 		sp_notifications, vm_notifications, framework_notifications);
 
-	if (!receiver_locked.vm->el0_partition &&
-	    !vm_are_global_notifications_pending(receiver_locked)) {
-		vm_notifications_set_npi_injected(receiver_locked, false);
-	}
-
 out:
 	vm_unlock(&receiver_locked);
 
diff --git a/src/ffa/spmc/interrupts.c b/src/ffa/spmc/interrupts.c
index 77f586e..434950c 100644
--- a/src/ffa/spmc/interrupts.c
+++ b/src/ffa/spmc/interrupts.c
@@ -474,18 +474,15 @@
 	/*
 	 * Inject the NPI if:
 	 * - The targeted VM ID is from this world (i.e. if it is an SP).
-	 * - The partition has global pending notifications and an NPI hasn't
-	 * been injected yet.
-	 * - There are pending per-vCPU notifications in the next vCPU.
+	 * - The partition has global pending notifications or there are
+	 *   pending per-vCPU notifications in the next vCPU.
 	 */
 	if (vm_id_is_current_world(next_vm->id) &&
 	    (vm_are_per_vcpu_notifications_pending(
 		     receiver_locked, vcpu_index(target_locked.vcpu)) ||
-	     (vm_are_global_notifications_pending(receiver_locked) &&
-	      !vm_notifications_is_npi_injected(receiver_locked)))) {
+	     vm_are_global_notifications_pending(receiver_locked))) {
 		vcpu_virt_interrupt_inject(target_locked,
 					   HF_NOTIFICATION_PENDING_INTID);
-		vm_notifications_set_npi_injected(receiver_locked, true);
 		ret = true;
 	}
 
diff --git a/src/vm.c b/src/vm.c
index 9713960..ae56eac 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1064,17 +1064,6 @@
 	return (vm->messaging_method & msg_method) != 0;
 }
 
-void vm_notifications_set_npi_injected(struct vm_locked vm_locked,
-				       bool npi_injected)
-{
-	vm_locked.vm->notifications.npi_injected = npi_injected;
-}
-
-bool vm_notifications_is_npi_injected(struct vm_locked vm_locked)
-{
-	return vm_locked.vm->notifications.npi_injected;
-}
-
 /**
  * Sets the designated GP register that the VM expects to receive the boot
  * info's address.