test(interrupts): interrupt handler for secure partitions

This patch introduces two helper functions to hftest framework
that help to track the last serviced virtual interrupt ID.

Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I28a49c0bfb3370c73393e1d4113bce1e2b6f4a9f
diff --git a/test/vmapi/common/exception_handler.c b/test/vmapi/common/exception_handler.c
index 0df0df9..8a63355 100644
--- a/test/vmapi/common/exception_handler.c
+++ b/test/vmapi/common/exception_handler.c
@@ -20,6 +20,11 @@
 static int exception_handler_exception_count = 0;
 
 /**
+ * Tracks the virtual interrupt that was last handled by SP.
+ */
+static uint32_t last_serviced_interrupt = 0;
+
+/**
  * Sends the number of exceptions handled to the Primary VM.
  */
 void exception_handler_send_exception_count(void)
@@ -185,3 +190,19 @@
 {
 	exception_handler_exception_count = 0;
 }
+
+/**
+ * Updates the last serviced virtual interrupt ID.
+ */
+void exception_handler_set_last_interrupt(uint32_t id)
+{
+	last_serviced_interrupt = id;
+}
+
+/**
+ * Returns the last serviced virtual interrupt ID.
+ */
+uint32_t exception_handler_get_last_interrupt(void)
+{
+	return last_serviced_interrupt;
+}