[libvirt] [RFC PATCH v2 00/18] Introduce vGPU mdev framework to libvirt

Alex Williamson alex.williamson at redhat.com
Wed Feb 15 22:40:40 UTC 2017


Hi Erik,

On Wed, 15 Feb 2017 22:32:17 +0100
Erik Skultety <eskultet at redhat.com> wrote:

> since v1:
> - new <hostdev> attribute model introduced which tells libvirt which device API
> should be considered when auto-assigning guest address
> - device_api is properly checked, thus taking the 'model' attribute only as a
> hint to assign "some" address
> - new address type 'mdev' is introduced rather than using plain <uuid> element,
> since the address element is more conveniently extendable.
> - the emulated mtty driver now works as well out of the box, so no HW needed to
> review this series --> let's try it :)
> - fixed all the nits from v1

Yay!  Is this missing the part where the locked memory limits get
bumped for vfio devices though?  We don't know how much any given mdev
device will need to lock, but we should plan for up to the full VM
size, just like vfio devices.  Otherwise it seems like it works!
Thanks,

Alex

> Erik Skultety (18):
>   util: Introduce new module virmdev
>   conf: Introduce new hostdev device type mdev
>   conf: Introduce new address type mdev
>   conf: Update XML parser, formatter, and RNG schema to support mdev
>   conf: Introduce virDomainHostdevDefPostParse
>   conf: Add post parse code for mdevs to virDomainHostdevDefPostParse
>   security: dac: Enable labeling of vfio mediated devices
>   security: selinux: Enable labeling of vfio mediated devices
>   conf: Enable cold-plug of a mediated device
>   qemu: Assign PCI addresses for mediated devices as well
>   hostdev: Maintain a driver list of active mediated devices
>   hostdev: Introduce a reattach method for mediated devices
>   qemu: cgroup: Adjust cgroups' logic to allow mediated devices
>   qemu: namespace: Hook up the discovery of mdevs into the namespace
>     code
>   qemu: Format mdevs on the qemu command line
>   test: Add some test cases for our test suite regarding the mdevs
>   docs: Document the new hostdev and address type 'mdev'
>   news: Update the NEWS.xml about the new mdev feature
> 
>  docs/formatdomain.html.in                          |  48 ++-
>  docs/news.xml                                      |  11 +
>  docs/schemas/domaincommon.rng                      |  26 ++
>  po/POTFILES.in                                     |   1 +
>  src/Makefile.am                                    |   1 +
>  src/conf/device_conf.h                             |   1 +
>  src/conf/domain_conf.c                             | 203 ++++++++++--
>  src/conf/domain_conf.h                             |   9 +
>  src/libvirt_private.syms                           |  20 ++
>  src/qemu/qemu_cgroup.c                             |  34 ++
>  src/qemu/qemu_command.c                            |  49 +++
>  src/qemu/qemu_command.h                            |   5 +
>  src/qemu/qemu_domain.c                             |  12 +
>  src/qemu/qemu_domain.h                             |   1 +
>  src/qemu/qemu_domain_address.c                     |  16 +-
>  src/qemu/qemu_hostdev.c                            |  37 +++
>  src/qemu/qemu_hostdev.h                            |   8 +
>  src/qemu/qemu_hotplug.c                            |   2 +
>  src/security/security_apparmor.c                   |   3 +
>  src/security/security_dac.c                        |  55 ++++
>  src/security/security_selinux.c                    |  54 ++++
>  src/util/virhostdev.c                              | 229 ++++++++++++-
>  src/util/virhostdev.h                              |  16 +
>  src/util/virmdev.c                                 | 358 +++++++++++++++++++++
>  src/util/virmdev.h                                 |  93 ++++++
>  tests/domaincapsschemadata/full.xml                |   1 +
>  .../qemuxml2argv-hostdev-mdev-unmanaged.args       |  25 ++
>  .../qemuxml2argv-hostdev-mdev-unmanaged.xml        |  37 +++
>  tests/qemuxml2argvtest.c                           |   6 +
>  .../qemuxml2xmlout-hostdev-mdev-unmanaged.xml      |  40 +++
>  tests/qemuxml2xmltest.c                            |   1 +
>  31 files changed, 1362 insertions(+), 40 deletions(-)
>  create mode 100644 src/util/virmdev.c
>  create mode 100644 src/util/virmdev.h
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-mdev-unmanaged.args
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-mdev-unmanaged.xml
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-mdev-unmanaged.xml
> 




More information about the libvir-list mailing list