Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-14142

[mtty] virtual mediated devices account 'computer' as their parent

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • libvirt
    • None
    • None
    • sst_virtualization
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • RegressionOnly
    • None

      What were you trying to do that didn't work?

      OpenStack is trying to use mtty/mdpy for testing vfio-mdev upstream without real hardware.

      Unfortunately, when testing, we see that libvirt reports 'computer' as a parent for either a mtty mdev or a mdpy mdev, which makes accounting difficult since both devices are tangled.

      Please provide the package NVR for which bug is seen:

      How reproducible:

      Steps to reproduce

        1. ensure that you built and loaded the mtty kernel module
          lsmod | grep mtty
      1. create two mdevs, one from mtty and the other from mdpy devices

      virsh nodedev-list --cap mdev --all
      mdev_378d0ce4_e771_494f_91a4_388c0e89ab39_mtty
      mdev_68c2a491_9a5f_4fc4_a16a_eabfbdf6e6a9_mdpy

      1. ask libvirt to give you the device XML of each, you'll see that both are having 'computer' as parent instead of 'mtty'/'mdpy'

      stack@sbauza-dev2:~$ virsh nodedev-dumpxml mdev_378d0ce4_e771_494f_91a4_388c0e89ab39_mtty
      <device>
        <name>mdev_378d0ce4_e771_494f_91a4_388c0e89ab39_mtty</name>
        <path>/sys/devices/virtual/mtty/mtty/378d0ce4-e771-494f-91a4-388c0e89ab39</path>
        <parent>computer</parent>
        <driver>
          <name>mtty</name>
        </driver>
        <capability type='mdev'>
          <type id='mtty-1'/>
          <uuid>378d0ce4-e771-494f-91a4-388c0e89ab39</uuid>
          <iommuGroup number='0'/>
        </capability>
      </device>

      stack@sbauza-dev2:~$ virsh nodedev-dumpxml mdev_68c2a491_9a5f_4fc4_a16a_eabfbdf6e6a9_mdpy
      <device>
        <name>mdev_68c2a491_9a5f_4fc4_a16a_eabfbdf6e6a9_mdpy</name>
        <path>/sys/devices/virtual/mdpy/mdpy/68c2a491-9a5f-4fc4-a16a-eabfbdf6e6a9</path>
        <parent>computer</parent>
        <driver>
          <name>mdpy</name>
        </driver>
        <capability type='mdev'>
          <type id='mdpy-hd'/>
          <uuid>68c2a491-9a5f-4fc4-a16a-eabfbdf6e6a9</uuid>
          <iommuGroup number='1'/>
        </capability>
      </device>

       

      Expected results

       

      the parent value should be 'mdpy' or 'mtty' depending on the parent device.

      Actual results

       

      it says 'computer'

            jjongsma@redhat.com Jonathon Jongsma
            sbauza@redhat.com Sylvain Bauza
            Sylvain Bauza
            virt-maint virt-maint
            virt-bugs virt-bugs
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: