]> xenbits.xensource.com Git - libvirt.git/commit
nodedev: Introduce mdev capability for mediated devices
authorErik Skultety <eskultet@redhat.com>
Mon, 6 Mar 2017 16:18:48 +0000 (17:18 +0100)
committerErik Skultety <eskultet@redhat.com>
Thu, 18 May 2017 10:21:45 +0000 (12:21 +0200)
commit88ef73e13cddc8c0ff01dfe7a914342f8720c517
treea824c408a3ab91e3bd7ae77a5d014e63737c87c6
parent500cbc066a5362834462c4eefb260b7c96a8554f
nodedev: Introduce mdev capability for mediated devices

Start discovering the mediated devices on the host system and format the
attributes for the mediated device into the XML. Compared to the parent
device which reports generic information about the abstract mediated
devices types, a child device only reports the type name it has been
instantiated from and the IOMMU group number, since that's device
specific compared to the rest of the info that can be gathered about
mediated devices at the moment.
This patch introduces both the formatting and parsing routines, updates
nodedev.rng schema, adding a testcase as well.

The resulting mdev child device XML:
<device>
  <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
  <path>/sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01</path>
  <parent>pci_0000_06_00_0</parent>
  <driver>
    <name>vfio_mdev</name>
  </driver>
  <capability type='mdev'>
    <type id='vendor_supplied_type_id'/>
    <iommuGroup number='NUM'/>
  <capability/>
<device/>

https://bugzilla.redhat.com/show_bug.cgi?id=1452072

Signed-off-by: Erik Skultety <eskultet@redhat.com>
docs/schemas/nodedev.rng
src/conf/node_device_conf.c
src/conf/node_device_conf.h
src/node_device/node_device_udev.c
tests/nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml [new file with mode: 0644]
tests/nodedevxml2xmltest.c