Thread (24 messages) 24 messages, 2 authors, 2022-01-11

Re: [PATCH v12 05/13] vdpa: Add reset callback in vdpa_config_ops

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2021-09-06 05:55:02
Also in: kvm, linux-fsdevel, linux-iommu, lkml, virtualization

On Mon, Aug 30, 2021 at 10:17:29PM +0800, Xie Yongji wrote:
This adds a new callback to support device specific reset
behavior. The vdpa bus driver will call the reset function
instead of setting status to zero during resetting.

Signed-off-by: Xie Yongji <redacted>
This does gloss over a significant change though:
quoted hunk ↗ jump to hunk
@@ -348,12 +352,12 @@ static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev)
 	return vdev->dma_dev;
 }
 
-static inline void vdpa_reset(struct vdpa_device *vdev)
+static inline int vdpa_reset(struct vdpa_device *vdev)
 {
 	const struct vdpa_config_ops *ops = vdev->config;
 
 	vdev->features_valid = false;
-	ops->set_status(vdev, 0);
+	return ops->reset(vdev);
 }
 
 static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
Unfortunately this breaks virtio_vdpa:


static void virtio_vdpa_reset(struct virtio_device *vdev)
{
        struct vdpa_device *vdpa = vd_get_vdpa(vdev);

        vdpa_reset(vdpa);
}


and there's no easy way to fix this, kernel can't recover
from a reset failure e.g. during driver unbind.

Find a way to disable virtio_vdpa for now?
-- 
2.11.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help