x86: don't change affinity with interrupt unmasked With ->startup unmasking the IRQ, setting the affinity afterwards without masking the IRQ again is invalid namely for MSI (which can't have their affinity updated atomically). Signed-off-by: Jan Beulich --- Changing the affinity of non-maskable MSI IRQs seems bogus too, but I can't immediately see what we can do about this (better than disabling affinity changes for them). --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1608,12 +1608,13 @@ int pirq_guest_bind(struct vcpu *v, stru init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0); desc->status |= IRQ_GUEST; - desc->status &= ~IRQ_DISABLED; - desc->handler->startup(desc); /* Attempt to bind the interrupt target to the correct CPU. */ if ( !opt_noirqbalance && (desc->handler->set_affinity != NULL) ) desc->handler->set_affinity(desc, cpumask_of(v->processor)); + + desc->status &= ~IRQ_DISABLED; + desc->handler->startup(desc); } else if ( !will_share || !action->shareable ) {