Skip to content

Commit

Permalink
vDPA: dont change vq irq after DRIVER_OK
Browse files Browse the repository at this point in the history
IRQ of a vq is not expected to be changed in a DRIVER_OK ~ !DRIVER_OK
period for irq offloading purposes. Place this comment at the side of
bus ops get_vq_irq than in set_status in vhost_vdpa.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Link: https://lore.kernel.org/r/20200804102123.69978-1-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Zhu Lingshan authored and Michael S. Tsirkin committed Aug 5, 2020
1 parent 46af9ad commit 4c05433
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion drivers/vhost/vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp)

ops->set_status(vdpa, status);

/* vq irq is not expected to be changed once DRIVER_OK is set */
if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && !(status_old & VIRTIO_CONFIG_S_DRIVER_OK))
for (i = 0; i < nvqs; i++)
vhost_vdpa_setup_vq_irq(v, i);
Expand Down
1 change: 1 addition & 0 deletions include/linux/vdpa.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ struct vdpa_config_ops {
u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);
struct vdpa_notification_area
(*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
/* vq irq is not expected to be changed once DRIVER_OK is set */
int (*get_vq_irq)(struct vdpa_device *vdv, u16 idx);

/* Device ops */
Expand Down

0 comments on commit 4c05433

Please sign in to comment.