mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] vdpa_sim_blk: support shared backend
@ 2023-04-07 13:36 Stefano Garzarella
  2023-04-07 13:36 ` [PATCH 1/2] vdpa_sim: move buffer allocation in the devices Stefano Garzarella
  2023-04-07 13:36 ` [PATCH 2/2] vdpa_sim_blk: support shared backend Stefano Garzarella
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Garzarella @ 2023-04-07 13:36 UTC (permalink / raw)
  To: virtualization
  Cc: Alvaro Karsz, linux-kernel, Eugenio Pérez Martin,
	Jason Wang, Michael S. Tsirkin, Stefano Garzarella

This series is mainly for testing live migration between 2 vdpa_sim_blk
devices.

The first patch is preparation and moves the buffer allocation into devices,
the second patch adds the `shared_buffer_mutex` parameter to vdpa_sim_blk to
use the same ramdisk for all devices.

Tested with QEMU v8.0.0-rc2 in this way:

modprobe vhost_vdpa
modprobe vdpa_sim_blk shared_backend=true

vdpa dev add mgmtdev vdpasim_blk name blk0
vdpa dev add mgmtdev vdpasim_blk name blk1

qemu-system-x86_64 -m 512M -smp 2 -M q35,accel=kvm,memory-backend=mem \
  -object memory-backend-file,share=on,id=mem,size="512M",mem-path="/dev/shm"
  ...
  -blockdev node-name=drive_src1,driver=virtio-blk-vhost-vdpa,path=/dev/vhost-vdpa-1,cache.direct=on \
  -device virtio-blk-pci,id=src1,bootindex=2,drive=drive_src1 \
  -incoming tcp:0:3333

qemu-system-x86_64 -m 512M -smp 2 -M q35,accel=kvm,memory-backend=mem \
  -object memory-backend-file,share=on,id=mem,size="512M",mem-path="/dev/shm"
  ...
  -blockdev node-name=drive_src1,driver=virtio-blk-vhost-vdpa,path=/dev/vhost-vdpa-0,cache.direct=on \
  -device virtio-blk-pci,id=src1,bootindex=2,drive=drive_src1

(qemu) migrate -d tcp:0:3333

Stefano Garzarella (2):
  vdpa_sim: move buffer allocation in the devices
  vdpa_sim_blk: support shared backend

 drivers/vdpa/vdpa_sim/vdpa_sim.h     |  3 +-
 drivers/vdpa/vdpa_sim/vdpa_sim.c     |  7 +--
 drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 83 +++++++++++++++++++++++++---
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 28 +++++++---
 4 files changed, 100 insertions(+), 21 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-07 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 13:36 [PATCH 0/2] vdpa_sim_blk: support shared backend Stefano Garzarella
2023-04-07 13:36 ` [PATCH 1/2] vdpa_sim: move buffer allocation in the devices Stefano Garzarella
2023-04-07 13:36 ` [PATCH 2/2] vdpa_sim_blk: support shared backend Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®