[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230407133658.66339-1-sgarzare@redhat.com>
Date: Fri, 7 Apr 2023 15:36:56 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: virtualization@...ts.linux-foundation.org
Cc: Alvaro Karsz <alvaro.karsz@...id-run.com>,
linux-kernel@...r.kernel.org,
Eugenio PĂ©rez Martin <eperezma@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Stefano Garzarella <sgarzare@...hat.com>
Subject: [PATCH 0/2] vdpa_sim_blk: support shared backend
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
Powered by blists - more mailing lists