summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2022-01-05 14:46:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-19 15:09:34 +0300
commita9f01f0776f006d470192aa20104c60edb522c81 (patch)
tree069fd1ec3855b67300b0e434bc89230138479815 /include/linux
parent447092100c7e71aa20469a270fcee441d807ed58 (diff)
downloadlinux-a9f01f0776f006d470192aa20104c60edb522c81.tar.xz
vdpa: Sync calls set/get config/status with cf_mutex
[ Upstream commit 73bc0dbb591baea322a7319c735e5f6c7dba9cfb ] Add wrappers to get/set status and protect these operations with cf_mutex to serialize these operations with respect to get/set config operations. Signed-off-by: Eli Cohen <elic@nvidia.com> Link: https://lore.kernel.org/r/20220105114646.577224-4-elic@nvidia.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Stable-dep-of: e40b6abe0b12 ("virtio_vdpa: fix misleading return in void function") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/vdpa.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index d26f5777f30f..c0c8ed2c62fd 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -394,6 +394,9 @@ void vdpa_get_config(struct vdpa_device *vdev, unsigned int offset,
void *buf, unsigned int len);
void vdpa_set_config(struct vdpa_device *dev, unsigned int offset,
const void *buf, unsigned int length);
+u8 vdpa_get_status(struct vdpa_device *vdev);
+void vdpa_set_status(struct vdpa_device *vdev, u8 status);
+
/**
* struct vdpa_mgmtdev_ops - vdpa device ops
* @dev_add: Add a vdpa device using alloc and register