virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio_pci: Clear stale cpumask when setting irq affinity
Date: Thu, 4 Jun 2015 14:55:28 +0200	[thread overview]
Message-ID: <20150604145513-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1433407304-22981-1-git-send-email-jiang.liu@linux.intel.com>

On Thu, Jun 04, 2015 at 04:41:44PM +0800, Jiang Liu wrote:
> 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: Jiang Liu <jiang.liu@linux.intel.com>

I have queued this up.
Thanks!

> ---
>  drivers/virtio/virtio_pci_common.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index e894eb278d83..eba1b7ac7294 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -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_clear(mask);
>  			cpumask_set_cpu(cpu, mask);
>  			irq_set_affinity_hint(irq, mask);
>  		}
> -- 
> 1.7.10.4

      reply	other threads:[~2015-06-04 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04  8:41 [PATCH] virtio_pci: Clear stale cpumask when setting irq affinity Jiang Liu
2015-06-04 12:55 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150604145513-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).