On 9/11/20 5:17 PM, Jonathon Jongsma wrote:
vDPA network devices allow high-performance networking in a virtual
machine by
providing a wire-speed data path. These devices require a vendor-specific host
driver but the data path follows the virtio specification.
The support for vDPA devices was recently added to qemu. This allows
libvirt to support these devices. This patchset requires that the device is
configured on the host with the appropriate vendor-specific driver. This will
create a chardev on the host at e.g. /dev/vhost-vdpa-0. That chardev path can
then be used to define a new interface with type='vdpa'.
Changes in v3:
- rebased to latest master
- various small fixes per comments on last review
- investigated hotplug -- I have a preliminary libvirt patch, but it doesn't
appear that hotplug is fully supported in qemu yet.
- qemu never closes the fd when the device is removed, so the device cannot
be reassigned to a different domain.
- I decided not to post the preliminary hotplug patch until I can get more
clarity from qemu developers.
This all looks good to me, and it passed full gitlab CI. I think it's
okay to push without hotplug working (i.e. without the patch to enable
it in libvirt) as long as the *intent* of qemu is that it is going to work.
I don't remember what the end of the discussion about migration was - if
vdpa itself doesn't support migration now, then obviously the current
code is the right thing to do. They should keep in mind that when they
*do* make the devices migratable, there will need to be a way for
libvirt to discover that.
I would be okay with pushing this, as long as it has been tested on real
world equipment. Assuming that (but waiting for a response):
Reviewed-by: Laine Stump <laine(a)redhat.com>
(modulo a couple error log message wordings in patch 3 - if you end up
sending the series again, it would help to have those in there. If we
push this version, then make sure to remind me (or whoever pushes it) to
make those tiny changes.)
(BTW, didn't we have a discussion about adding reporting of vdpa devices
to the node device driver?)
Jonathon Jongsma (3):
conf: Add support for vDPA network devices
qemu: add vhost-vdpa capability
qemu: add vdpa support
docs/formatdomain.rst | 24 ++++++++++++
docs/schemas/domaincommon.rng | 15 ++++++++
src/conf/domain_conf.c | 31 ++++++++++++++++
src/conf/domain_conf.h | 4 ++
src/conf/netdev_bandwidth_conf.c | 1 +
src/libxl/libxl_conf.c | 1 +
src/libxl/xen_common.c | 1 +
src/lxc/lxc_controller.c | 1 +
src/lxc/lxc_driver.c | 3 ++
src/lxc/lxc_process.c | 1 +
src/qemu/qemu_capabilities.c | 4 ++
src/qemu/qemu_capabilities.h | 3 ++
src/qemu/qemu_command.c | 31 +++++++++++++++-
src/qemu/qemu_command.h | 3 +-
src/qemu/qemu_domain.c | 6 ++-
src/qemu/qemu_hotplug.c | 15 +++++---
src/qemu/qemu_interface.c | 25 +++++++++++++
src/qemu/qemu_interface.h | 2 +
src/qemu/qemu_migration.c | 10 ++++-
src/qemu/qemu_process.c | 2 +
src/qemu/qemu_validate.c | 15 ++++++++
src/vmx/vmx.c | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../net-vdpa.x86_64-latest.args | 37 +++++++++++++++++++
tests/qemuxml2argvdata/net-vdpa.xml | 28 ++++++++++++++
tests/qemuxml2argvmock.c | 11 +++++-
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/net-vdpa.xml | 34 +++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
tools/virsh-domain.c | 1 +
31 files changed, 303 insertions(+), 11 deletions(-)
create mode 100644 tests/qemuxml2argvdata/net-vdpa.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/net-vdpa.xml
create mode 100644 tests/qemuxml2xmloutdata/net-vdpa.xml