• Konrad Rzeszutek Wilk's avatar
    xen: fix shared irq device passthrough · 15ebbb82
    Konrad Rzeszutek Wilk authored
    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: default avatarWeidong Han <weidong.han@intel.com>
    Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    15ebbb82
events.c 29.3 KB