* [PATCH] virtio-pmem: reset device before delete vqs on device removal
@ 2024-09-20 9:06 Eryu Guan
2024-10-29 3:02 ` Eryu Guan
2024-10-29 14:39 ` Pankaj Gupta
0 siblings, 2 replies; 3+ messages in thread
From: Eryu Guan @ 2024-09-20 9:06 UTC (permalink / raw)
To: virtualization; +Cc: Pankaj Gupta, Eryu Guan
We should not update virtqueue status while device is in DRIVER_OK
status, so reset device first then delete vqs.
Fixes: 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver")
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
---
drivers/nvdimm/virtio_pmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c
index c9b97aeabf85..55ffb0e6976b 100644
--- a/drivers/nvdimm/virtio_pmem.c
+++ b/drivers/nvdimm/virtio_pmem.c
@@ -139,8 +139,8 @@ static void virtio_pmem_remove(struct virtio_device *vdev)
struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
nvdimm_bus_unregister(nvdimm_bus);
- vdev->config->del_vqs(vdev);
virtio_reset_device(vdev);
+ vdev->config->del_vqs(vdev);
}
static unsigned int features[] = {
--
2.26.1.107.gefe3874
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio-pmem: reset device before delete vqs on device removal
2024-09-20 9:06 [PATCH] virtio-pmem: reset device before delete vqs on device removal Eryu Guan
@ 2024-10-29 3:02 ` Eryu Guan
2024-10-29 14:39 ` Pankaj Gupta
1 sibling, 0 replies; 3+ messages in thread
From: Eryu Guan @ 2024-10-29 3:02 UTC (permalink / raw)
To: virtualization; +Cc: Pankaj Gupta
On Fri, Sep 20, 2024 at 05:06:49PM +0800, Eryu Guan wrote:
> We should not update virtqueue status while device is in DRIVER_OK
> status, so reset device first then delete vqs.
>
> Fixes: 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver")
> Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Hi, any comments on this patch? It also followed what other virtio
devices do.
Thanks,
Eryu
> ---
> drivers/nvdimm/virtio_pmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c
> index c9b97aeabf85..55ffb0e6976b 100644
> --- a/drivers/nvdimm/virtio_pmem.c
> +++ b/drivers/nvdimm/virtio_pmem.c
> @@ -139,8 +139,8 @@ static void virtio_pmem_remove(struct virtio_device *vdev)
> struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
>
> nvdimm_bus_unregister(nvdimm_bus);
> - vdev->config->del_vqs(vdev);
> virtio_reset_device(vdev);
> + vdev->config->del_vqs(vdev);
> }
>
> static unsigned int features[] = {
> --
> 2.26.1.107.gefe3874
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio-pmem: reset device before delete vqs on device removal
2024-09-20 9:06 [PATCH] virtio-pmem: reset device before delete vqs on device removal Eryu Guan
2024-10-29 3:02 ` Eryu Guan
@ 2024-10-29 14:39 ` Pankaj Gupta
1 sibling, 0 replies; 3+ messages in thread
From: Pankaj Gupta @ 2024-10-29 14:39 UTC (permalink / raw)
To: Eryu Guan; +Cc: virtualization, Michael S . Tsirkin
+CC MST
> We should not update virtqueue status while device is in DRIVER_OK
> status, so reset device first then delete vqs.
>
> Fixes: 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver")
> Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
Looks good to me.
Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com
> ---
> drivers/nvdimm/virtio_pmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvdimm/virtio_pmem.c b/drivers/nvdimm/virtio_pmem.c
> index c9b97aeabf85..55ffb0e6976b 100644
> --- a/drivers/nvdimm/virtio_pmem.c
> +++ b/drivers/nvdimm/virtio_pmem.c
> @@ -139,8 +139,8 @@ static void virtio_pmem_remove(struct virtio_device *vdev)
> struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev);
>
> nvdimm_bus_unregister(nvdimm_bus);
> - vdev->config->del_vqs(vdev);
> virtio_reset_device(vdev);
> + vdev->config->del_vqs(vdev);
> }
>
> static unsigned int features[] = {
> --
> 2.26.1.107.gefe3874
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-29 14:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 9:06 [PATCH] virtio-pmem: reset device before delete vqs on device removal Eryu Guan
2024-10-29 3:02 ` Eryu Guan
2024-10-29 14:39 ` Pankaj Gupta
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).