All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Coiby Xu <coiby.xu@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: How to extend QEMU's vhost-user tests after implementing vhost-user-blk device backend
Date: Thu, 14 Nov 2019 11:14:29 +0000	[thread overview]
Message-ID: <20191114111429.GC580024@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAJAkqrXyeVn4iy7NzkR__BS9q9xT4ZWcjJszNBaSKH0U57c4hw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

On Wed, Nov 13, 2019 at 05:23:46PM +0800, Coiby Xu wrote:
> I've implemented vhost-user-blk device backend by following
> https://wiki.qemu.org/Google_Summer_of_Code_2019#vhost-user-blk_device_backend.
> But I'm not sure what kind of tests I should write or to extend to
> take advantage of implemented vhost-user-blk device backend. The
> existing two tests related to vhost user are tests/vhost-user-bridge.c
> and tests/vhost-user-test.c both of which act as vhost user server to
> test QEMU's implementation of vhost user client. Am I supposed to
> extend these two tests? Could you elaborate on the final step "Extend
> QEMU's vhost-user tests to take advantage of your vhost-user-blk
> device backend"?

Hi Coiby,
The following tests/virtio-blk-test.c test cases will also work with
vhost-user-blk: basic, indirect, idx, nxvirtq.  The other test cases
may require more work because they send QMP commands like block_resize
or device_add virtio-blk-pci.

In theory block_resize should work because the vhost-user-blk device
backend can send a VIRTIO Configuration Space changed interrupt
(VHOST_USER_SLAVE_CONFIG_CHANGE_MSG), but I haven't checked if this code
path is fully implemented.

In order to reuse existing test cases you could add new initialization
code to virtio-blk-test.c that:
1. Starts the vhost-user-blk device backend
2. Adds a -device vhost-user-blk-pci connected to that device backend

Please post your patches to qemu-devel even if you don't have test cases
yet.  That way you can get review feedback earlier.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-11-14 11:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  9:23 How to extend QEMU's vhost-user tests after implementing vhost-user-blk device backend Coiby Xu
2019-11-14 11:14 ` Stefan Hajnoczi [this message]
2019-12-11 15:25   ` Coiby Xu
2019-12-13 10:58     ` Stefan Hajnoczi
2020-01-04  6:00       ` Coiby Xu
2020-01-08 16:56         ` Stefan Hajnoczi

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=20191114111429.GC580024@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=coiby.xu@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.