vdpa_sim: add set_config callback in vdpasim_dev_attr
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 15 Dec 2020 14:42:51 +0000 (15:42 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Dec 2020 21:14:29 +0000 (16:14 -0500)
commitc124a95e304bc5d37144e2fff6e52bb904d41810
tree3e64a6579b4b204db75220a5b0d0ca29b893b0f4
parent65b709586e222fa6ffd4166ac7fdb5d5dad113ee
vdpa_sim: add set_config callback in vdpasim_dev_attr

The set_config callback can be used by the device to parse the
config structure modified by the driver.

The callback will be invoked, if set, in vdpasim_set_config() after
copying bytes from caller buffer into vdpasim->config buffer.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20201215144256.155342-14-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa_sim/vdpa_sim.c