public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>
Cc: Cindy Lu <lulu@redhat.com>, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] vp_vdpa: synchronize irq when free irq
Date: Fri, 30 Jun 2023 04:34:05 -0400	[thread overview]
Message-ID: <20230630043342-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230630103656.345870-1-lingshan.zhu@intel.com>

On Fri, Jun 30, 2023 at 06:36:56PM +0800, Zhu Lingshan wrote:
> This commits synchronizes irqs when free them
> 
> Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
> Tested-by: Cindy Lu <lulu@redhat.com>
> ---
>  drivers/vdpa/virtio_pci/vp_vdpa.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vdpa/virtio_pci/vp_vdpa.c b/drivers/vdpa/virtio_pci/vp_vdpa.c
> index 281287fae89f..d8ee3e68cd2d 100644
> --- a/drivers/vdpa/virtio_pci/vp_vdpa.c
> +++ b/drivers/vdpa/virtio_pci/vp_vdpa.c
> @@ -116,6 +116,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
>  	for (i = 0; i < vp_vdpa->queues; i++) {
>  		if (vp_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) {
>  			vp_modern_queue_vector(mdev, i, VIRTIO_MSI_NO_VECTOR);
> +			synchronize_irq(vp_vdpa->vring[i].irq);
>  			devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq,
>  				      &vp_vdpa->vring[i]);
>  			vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR;
> @@ -124,6 +125,7 @@ static void vp_vdpa_free_irq(struct vp_vdpa *vp_vdpa)
>  
>  	if (vp_vdpa->config_irq != VIRTIO_MSI_NO_VECTOR) {
>  		vp_modern_config_vector(mdev, VIRTIO_MSI_NO_VECTOR);
> +		synchronize_irq(vp_vdpa->config_irq);
>  		devm_free_irq(&pdev->dev, vp_vdpa->config_irq, vp_vdpa);
>  		vp_vdpa->config_irq = VIRTIO_MSI_NO_VECTOR;


Weird, doesn't free_irq synchronize automatically?

>  	}
> -- 
> 2.39.3

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2023-06-30  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 10:36 [PATCH] vp_vdpa: synchronize irq when free irq Zhu Lingshan
2023-06-30  8:02 ` Jason Wang
2023-06-30  9:05   ` Zhu, Lingshan
2023-06-30  8:34 ` Michael S. Tsirkin [this message]
2023-06-30  9:04   ` Zhu, Lingshan

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=20230630043342-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=lulu@redhat.com \
    --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