[Qemu-devel] [PULL 00/14] Block and docker patches

Fam Zheng posted 14 patches 6 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180125054648.18747-1-famz@redhat.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppc passed
Test s390x passed
MAINTAINERS                            |    6 +
block/Makefile.objs                    |    1 +
block/block-backend.c                  |   10 +
block/curl.c                           |   20 +-
block/io.c                             |   24 +
block/nvme.c                           | 1199 ++++++++++++++++++++++++++++++++
block/trace-events                     |   21 +
docs/qemu-block-drivers.texi           |   37 +
fsdev/qemu-fsdev-throttle.c            |    4 +-
hw/block/nvme.h                        |  698 +------------------
include/block/block.h                  |   11 +-
include/block/block_int.h              |    9 +
include/block/nvme.h                   |  700 +++++++++++++++++++
include/qemu/compiler.h                |   40 ++
include/qemu/coroutine.h               |   25 +-
include/qemu/lockable.h                |   75 ++
include/qemu/thread.h                  |    5 +-
include/qemu/typedefs.h                |    4 +
include/qemu/vfio-helpers.h            |   33 +
include/sysemu/block-backend.h         |    3 +
qapi/block-core.json                   |   17 +-
qemu-img.c                             |    9 +-
stubs/Makefile.objs                    |    1 +
stubs/ram-block.c                      |   16 +
tests/docker/dockerfiles/fedora.docker |    2 +-
util/Makefile.objs                     |    1 +
util/qemu-coroutine-lock.c             |   22 +-
util/trace-events                      |   11 +
util/vfio-helpers.c                    |  726 +++++++++++++++++++
29 files changed, 2993 insertions(+), 737 deletions(-)
create mode 100644 block/nvme.c
create mode 100644 include/block/nvme.h
create mode 100644 include/qemu/lockable.h
create mode 100644 include/qemu/vfio-helpers.h
create mode 100644 stubs/ram-block.c
create mode 100644 util/vfio-helpers.c
[Qemu-devel] [PULL 00/14] Block and docker patches
Posted by Fam Zheng 6 years, 2 months ago
The following changes since commit 834a336eb911db8a8ca00e760ee6a85faca19414:

  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2018-01-24 19:24:26 +0000)

are available in the Git repository at:

  git://github.com/famz/qemu.git tags/staging-pull-request

for you to fetch changes up to 6b4c4a84a1c7386df30edb4cb3b846b7ded9c707:

  qapi: Add NVMe driver options to the schema (2018-01-25 13:26:54 +0800)

----------------------------------------------------------------

Hi Peter, this includes:

- Paolo's docker fix for fedora image.
- Paolo's coroutine lock API improvements.
- My userspace NVMe driver.

----------------------------------------------------------------

Fam Zheng (9):
  stubs: Add stubs for ram block API
  util: Introduce vfio helpers
  block: Add VFIO based NVMe driver
  block: Introduce buf register API
  block/nvme: Implement .bdrv_(un)register_buf
  qemu-img: Map bench buffer
  block: Move NVMe constants to a separate header
  docs: Add section for NVMe VFIO driver
  qapi: Add NVMe driver options to the schema

