Re: [PATCH RFC v2 09/10] vdpa_sim_blk: implement ramdisk behaviour
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-02-02 15:02:37
Also in:
kvm, lkml
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2021-02-02 15:02:37
Also in:
kvm, lkml
On Thu, Jan 28, 2021 at 03:41:26PM +0100, Stefano Garzarella wrote:
The previous implementation wrote only the status of each request. This patch implements a more accurate block device simulator, providing a ramdisk-like behavior. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> --- v2: - used %zd %zx to print size_t and ssize_t variables in dev_err() - removed unnecessary new line [Jason] - moved VIRTIO_BLK_T_GET_ID in another patch [Jason] - used push/pull instead of write/read terminology - added vdpasim_blk_check_range() to avoid overflows [Stefan] - use vdpasim*_to_cpu instead of le*_to_cpu - used vringh_kiov_length() helper [Jason] --- drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 164 ++++++++++++++++++++++++--- 1 file changed, 146 insertions(+), 18 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>