[libvirt PATCH v3 0/3] Add support for vDPA network devices

Jonathon Jongsma jjongsma at redhat.com
Fri Sep 11 21:17:28 UTC 2020


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.

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

-- 
2.26.2





More information about the libvir-list mailing list