Skip to contentSkip to conversation

KVM: PPC: Book3S HV: add a EISN attribute to kvmppc_xive_irq_state

RFC PATCH New Cédric Le Goater 1 participant 1 message Apr 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 10/16 KVM: PPC: Book3S HV: add a EISN attribute to kvmppc_xive_irq_state

The Effective IRQ Source Number is the number pushed in the event queue that the guest OS will dispatch internally.

---
 arch/powerpc/kvm/book3s_xive.c | 1 +
 arch/powerpc/kvm/book3s_xive.h | 3 +++
 2 files changed, 4 insertions(+)
arch/powerpc/kvm/book3s_xive.c +1 -0
index 10e2ceae7b04..abb4ae5c5b91 100644
@@ -1447,6 +1447,7 @@ struct kvmppc_xive_src_block *kvmppc_xive_create_src_block(
 
 	for (i = 0; i < KVMPPC_XICS_IRQ_PER_ICS; i++) {
 		sb->irq_state[i].number = (bid << KVMPPC_XICS_ICS_SHIFT) | i;
+		sb->irq_state[i].eisn = 0;
 		sb->irq_state[i].guest_priority = MASKED;
 		sb->irq_state[i].saved_priority = MASKED;
 		sb->irq_state[i].act_priority = MASKED;
arch/powerpc/kvm/book3s_xive.h +3 -0
index ae4a670eea63..67e07b41061d 100644
@@ -57,6 +57,9 @@ struct kvmppc_xive_irq_state {
 	bool saved_p;
 	bool saved_q;
 	u8 saved_scan_prio;
+
+	/* Xive native */
+	u32 eisn;			/* Guest Effective IRQ number */
 };
 
 /* Select the "right" interrupt (IPI vs. passthrough) */
Signature · 1 line
2.13.6