From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>, xen-devel@lists.xensource.com
Subject: [GIT PULL] pv/pciback-2.6.32 -> xen/next && pv/pciback-2.6.31 -> xen/stable-2.6.31.x
Date: Mon, 19 Apr 2010 17:25:45 -0400 [thread overview]
Message-ID: <20100419212545.GA398@phenom.dumpdata.com> (raw)
Hey Jeremy,
Please pull git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
pv/pciback-2.6.32 in xen/next.
(Note: There is a corresponding tree for the xen/stable-2.6.31.x which is
pv/pciback-2.6.31.)
It contains the following six patches:
xen-pciback: Add SysFS instrumentation for the fake IRQ handler.
xen-pciback: When device transitions to MSI/MSI-X stop ACK-ing on the legacy interrupt.
xen-pciback: Enable interrupt handler when device is enabled.
xen-pciback: Enable the IRQ handler framework for shared devices.
xen: Add support to check if IRQ line is shared with other domains.
xen-pciback: Probe the IRQ line to check if it is not shared.
that fix the 'disabling irq(xx)' in Dom0 problem. If you would like me
to post them on xen-devel for review I would be more than happy to do
so.
The pciback sets up a interrupt handler in Dom0 whenever a passed in
device has been enabled by the guest (and tears it down when it is disabled).
The interrupt handler is selective and returns IRQ_HANDLED if the
device's interrupt line (IRQ) is shared with another domain (*1).
If the device swivels to an MSI/MSI-X vector(s) the interrupt
handler is still allocated, but now it will return IRQ_NONE. And
vice-versa: if the device goes back from MSI back to legacy the
interrupt handler will return IRQ_HANDLED.
There are also some eye-candy so the device that has been passed through
to the guest will show up in Dom0 as:
17: 331883 0 xen-pirq-ioapic-level lpfc, eth0, pciback[0000:05:05.0]
so one can easily figure out what device on that IRQ line is shared.
There are also some knobs if to turn the interrupt ack-ing on/off via:
/sys/bus/pci/drivers/pciback/irq_handler_state and getting the status of
them:
-sh-3.1# cat /sys/bus/pci/drivers/pciback/irq_handlers
0000:01:00.1:off:not acking:0
0000:05:05.0:on:acking:294287
0000:00:1d.7:off:not acking:0
0000:00:1d.3:off:not acking:0
0000:00:1d.0:off:not acking:0
Lastly, if the user does not want to use this infrastructure,
the 'fake_irq_handler' module parameter variable in pciback can be set to zero.
The code has been tested on devices which use legacy interrupts and MSI.
I hadn't tested it with MSI-X yet.
*1: The interrupt will acknowledge the first 1000 interrupts irregardless
if the device is shared or not. This value can be trimed in the future
to a lower value.
reply other threads:[~2010-04-19 21:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100419212545.GA398@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jeremy@goop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).