vdpa: Block vq property changes in DRIVER_OK
authorDragos Tatulea <dtatulea@nvidia.com>
Mon, 25 Dec 2023 13:42:10 +0000 (15:42 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 Jan 2024 18:01:37 +0000 (13:01 -0500)
commita09483c4065fe1e14812f2371cee1cba78a13d60
tree5113b681eefbfe60a6bde1d16842f365398cc849
parentc7e194402be3ed385dfaefaf1681bb731fd776e2
vdpa: Block vq property changes in DRIVER_OK

The virtio standard doesn't allow for virtqueue address and state
changes when the device is in DRIVER_OK. Return an error in such cases
unless the device is suspended.

The suspended device exception is needed because some devices support
virtqueue changes when the device is suspended.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Suggested-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20231225134210.151540-3-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vdpa.c