mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: virtualization@lists.linux-foundation.org
Cc: "Alvaro Karsz" <alvaro.karsz@solid-run.com>,
	linux-kernel@vger.kernel.org,
	"Eugenio Pérez Martin" <eperezma@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Stefano Garzarella" <sgarzare@redhat.com>
Subject: [PATCH 0/2] vdpa_sim_blk: support shared backend
Date: Fri,  7 Apr 2023 15:36:56 +0200	[thread overview]
Message-ID: <20230407133658.66339-1-sgarzare@redhat.com> (raw)

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


             reply	other threads:[~2023-04-07 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 13:36 Stefano Garzarella [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230407133658.66339-1-sgarzare@redhat.com \
    --to=sgarzare@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®