WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [GIT PULL] pv/pciback-2.6.32 -> xen/next && pv/pciback-2.6.3

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [GIT PULL] pv/pciback-2.6.32 -> xen/next && pv/pciback-2.6.31 -> xen/stable-2.6.31.x
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 19 Apr 2010 17:25:45 -0400
Cc:
Delivery-date: Mon, 19 Apr 2010 14:27:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [GIT PULL] pv/pciback-2.6.32 -> xen/next && pv/pciback-2.6.31 -> xen/stable-2.6.31.x, Konrad Rzeszutek Wilk <=