Skip to content

Commit 848ecea

Browse files
eugpermarmstsirkin
authored andcommitted
vdpa: Add suspend operation
This operation is optional: It it's not implemented, backend feature bit will not be exposed. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20220810171512.2343333-2-eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 8d12ec1 commit 848ecea

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/linux/vdpa.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ struct vdpa_map_file {
218218
* @reset: Reset device
219219
* @vdev: vdpa device
220220
* Returns integer: success (0) or error (< 0)
221+
* @suspend: Suspend or resume the device (optional)
222+
* @vdev: vdpa device
223+
* Returns integer: success (0) or error (< 0)
221224
* @get_config_size: Get the size of the configuration space includes
222225
* fields that are conditional on feature bits.
223226
* @vdev: vdpa device
@@ -319,6 +322,7 @@ struct vdpa_config_ops {
319322
u8 (*get_status)(struct vdpa_device *vdev);
320323
void (*set_status)(struct vdpa_device *vdev, u8 status);
321324
int (*reset)(struct vdpa_device *vdev);
325+
int (*suspend)(struct vdpa_device *vdev);
322326
size_t (*get_config_size)(struct vdpa_device *vdev);
323327
void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
324328
void *buf, unsigned int len);

0 commit comments

Comments
 (0)