Commit b0c07fd9 authored by Jiang Liu's avatar Jiang Liu Committed by Kamal Mostafa

virtio_pci: Clear stale cpumask when setting irq affinity

commit 210d150e upstream.

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 <jiang.liu@linux.intel.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
[ luis: backported to 3.16:
  - file rename: virtio_pci_common.c -> virtio_pci.c ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent c4dd7c68
......@@ -647,6 +647,7 @@ static int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
if (cpu == -1)
irq_set_affinity_hint(irq, NULL);
else {
cpumask_clear(mask);
cpumask_set_cpu(cpu, mask);
irq_set_affinity_hint(irq, mask);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment