Commit 210d150e authored by Jiang Liu's avatar Jiang Liu Committed by Michael S. Tsirkin

virtio_pci: Clear stale cpumask when setting irq affinity

The cpumask vp_dev->msix_affinity_masks[info->msix_vector] may contain
staled information when vp_set_vq_affinity() gets called, so clear it
before setting the new cpu bit mask.

Signed-off-by: default avatarJiang Liu <>
Signed-off-by: Michael S. Tsirkin's avatarMichael S. Tsirkin <>
parent 8a7b19d8
......@@ -423,6 +423,7 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
if (cpu == -1)
irq_set_affinity_hint(irq, NULL);
else {
cpumask_set_cpu(cpu, mask);
irq_set_affinity_hint(irq, mask);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment