linux-stable/drivers/vdpa/vdpa_sim
Stefano Garzarella abebb16254 vdpa_sim_blk: support shared backend
The vdpa_sim_blk simulator uses a ramdisk as the backend. To test live
migration, we need two devices that share the backend to have the data
synchronized with each other.

Add a new module parameter to make the buffer shared between all devices.

The shared_buffer_mutex is used just to ensure that each operation is
atomic, but it is up to the user to use the devices knowing that the
underlying ramdisk is shared.

For example, when we do a migration, the VMM (e.g., QEMU) will guarantee
to write to the destination device, only after completing operations with
the source device.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20230407133658.66339-3-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-04-21 03:02:35 -04:00
..
Makefile vdpa: add vdpa simulator for block device 2021-05-03 04:55:53 -04:00
vdpa_sim.c vdpa_sim: move buffer allocation in the devices 2023-04-21 03:02:35 -04:00
vdpa_sim.h vdpa_sim: move buffer allocation in the devices 2023-04-21 03:02:35 -04:00
vdpa_sim_blk.c vdpa_sim_blk: support shared backend 2023-04-21 03:02:35 -04:00
vdpa_sim_net.c vdpa_sim: move buffer allocation in the devices 2023-04-21 03:02:35 -04:00