>From 381eebe51657a3b3101dc80880fa3350dcfb1e23 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 19 Nov 2020 10:45:00 +0100 Subject: [PATCH] --- xen/arch/x86/hvm/vioapic.c | 9 +++++++++ xen/arch/x86/irq.c | 3 +++ xen/drivers/passthrough/io.c | 3 +++ xen/include/asm-x86/irq.h | 2 ++ 4 files changed, 17 insertions(+) diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 67d4a6237f..1702434f0d 100644 --- a/xen/arch/x86/hvm/vioapic.c +++ b/xen/arch/x86/hvm/vioapic.c @@ -235,6 +235,10 @@ static void vioapic_write_redirent( pent = &vioapic->redirtbl[idx]; ent = *pent; + if ( gsi == TRACK_IRQ ) + printk("vioapic write %s word %d val %#x current %#lx\n", + top_word ? "top" : "low", val, ent.bits); + if ( top_word ) { /* Contains only the dest_id. */ @@ -410,6 +414,9 @@ static void vioapic_deliver(struct hvm_vioapic *vioapic, unsigned int pin) "vector=%x trig_mode=%x", dest, dest_mode, delivery_mode, vector, trig_mode); + if ( irq == TRACK_IRQ ) + printk("vioapic inject vector %#x\n", vector); + switch ( delivery_mode ) { case dest_LowestPrio: @@ -517,6 +524,8 @@ void vioapic_update_EOI(struct domain *d, u8 vector) continue; ent->fields.remote_irr = 0; + if ( vioapic->base_gsi + pin == TRACK_IRQ ) + printk("vioapic EOI\n"); if ( is_iommu_enabled(d) ) { diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 8d1f9a9fc6..34f50a24ea 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1837,6 +1837,9 @@ static void do_IRQ_guest(struct irq_desc *desc, unsigned int vector) unsigned int i; struct pending_eoi *peoi = this_cpu(pending_eoi); + if ( desc->irq == TRACK_IRQ ) + printk("do_IRQ_guest\n"); + if ( unlikely(!action->nr_guests) ) { /* An interrupt may slip through while freeing an ACKTYPE_EOI irq. */ diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index 6b1305a3e5..ddbda10593 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -997,6 +997,9 @@ static void hvm_gsi_eoi(struct domain *d, unsigned int gsi, if ( !pirq_dpci(pirq) ) return; + if ( gsi == TRACK_IRQ ) + printk("dpci EOI\n"); + hvm_gsi_deassert(d, gsi); hvm_pirq_eoi(pirq, ent); } diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h index 7c825e9d9c..bb450e5e59 100644 --- a/xen/include/asm-x86/irq.h +++ b/xen/include/asm-x86/irq.h @@ -218,4 +218,6 @@ int allocate_and_map_gsi_pirq(struct domain *d, int index, int *pirq_p); int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p, int type, struct msi_info *msi); +#define TRACK_IRQ 34 + #endif /* _ASM_HW_IRQ_H */ -- 2.29.2