Paolo Bonzini (5):
  docker: change Fedora base image to fedora:27
  lockable: add QemuLockable
  coroutine-lock: convert CoQueue to use QemuLockable
  coroutine-lock: make qemu_co_enter_next thread-safe
  curl: convert to CoQueue

 MAINTAINERS                            |    6 +
 block/Makefile.objs                    |    1 +
 block/block-backend.c                  |   10 +
 block/curl.c                           |   20 +-
 block/io.c                             |   24 +
 block/nvme.c                           | 1199 ++++++++++++++++++++++++++++++++
 block/trace-events                     |   21 +
 docs/qemu-block-drivers.texi           |   37 +
 fsdev/qemu-fsdev-throttle.c            |    4 +-
 hw/block/nvme.h                        |  698 +------------------
 include/block/block.h                  |   11 +-
 include/block/block_int.h              |    9 +
 include/block/nvme.h                   |  700 +++++++++++++++++++
 include/qemu/compiler.h                |   40 ++
 include/qemu/coroutine.h               |   25 +-
 include/qemu/lockable.h                |   75 ++
 include/qemu/thread.h                  |    5 +-
 include/qemu/typedefs.h                |    4 +
 include/qemu/vfio-helpers.h            |   33 +
 include/sysemu/block-backend.h         |    3 +
 qapi/block-core.json                   |   17 +-
 qemu-img.c                             |    9 +-
 stubs/Makefile.objs                    |    1 +
 stubs/ram-block.c                      |   16 +
 tests/docker/dockerfiles/fedora.docker |    2 +-
 util/Makefile.objs                     |    1 +
 util/qemu-coroutine-lock.c             |   22 +-
 util/trace-events                      |   11 +
 util/vfio-helpers.c                    |  726 +++++++++++++++++++
 29 files changed, 2993 insertions(+), 737 deletions(-)
 create mode 100644 block/nvme.c
 create mode 100644 include/block/nvme.h
 create mode 100644 include/qemu/lockable.h
 create mode 100644 include/qemu/vfio-helpers.h
 create mode 100644 stubs/ram-block.c
 create mode 100644 util/vfio-helpers.c

-- 
2.14.3


Re: [Qemu-devel] [PULL 00/14] Block and docker patches
Posted by Peter Maydell 6 years, 2 months ago
On 25 January 2018 at 05:46, Fam Zheng <famz@redhat.com> wrote:
> The following changes since commit 834a336eb911db8a8ca00e760ee6a85faca19414:
>
>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2018-01-24 19:24:26 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/famz/qemu.git tags/staging-pull-request
>
> for you to fetch changes up to 6b4c4a84a1c7386df30edb4cb3b846b7ded9c707:
>
>   qapi: Add NVMe driver options to the schema (2018-01-25 13:26:54 +0800)
>
> ----------------------------------------------------------------
>
> Hi Peter, this includes:
>
> - Paolo's docker fix for fedora image.
> - Paolo's coroutine lock API improvements.
> - My userspace NVMe driver.
>
> ----------------------------------------------------------------

Hi -- there are a couple of build failures here:

NetBSD/OpenBSD/OSX don't like the change to the .texi file:

