vdpa: Introduce and use vdpa device get, set config helpers
authorParav Pandit <parav@nvidia.com>
Tue, 26 Oct 2021 17:55:12 +0000 (20:55 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 09:26:49 +0000 (05:26 -0400)
commit6dbb1f1687a2ccdfc5b84b0a35bbc6dfefc4de3b
tree8d6e485d373b11b69bdeca1d7c47fbaaea486a3a
parentc57911ebfbfe745cb95da2bcf547c5bae000590f
vdpa: Introduce and use vdpa device get, set config helpers

Subsequent patches enable get and set configuration either
via management device or via vdpa device' config ops.

This requires synchronization between multiple callers to get and set
config callbacks. Features setting also influence the layout of the
configuration fields endianness.

To avoid exposing synchronization primitives to callers, introduce
helper for setting the configuration and use it.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Eli Cohen <elic@nvidia.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20211026175519.87795-2-parav@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa.c
drivers/vhost/vdpa.c
drivers/virtio/virtio_vdpa.c
include/linux/vdpa.h