All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com, Mark Hurenkamp <mark.hurenkamp@xs4all.nl>
Subject: Re: radeon in dom0/ivtv in domU: irq 16 nobody cared
Date: Tue, 13 Apr 2010 11:30:37 -0700	[thread overview]
Message-ID: <4BC4B84D.1040505@goop.org> (raw)
In-Reply-To: <20100413131804.GB16475@phenom.dumpdata.com>

On 04/13/2010 06:18 AM, Konrad Rzeszutek Wilk wrote:
> In 2.6.18 there was logic to return IRQ_HANDLED if the IRQ line was
> shared with another guest. Basically this:
>
>
>  914 int irq_ignore_unhandled(unsigned int irq)
>  915 {
>  916         struct physdev_irq_status_query irq_status = { .irq = irq
> };
>  917 
>  918         if (!is_running_on_xen())
>  919                 return 0;
>  920 
>  921         if (HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query,
> &irq_status))
>  922                 return 0;
>  923         return !!(irq_status.flags & XENIRQSTAT_shared);
>  924 }
>
> Which would be called on any spurrios interrupt and it would
> shortcircuit it. I tried something similar by setting up the fake IRQ
> handler if this hypercall returned a positive value. But the call logic
> in any device driver is that it first does the PCI configuration writes
> (enable the device, etc) and then calls request_irq which binds the
> interrupt to the event channel and then this above hypercall returns
> the shared flag. But the pciback/pcifront isn't used for request_irq
> so I need to figure out some mechanism to schedule this hypercall later
> on in Dom0 to figure out if there is a need to insert the IRQ handler.
>   

Does the kernel get to know about the passed-through irqs?  I was
thinking that at pass-through time it would install the handler in dom0
on the irq (and all other domains sharing the irq), and then the handler
could do that hypercall and return IRQ_HANDLED / IRQ_NONE accordingly.

> Anyhow, my test rig that has a couple of IRQ lines shared across (A Dell
> Dimension something) various devices and is doing something wacky with
> or without this patch where the interrupt lines on the IOAPIC get masked
> (and only if a specific IRQ line gets shared - 17) and no interrupts get
> sent to either Dom0 or DomU. Manually unmasking the IOAPIC starts the
> flow of interrupts thought it becomes a storm. Not sure if it is just
> faulty hardware or operator, so please consider the above code/branch completly
> untested.
>   

Hrm.  You could instrument Xen to see who's masking the interrupt.

    J

  reply	other threads:[~2010-04-13 18:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 22:45 radeon in dom0/ivtv in domU: irq 16 nobody cared Mark Hurenkamp
2010-04-08  0:19 ` Konrad Rzeszutek Wilk
2010-04-08 17:37   ` Konrad Rzeszutek Wilk
2010-04-08 18:45     ` Jeremy Fitzhardinge
2010-04-13 13:18       ` Konrad Rzeszutek Wilk
2010-04-13 18:30         ` Jeremy Fitzhardinge [this message]
2010-04-13 19:10           ` Konrad Rzeszutek Wilk
2010-04-13 19:21             ` Jeremy Fitzhardinge
2010-04-08 23:47   ` Mark Hurenkamp
2010-04-09  0:10     ` Mark Hurenkamp
2010-04-13 12:57     ` Konrad Rzeszutek Wilk
2010-04-13 20:05       ` Mark Hurenkamp
2010-04-13 20:43         ` Jeremy Fitzhardinge
2010-04-17  0:38         ` Mark Hurenkamp
2010-04-19 14:08           ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC4B84D.1040505@goop.org \
    --to=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=mark.hurenkamp@xs4all.nl \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.