/root/qemu//docs/qemu-block-drivers.texi:788: `disk_images_nvme' has
no Up field (perhaps incorrect sectioning?).
/root/qemu//docs/qemu-block-drivers.texi:788: warning: unreferenced
node `disk_images_nvme'.

and some of the other hosts produce this slightly different error
for what is probably the same issue:

/home/pm215/qemu/qemu-doc.texi:603: node `disk_images' lacks menu item
for `disk_images_nvme' despite being its Up target


There are some format string problems on 32-bit hosts:

/home/peter.maydell/qemu/util/vfio-helpers.c: In function
'qemu_vfio_init_ramblock':
/home/peter.maydell/qemu/util/vfio-helpers.c:406:25: error: format
'%ld' expects argument of type 'long int', but argument 4 has type
'ram_addr_t {aka unsigned int}' [-Werror=format=]
         fprintf(stderr, "qemu_vfio_init_ramblock: failed %p %ld\n",
                         ^
/home/peter.maydell/qemu/util/vfio-helpers.c: In function
'qemu_vfio_dump_mapping':
/home/peter.maydell/qemu/util/vfio-helpers.c:443:16: error: format
'%lx' expects argument of type 'long unsigned int', but argument 3 has
type 'size_t {aka unsigned int}' [-Werror=format=]
         printf("  vfio mapping %p %lx to %lx\n", m->host, m->size, m->iova);
                ^
/home/peter.maydell/qemu/util/vfio-helpers.c:443:16: error: format
'%lx' expects argument of type 'long unsigned int', but argument 4 has
type 'uint64_t {aka long long unsigned int}' [-Werror=format=]


Finally, the clang build spots what looks like a typo:

/home/petmay01/linaro/qemu-for-merges/util/vfio-helpers.c:514:55:
error: explicitly assigning value of variable of type 'uint64_t' (aka
'unsigned long') to itself [-Werror,-Wself-assign]
    IOVAMapping m = {.host = host, .size = size, iova = iova};
                                                 ~~~~ ^ ~~~~

...should be ".iova", I imagine.

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/14] Block and docker patches
Posted by Fam Zheng 6 years, 2 months ago
On Thu, Jan 25, 2018 at 9:51 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 25 January 2018 at 05:46, Fam Zheng <famz@redhat.com> wrote:
>> The following changes since commit 834a336eb911db8a8ca00e760ee6a85faca19414:
>>
>>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2018-01-24 19:24:26 +0000)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/famz/qemu.git tags/staging-pull-request
>>
>> for you to fetch changes up to 6b4c4a84a1c7386df30edb4cb3b846b7ded9c707:
>>
>>   qapi: Add NVMe driver options to the schema (2018-01-25 13:26:54 +0800)
>>
>> ----------------------------------------------------------------
>>
>> Hi Peter, this includes:
>>
>> - Paolo's docker fix for fedora image.
>> - Paolo's coroutine lock API improvements.
>> - My userspace NVMe driver.
>>
>> ----------------------------------------------------------------
>
> Hi -- there are a couple of build failures here:
>
> NetBSD/OpenBSD/OSX don't like the change to the .texi file:
>
> /root/qemu//docs/qemu-block-drivers.texi:788: `disk_images_nvme' has
> no Up field (perhaps incorrect sectioning?).
> /root/qemu//docs/qemu-block-drivers.texi:788: warning: unreferenced
> node `disk_images_nvme'.
>
> and some of the other hosts produce this slightly different error
> for what is probably the same issue:
>
> /home/pm215/qemu/qemu-doc.texi:603: node `disk_images' lacks menu item
> for `disk_images_nvme' despite being its Up target
>
>
> There are some format string problems on 32-bit hosts:
>
> /home/peter.maydell/qemu/util/vfio-helpers.c: In function
> 'qemu_vfio_init_ramblock':
> /home/peter.maydell/qemu/util/vfio-helpers.c:406:25: error: format
> '%ld' expects argument of type 'long int', but argument 4 has type
> 'ram_addr_t {aka unsigned int}' [-Werror=format=]
>          fprintf(stderr, "qemu_vfio_init_ramblock: failed %p %ld\n",
>                          ^
> /home/peter.maydell/qemu/util/vfio-helpers.c: In function
> 'qemu_vfio_dump_mapping':
> /home/peter.maydell/qemu/util/vfio-helpers.c:443:16: error: format
> '%lx' expects argument of type 'long unsigned int', but argument 3 has
> type 'size_t {aka unsigned int}' [-Werror=format=]
>          printf("  vfio mapping %p %lx to %lx\n", m->host, m->size, m->iova);
>                 ^
> /home/peter.maydell/qemu/util/vfio-helpers.c:443:16: error: format
> '%lx' expects argument of type 'long unsigned int', but argument 4 has
> type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
>
>
> Finally, the clang build spots what looks like a typo:
>
> /home/petmay01/linaro/qemu-for-merges/util/vfio-helpers.c:514:55:
> error: explicitly assigning value of variable of type 'uint64_t' (aka
> 'unsigned long') to itself [-Werror,-Wself-assign]
>     IOVAMapping m = {.host = host, .size = size, iova = iova};
>                                                  ~~~~ ^ ~~~~
>
> ...should be ".iova", I imagine.

All good catches. Will fix them all. Thanks!

Fam