[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [GIT PULL] pv/pciback-2.6.32 -> xen/next && pv/pciback-2.6.31 -> xen/stable-2.6.31.x



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.