All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: dongsheng li <lidongsheng@dayudpu.com>
Cc: wangwei@dayudpu.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2] virtio_vdpa: Support surprise removal of virtio vdpa device
Date: Tue, 11 Jan 2022 07:12:41 -0500	[thread overview]
Message-ID: <20220111071135-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220111065527.1160-1-lidongsheng@dayudpu.com>

On Tue, Jan 11, 2022 at 02:55:27PM +0800, dongsheng li wrote:
> When virtio vdpa device removed, the abnormal damage of the device cannot be
> perceived normally, which will cause problems similar to:
> 
> Commit 43bb40c5b926 ("virtio_pci: Support surprise removal of
> virtio pci device")
> Hence, add the ability to abort the command on surprise removal
> 
> Signed-off-by: dongsheng li <lidongsheng@dayudpu.com>

If you don't mkae changes you can carry forward acks.

> ---
>  drivers/virtio/virtio_vdpa.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
> index f85f860bc10b..a5cebad09320 100644
> --- a/drivers/virtio/virtio_vdpa.c
> +++ b/drivers/virtio/virtio_vdpa.c
> @@ -396,6 +396,7 @@ static void virtio_vdpa_remove(struct vdpa_device *vdpa)
>  {
>  	struct virtio_vdpa_device *vd_dev = vdpa_get_drvdata(vdpa);
>  
> +	virtio_break_device(&vd_dev->vdev);

My comment on graceful removal stands. E.g. a storage device
will want to flush out writes if possible not drop them.

>  	unregister_virtio_device(&vd_dev->vdev);
>  }
>  
> -- 
> 2.17.1

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

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: dongsheng li <lidongsheng@dayudpu.com>
Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, wangwei@dayudpu.com
Subject: Re: [PATCH v2] virtio_vdpa: Support surprise removal of virtio vdpa device
Date: Tue, 11 Jan 2022 07:12:41 -0500	[thread overview]
Message-ID: <20220111071135-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220111065527.1160-1-lidongsheng@dayudpu.com>

On Tue, Jan 11, 2022 at 02:55:27PM +0800, dongsheng li wrote:
> When virtio vdpa device removed, the abnormal damage of the device cannot be
> perceived normally, which will cause problems similar to:
> 
> Commit 43bb40c5b926 ("virtio_pci: Support surprise removal of
> virtio pci device")
> Hence, add the ability to abort the command on surprise removal
> 
> Signed-off-by: dongsheng li <lidongsheng@dayudpu.com>

If you don't mkae changes you can carry forward acks.

> ---
>  drivers/virtio/virtio_vdpa.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
> index f85f860bc10b..a5cebad09320 100644
> --- a/drivers/virtio/virtio_vdpa.c
> +++ b/drivers/virtio/virtio_vdpa.c
> @@ -396,6 +396,7 @@ static void virtio_vdpa_remove(struct vdpa_device *vdpa)
>  {
>  	struct virtio_vdpa_device *vd_dev = vdpa_get_drvdata(vdpa);
>  
> +	virtio_break_device(&vd_dev->vdev);

My comment on graceful removal stands. E.g. a storage device
will want to flush out writes if possible not drop them.

>  	unregister_virtio_device(&vd_dev->vdev);
>  }
>  
> -- 
> 2.17.1


  reply	other threads:[~2022-01-11 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  6:55 [PATCH v2] virtio_vdpa: Support surprise removal of virtio vdpa device dongsheng li
2022-01-11 12:12 ` Michael S. Tsirkin [this message]
2022-01-11 12:12   ` Michael S. Tsirkin

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=20220111071135-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=lidongsheng@dayudpu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wangwei@dayudpu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.