Restructure dmar_qi_task() so as to reduce the number of invalidation completion interrupts. Specifically, because processing completed invalidations in dmar_qi_task() can take some time, don't reenable completion interrupts until we have finished processing the completed invalidations a first time. Then, check a second time after reenabling completion interrupts, so that invalidations that completed just before interrupts were reenabled do not linger until a future invalidation raises an interrupt. Testing for completed invalidations is now cheap; no locking is required.
netperf -H lip3 -t TCP_MAERTS -i 20
irq25: dmar0:qi 35094545 144718
irq25: dmar0:qi 28855066 92485