[PATCH v2 00/12] vDPA support in qemu

Cindy Lu posted 12 patches 3 years, 9 months ago
Test FreeBSD passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test docker-mingw@fedora failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200630174937.25560-1-lulu@redhat.com
Maintainers: Markus Armbruster <armbru@redhat.com>, Jason Wang <jasowang@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Eric Blake <eblake@redhat.com>
There is a newer version of this series
configure                         |  21 ++
docs/interop/index.rst            |   1 +
docs/interop/vhost-vdpa.rst       |  17 ++
hw/net/vhost_net.c                |  35 ++-
hw/net/virtio-net.c               |  22 +-
hw/virtio/Makefile.objs           |   1 +
hw/virtio/vhost-backend.c         |   7 +-
hw/virtio/vhost-vdpa.c            | 469 ++++++++++++++++++++++++++++++
hw/virtio/vhost.c                 |  48 ++-
hw/virtio/virtio-pci.c            |  13 +
hw/virtio/virtio.c                |   6 +
include/hw/virtio/vhost-backend.h |  16 +-
include/hw/virtio/vhost-vdpa.h    |  26 ++
include/hw/virtio/vhost.h         |   7 +
include/hw/virtio/virtio-bus.h    |   4 +
include/net/net.h                 |   1 +
include/net/vhost-vdpa.h          |  22 ++
net/Makefile.objs                 |   2 +-
net/clients.h                     |   2 +
net/net.c                         |  10 +
net/vhost-vdpa.c                  | 228 +++++++++++++++
qapi/net.json                     |  28 +-
qemu-options.hx                   |  12 +
23 files changed, 966 insertions(+), 32 deletions(-)
create mode 100644 docs/interop/vhost-vdpa.rst
create mode 100644 hw/virtio/vhost-vdpa.c
create mode 100644 include/hw/virtio/vhost-vdpa.h
create mode 100644 include/net/vhost-vdpa.h
create mode 100644 net/vhost-vdpa.c
[PATCH v2 00/12] vDPA support in qemu
Posted by Cindy Lu 3 years, 9 months ago
vDPA device is a device that uses a datapath which complies with the
virtio specifications with vendor specific control path. vDPA devices
can be both physically located on the hardware or emulated by software.
This PATCH introduce the vDPA support in qemu
TODO 
1) vIOMMU support
2) live migration support
3) docs for vhost-vdpa
4) config interrupt support 

change from v1
separate the patch of vhost_vq_get_addr
separate the patch of vhost_dev_start
introduce the docmation for vhost-vdpa.rst 
other comments form last version 

github address
https://github.com/lulu-github-name/qemutmp.git PATCHV2

Cindy Lu (9):
  net: introduce qemu_get_peer
  vhost_net: use the function qemu_get_peer
  vhost: introduce new VhostOps vhost_dev_start
  vhost: implement vhost_dev_start method
  vhost: introduce new VhostOps vhost_vq_get_addr
  vhost: implement vhost_vq_get_addr method
  vhost: introduce new VhostOps vhost_get_device_id
  vhost-vdpa: introduce vhost-vdpa backend
  vhost-vdpa: introduce vhost-vdpa net client

Jason Wang (3):
  virtio-bus: introduce queue_enabled method
  virtio-pci: implement queue_enabled method
  vhost: check the existence of vhost_set_iotlb_callback

 configure                         |  21 ++
 docs/interop/index.rst            |   1 +
 docs/interop/vhost-vdpa.rst       |  17 ++
 hw/net/vhost_net.c                |  35 ++-
 hw/net/virtio-net.c               |  22 +-
 hw/virtio/Makefile.objs           |   1 +
 hw/virtio/vhost-backend.c         |   7 +-
 hw/virtio/vhost-vdpa.c            | 469 ++++++++++++++++++++++++++++++
 hw/virtio/vhost.c                 |  48 ++-
 hw/virtio/virtio-pci.c            |  13 +
 hw/virtio/virtio.c                |   6 +
 include/hw/virtio/vhost-backend.h |  16 +-
 include/hw/virtio/vhost-vdpa.h    |  26 ++
 include/hw/virtio/vhost.h         |   7 +
 include/hw/virtio/virtio-bus.h    |   4 +
 include/net/net.h                 |   1 +
 include/net/vhost-vdpa.h          |  22 ++
 net/Makefile.objs                 |   2 +-
 net/clients.h                     |   2 +
 net/net.c                         |  10 +
 net/vhost-vdpa.c                  | 228 +++++++++++++++
 qapi/net.json                     |  28 +-
 qemu-options.hx                   |  12 +
 23 files changed, 966 insertions(+), 32 deletions(-)
 create mode 100644 docs/interop/vhost-vdpa.rst
 create mode 100644 hw/virtio/vhost-vdpa.c
 create mode 100644 include/hw/virtio/vhost-vdpa.h
 create mode 100644 include/net/vhost-vdpa.h
 create mode 100644 net/vhost-vdpa.c

-- 
2.21.1


Re: [PATCH v2 00/12] vDPA support in qemu
Posted by no-reply@patchew.org 3 years, 9 months ago
Patchew URL: https://patchew.org/QEMU/20200630174937.25560-1-lulu@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

/tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
/tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:208: qemu-system-x86_64w.exe] Error 1
make: *** [Makefile:527: x86_64-softmmu/all] Error 2
make: *** Waiting for unfinished jobs....
  LINK    aarch64-softmmu/qemu-system-aarch64w.exe
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_set_config':
/tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
/tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:208: qemu-system-aarch64w.exe] Error 1
make: *** [Makefile:527: aarch64-softmmu/all] Error 2
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 669, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-lwyumgcs/src/docker-src.2020-06-30-14.01.04.32102:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-lwyumgcs/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    5m52.723s
user    0m8.824s


The full log is available at
http://patchew.org/logs/20200630174937.25560-1-lulu@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v2 00/12] vDPA support in qemu
Posted by Jason Wang 3 years, 9 months ago
On 2020/7/1 上午2:06, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/20200630174937.25560-1-lulu@redhat.com/
>
>
>
> Hi,
>
> This series failed the docker-mingw@fedora build test. Please find the testing commands and
> their output below. If you have Docker installed, you can probably reproduce it
> locally.
>
> === TEST SCRIPT BEGIN ===
> #! /bin/bash
> export ARCH=x86_64
> make docker-image-fedora V=1 NETWORK=1
> time make docker-test-mingw@fedora J=14 NETWORK=1


Please fix this. You can reproduce this with the above commands.

Thanks


> === TEST SCRIPT END ===
>
> /tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
> /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
> /tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:208: qemu-system-x86_64w.exe] Error 1
> make: *** [Makefile:527: x86_64-softmmu/all] Error 2
> make: *** Waiting for unfinished jobs....
>    LINK    aarch64-softmmu/qemu-system-aarch64w.exe
> /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_set_config':
> /tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
> /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
> /tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:208: qemu-system-aarch64w.exe] Error 1
> make: *** [Makefile:527: aarch64-softmmu/all] Error 2
> Traceback (most recent call last):
>    File "./tests/docker/docker.py", line 669, in <module>
>      sys.exit(main())
> ---
>      raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-lwyumgcs/src/docker-src.2020-06-30-14.01.04.32102:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
> filter=--filter=label=com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d
> make[1]: *** [docker-run] Error 1
> make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-lwyumgcs/src'
> make: *** [docker-run-test-mingw@fedora] Error 2
>
> real    5m52.723s
> user    0m8.824s
>
>
> The full log is available at
> http://patchew.org/logs/20200630174937.25560-1-lulu@redhat.com/testing.docker-mingw@fedora/?type=message.
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com


Re: [PATCH v2 00/12] vDPA support in qemu
Posted by Cindy Lu 3 years, 9 months ago
Thanks Jason, I'm working in this, Will update a new version soon

On Wed, Jul 1, 2020 at 1:29 PM Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2020/7/1 上午2:06, no-reply@patchew.org wrote:
> > Patchew URL: https://patchew.org/QEMU/20200630174937.25560-1-lulu@redhat.com/
> >
> >
> >
> > Hi,
> >
> > This series failed the docker-mingw@fedora build test. Please find the testing commands and
> > their output below. If you have Docker installed, you can probably reproduce it
> > locally.
> >
> > === TEST SCRIPT BEGIN ===
> > #! /bin/bash
> > export ARCH=x86_64
> > make docker-image-fedora V=1 NETWORK=1
> > time make docker-test-mingw@fedora J=14 NETWORK=1
>
>
> Please fix this. You can reproduce this with the above commands.
>
> Thanks
>
>
> > === TEST SCRIPT END ===
> >
> > /tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
> > /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
> > /tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
> > collect2: error: ld returned 1 exit status
> > make[1]: *** [Makefile:208: qemu-system-x86_64w.exe] Error 1
> > make: *** [Makefile:527: x86_64-softmmu/all] Error 2
> > make: *** Waiting for unfinished jobs....
> >    LINK    aarch64-softmmu/qemu-system-aarch64w.exe
> > /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_set_config':
> > /tmp/qemu-test/src/hw/net/virtio-net.c:173: undefined reference to `vhost_dev_set_config'
> > /usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: hw/net/virtio-net.o: in function `virtio_net_get_config':
> > /tmp/qemu-test/src/hw/net/virtio-net.c:149: undefined reference to `vhost_dev_get_config'
> > collect2: error: ld returned 1 exit status
> > make[1]: *** [Makefile:208: qemu-system-aarch64w.exe] Error 1
> > make: *** [Makefile:527: aarch64-softmmu/all] Error 2
> > Traceback (most recent call last):
> >    File "./tests/docker/docker.py", line 669, in <module>
> >      sys.exit(main())
> > ---
> >      raise CalledProcessError(retcode, cmd)
> > subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-lwyumgcs/src/docker-src.2020-06-30-14.01.04.32102:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
> > filter=--filter=label=com.qemu.instance.uuid=9f5def1ac1a840deb219e8827020f24d
> > make[1]: *** [docker-run] Error 1
> > make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-lwyumgcs/src'
> > make: *** [docker-run-test-mingw@fedora] Error 2
> >
> > real    5m52.723s
> > user    0m8.824s
> >
> >
> > The full log is available at
> > http://patchew.org/logs/20200630174937.25560-1-lulu@redhat.com/testing.docker-mingw@fedora/?type=message.
> > ---
> > Email generated automatically by Patchew [https://patchew.org/].
> > Please send your feedback to patchew-devel@redhat.com
>