linux-stable/drivers/vdpa/vdpa_sim
Stefano Garzarella 5840f8687f vdpa_sim: add get_config callback in vdpasim_dev_attr
commit 65b709586e upstream.

The get_config callback can be used by the device to fill the
config structure.
The callback will be invoked in vdpasim_get_config() before copying
bytes into caller buffer.

Move vDPA-net config updates from vdpasim_set_features() in the
new vdpasim_net_get_config() callback.
This is safe since in vdpa_get_config() we already check that
.set_features() callback is called before .get_config().

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20201215144256.155342-13-sgarzare@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-23 15:53:23 +01:00
..
Makefile
vdpa_sim.c vdpa_sim: add get_config callback in vdpasim_dev_attr 2021-02-23 15:53:23 +01:00