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 (address and
data can't be updated atomically and may - at least for MSI-X - be
cached while unmasked).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2015-03-26 11:18:28 +01:00
1 parent 73aa7fc292
commit 1aeb1156fa
1 file changed
+3 -2
+3 -2
View File
@@ -1608,12 +1608,13 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
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 )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.