feat(interrupts): allow interrupt to be enabled or disabled in runtime

This patch extends the paravirtualized interface introduced in earlier
patches to either enable or disable a secure physical interrupt.

Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I86250d8e4788feae4d2b9898567c640aa54b710f
diff --git a/inc/hf/interrupt_desc.h b/inc/hf/interrupt_desc.h
index 815816e..b97bfb0 100644
--- a/inc/hf/interrupt_desc.h
+++ b/inc/hf/interrupt_desc.h
@@ -58,6 +58,14 @@
 #define INT_SEC_STATE_S 1
 
 /**
+ * Legal values to enable or disable an interrupt through the
+ * `INT_RECONFIGURE_ENABLE` command using the `HF_INTERRUPT_RECONFIGURE`
+ * paravirtualized interface.
+ */
+#define INT_DISABLE 0
+#define INT_ENABLE 1
+
+/**
  * Attributes encoding in the manifest:
 
  * Field		Bit(s)
@@ -111,6 +119,7 @@
 	bool valid;
 	bool mpidr_valid;
 	uint64_t mpidr;
+	bool enabled;
 };
 
 /**
@@ -213,3 +222,9 @@
 {
 	int_desc->valid = valid;
 }
+
+static inline void interrupt_desc_set_enabled(
+	struct interrupt_descriptor *int_desc, bool enable)
+{
+	int_desc->enabled = enable;
+}
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 3f06d38..9b7f40e 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -399,3 +399,5 @@
 	struct vm_locked vm_locked, uint32_t id, uint32_t target_mpidr);
 struct interrupt_descriptor *vm_interrupt_set_sec_state(
 	struct vm_locked vm_locked, uint32_t id, uint32_t sec_state);
+struct interrupt_descriptor *vm_interrupt_set_enable(struct vm_locked vm_locked,
+						     uint32_t id, bool enable);