]> git.karo-electronics.de Git - mv-sheeva.git/commit
xen: fix shared irq device passthrough
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 4 Oct 2010 17:43:27 +0000 (13:43 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 18 Oct 2010 14:49:29 +0000 (10:49 -0400)
commit15ebbb82bac700db3c91e662fb70cb3559e9d930
tree9bb317f4dc9081eaef8d8170c7d55180eab4e5c1
parentd9a8814f27080cec6126fca3ef0c210d9f56181e
xen: fix shared irq device passthrough

In driver/xen/events.c, whether bind_pirq is shareable or not is
determined by desc->action is NULL or not. But in __setup_irq,
startup(irq) is invoked before desc->action is assigned with
new action. So desc->action in startup_irq is always NULL, and
bind_pirq is always not shareable. This results in pt_irq_create_bind
failure when passthrough a device which shares irq to other devices.

This patch doesn't use probing_irq to determine if pirq is shareable
or not, instead set shareable flag in irq_info according to trigger
mode in xen_allocate_pirq. Set level triggered interrupts shareable.
Thus use this flag to set bind_pirq flag accordingly.

[v2: arch/x86/xen/pci.c no more, so file skipped]

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c
include/xen/events.h