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

RE: [Xen-devel] [PATCH][RFC] pv-ops: fix shared irq device passthrough



Jeremy Fitzhardinge wrote:
> On 11/10/09 08:30, Konrad Rzeszutek Wilk wrote:
>> With this patch you can share the PCI devices on the same IRQ,
>> correct? Will this mean that you can assign to a guest a USB
>> controller, while 
>> Dom0 has controller of the PCI NIC (and assuming that both of those
>> share the same interrupt line)? If so, won't the Dom0 start throwing
>> a fit b/c there are unhandled IRQs and eventually disable the IRQ
>> line? 
>> 
>> 
>> Or even the guest decide that there are too many IRQs and decided to
>> disable the IRQ line? 
>> 

Konrad,

You listed and analysed code path of handle_level_irq in another mail, but you 
miss following lines in note_interrupt:

        if (time_after(jiffies, desc->last_unhandled + HZ/10))
                desc->irqs_unhandled = 1; 
        else
                desc->irqs_unhandled++;

I found time_after will return true when assigned the shared irq device to hvm, 
then it doesn't complain too many unhandled IRQs. So it's no problem when 
passthrough shared IRQ NIC and USB controller, but i'm not sure it can cover 
all cases.

Actually, it's supported in Xen with 2.6.18 dom0 for a long time. We doesn't 
see problem. 

Regards,
Weidong

> 
> It would be easy to add a dummy handler which always returns
> IRQ_HANDLED for every cross-domain shared interrupt to prevent this. 
> Of course that would paper over any real spurious/screaming interrupt
> problem, but we could add some extra logic into the dummy handler if
> necessary. 
> 
> I merged the patch, and had to add the new parameter to
> xen_allocate_pirq() in arch/x86/pci/xen.c.  I just made it 0 which
> should have no functional difference from before, but I'll leave it to
> you to decide what it really should be.
> 
>     J


_______________________________________________
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®.