[Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU

Changpeng Liu posted 4 patches 7 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1515029086-4206-1-git-send-email-changpeng.liu@intel.com
Test checkpatch failed
Test docker passed
Test ppc passed
Test s390x passed
There is a newer version of this series
.gitignore                              |   1 +
Makefile                                |   3 +
Makefile.objs                           |   1 +
contrib/libvhost-user/libvhost-user.c   |  42 +++
contrib/libvhost-user/libvhost-user.h   |  33 ++
contrib/vhost-user-blk/Makefile.objs    |   1 +
contrib/vhost-user-blk/vhost-user-blk.c | 545 ++++++++++++++++++++++++++++++++
default-configs/pci.mak                 |   1 +
docs/interop/vhost-user.txt             |  55 ++++
hw/block/Makefile.objs                  |   3 +
hw/block/vhost-user-blk.c               | 359 +++++++++++++++++++++
hw/virtio/vhost-user.c                  | 118 +++++++
hw/virtio/vhost.c                       |  32 ++
hw/virtio/virtio-pci.c                  |  55 ++++
hw/virtio/virtio-pci.h                  |  18 ++
include/hw/virtio/vhost-backend.h       |  12 +
include/hw/virtio/vhost-user-blk.h      |  41 +++
include/hw/virtio/vhost.h               |  15 +
18 files changed, 1335 insertions(+)
create mode 100644 contrib/vhost-user-blk/Makefile.objs
create mode 100644 contrib/vhost-user-blk/vhost-user-blk.c
create mode 100644 hw/block/vhost-user-blk.c
create mode 100644 include/hw/virtio/vhost-user-blk.h
[Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU
Posted by Changpeng Liu 7 years, 9 months ago
Although virtio scsi specification was designed as a replacement for virtio_blk,
there are still many users using virtio_blk. QEMU 2.9 introduced a new device
vhost user scsi which can process I/O in user space for virtio_scsi, this commit
introduces a new vhost user block host device, which can support virtio_blk in
Guest OS, and I/O processing in another I/O target.

Due to the limitation for virtio_blk specification, virtio_blk device cannot get
block information such as capacity, block size etc via the specification, several
new vhost user messages were added to deliver virtio config space
information between Qemu and I/O target, VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG
messages used for get/set config space from/to I/O target, VHOST_USER_SLAVE_CONFIG_CHANGE_MSG
slave message was added for the event notifier in case the change of virtio config space. Also,
those messages can be used for vhost device live migration as well.

CHANGES:
v8-v9: Several optimizations and code cleanup according to the comments from v8.
v7-v8: Instead using an event file descriptor for event notifier in case of virtio configuration
space changed, while here used a new vhost-user slave message to deliver such event. Several
small optimizations to address the comments from v7.
v6-v7: change the parameter of set configuration function let it only contain valid data buffer.
v5-v6: add header flags for vhost-user master so that the slave can know the purpose for
set config, also vhost-user get/set messages' payload doesn't contain invalid data buffers.
v4-v5: add header offset and size for virtio config space.
v3-v4: refactoring the vhost user block example patch based on new libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.

Changpeng Liu (4):
  vhost-user: add new vhost user messages to support virtio config space
  vhost-user-blk: introduce a new vhost-user-blk host device
  contrib/libvhost-user: enable virtio config space messages
  contrib/vhost-user-blk: introduce a vhost-user-blk sample application

 .gitignore                              |   1 +
 Makefile                                |   3 +
 Makefile.objs                           |   1 +
 contrib/libvhost-user/libvhost-user.c   |  42 +++
 contrib/libvhost-user/libvhost-user.h   |  33 ++
 contrib/vhost-user-blk/Makefile.objs    |   1 +
 contrib/vhost-user-blk/vhost-user-blk.c | 545 ++++++++++++++++++++++++++++++++
 default-configs/pci.mak                 |   1 +
 docs/interop/vhost-user.txt             |  55 ++++
 hw/block/Makefile.objs                  |   3 +
 hw/block/vhost-user-blk.c               | 359 +++++++++++++++++++++
 hw/virtio/vhost-user.c                  | 118 +++++++
 hw/virtio/vhost.c                       |  32 ++
 hw/virtio/virtio-pci.c                  |  55 ++++
 hw/virtio/virtio-pci.h                  |  18 ++
 include/hw/virtio/vhost-backend.h       |  12 +
 include/hw/virtio/vhost-user-blk.h      |  41 +++
 include/hw/virtio/vhost.h               |  15 +
 18 files changed, 1335 insertions(+)
 create mode 100644 contrib/vhost-user-blk/Makefile.objs
 create mode 100644 contrib/vhost-user-blk/vhost-user-blk.c
 create mode 100644 hw/block/vhost-user-blk.c
 create mode 100644 include/hw/virtio/vhost-user-blk.h

-- 
1.9.3


Re: [Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU
Posted by no-reply@patchew.org 7 years, 9 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1515029086-4206-1-git-send-email-changpeng.liu@intel.com
Subject: [Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
2dacfa9a5c contrib/vhost-user-blk: introduce a vhost-user-blk sample application
f0afdce50e contrib/libvhost-user: enable virtio config space messages
90674d9197 vhost-user-blk: introduce a new vhost-user-blk host device
754086c200 vhost-user: add new vhost user messages to support virtio config space

=== OUTPUT BEGIN ===
Checking PATCH 1/4: vhost-user: add new vhost user messages to support virtio config space...
Checking PATCH 2/4: vhost-user-blk: introduce a new vhost-user-blk host device...
Checking PATCH 3/4: contrib/libvhost-user: enable virtio config space messages...
Checking PATCH 4/4: contrib/vhost-user-blk: introduce a vhost-user-blk sample application...
ERROR: space required after that ',' (ctx:VxV)
#268: FILE: contrib/vhost-user-blk/vhost-user-blk.c:191:
+    req = g_new0(VubReq,1);
                        ^

WARNING: architecture specific defines should be avoided
#512: FILE: contrib/vhost-user-blk/vhost-user-blk.c:435:
+#if defined(__linux__) && defined(BLKSSZGET)

total: 1 errors, 1 warnings, 575 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org