All of lore.kernel.org
 help / color / mirror / Atom feed
* Legacy PCI interrupt {de}assertion count
@ 2017-03-24 16:54 Roger Pau Monné
  2017-03-27  8:00 ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: Roger Pau Monné @ 2017-03-24 16:54 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Jan Beulich

Hello,

I have a question related to how Xen accounts the legacy PCI interrupt
assertions when binding interrupts to HVM guests. It's probably just me not
properly understand this code (or missing bits of it).

As I understand it, for level triggered legacy PCI interrupts Xen sets up a
timer in order to perform the EOI if the guest takes too long in deasserting
the line. This is done in pt_irq_time_out. What I don't understand is why this
function also does a deassertion of the guest view of the PCI interrupt, ie:
why it calls hvm_pci_intx_deassert. This AFAICT will clear the pending assert
in the guest, and thus the guest will end up loosing one interrupt.  IMHO it
should be:

diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index 080183ea31..e0b19ee8c9 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -182,7 +182,6 @@ static void pt_irq_time_out(void *data)
 
             pirq_dpci(pirq)->flags |= HVM_IRQ_DPCI_EOI_LATCH;
         }
-        hvm_pci_intx_deassert(irq_map->dom, digl->device, digl->intx);
     }
 
     pt_pirq_iterate(irq_map->dom, pt_irq_guest_eoi, NULL);

Again, it might well just be that I'm missing something obvious, so I would
appreciate some clarification here.

Thanks, Roger.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-04-04 19:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 16:54 Legacy PCI interrupt {de}assertion count Roger Pau Monné
2017-03-27  8:00 ` Jan Beulich
2017-03-31  5:05   ` Tian, Kevin
2017-03-31  8:07     ` Roger Pau Monné
2017-03-31 10:46       ` Jan Beulich
2017-03-31 14:38         ` Konrad Rzeszutek Wilk
2017-04-03 12:22           ` Sander Eikelenboom
2017-04-04 16:07             ` Konrad Rzeszutek Wilk
2017-04-04 19:13               ` Sander Eikelenboom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.