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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On behalf of Yongli, He who tested these series with KVMGT vGPU mdev.

Hi, Erik

Here is the libvirt testing result. in general speaking,  it works well.  while start libvirt-d and starting the vm, there are some call traces, i attached them in the very end of this mail.  this mail will be the  test-by content later.


Test env summary
==============
     0.  Test Bed hardware summary
            cat /proc/cpuinfo
                 vendor_id    : GenuineIntel
                 cpu family    : 6
                 model        : 78
                 model name    : Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
                 stepping    : 3
                 microcode    : 0x84
                 physical id    : 0
                 cpu cores    : 2
                 wp        : yes
                 flags        : fpu vme de pse tsc msr pae mce cx8 apic 
sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs        :


     1. test steps and software version following this guide, https://github.com/01org/gvt-linux/wiki/GVTg_Setup_Guide#322-build-kernel-source

     2. Host env
          uname -a
             Linux z-nuc-11 4.10.0-vgt #1 SMP Thu Mar 9 15:55:49 CST
2017 x86_64 x86_64 x86_64 GNU/Linux
         cat /etc/lsb-release
                 DISTRIB_ID=Ubuntu
                 DISTRIB_RELEASE=14.04
                 DISTRIB_CODENAME=trusty
                 DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

          kernel build from source:
              git describe
              gvt-fixes-2017-01-25-1560-gcedbc34
         qemu build from source:
                qemu-system-x86_64 --version

                 QEMU emulator version 2.8.50 (v2.8.0-2059-geba44e9-dirty)
                     Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

           libvirt, use your branch https://github.com/eskultety/libvirt.git
              git describe
                         v1.2.17-rc2-5530-g202402e
             git branch
                       master
                       * mdev-v3

       3. guest xml template, refer to attachment

       4. related scripts, refer to attachment
             myvirsh:  source build libvirt wrapper
             gdb-libvirtd:  libvirtd start up wrapper


the screen call trace while start the virtlogd ==================================

ubuntu@z-nuc-11:~/vgpu-meta/libvirt-stage$  ./libvirt/gdb-libvirt &

***************************************************
start virtlogd

[2] 2005
ubuntu@z-nuc-11:~/vgpu-meta/libvirt-stage$
***************************************************
start libvirt-d
2017-03-09 19:04:57.211+0000: 2059: info : libvirt version: 3.1.0
2017-03-09 19:04:57.211+0000: 2059: info : hostname: z-nuc-11.maas
2017-03-09 19:04:57.211+0000: 2059: error : qemuMonitorOpenUnix:367 : 
failed to connect to monitor socket: No such process
2017-03-09 19:04:57.213+0000: 2059: error : 
virMediatedDeviceGetIOMMUGroupDev:153 : internal error: IOMMU group file /sys/bus/mdev/devices/894f3983-1a36-42b3-b52c-1024aca216be/iommu_group
is not a symlink
2017-03-09 19:04:57.213+0000: 2003: info : libvirt version: 3.1.0
2017-03-09 19:04:57.213+0000: 2003: info : hostname: z-nuc-11.maas
2017-03-09 19:04:57.213+0000: 2003: error : virNetSocketReadWire:1800 : 
End of file while reading data: Input/output error



the screen call trace while start the VM (same for Ubuntu, Win10 etc) ======================================================

ubuntu@z-nuc-11:~/vgpu-meta/libvirt-stage$ myvirsh start vgpu-ubuntu
2017-03-09 19:06:50.483+0000: 2232: info : libvirt version: 3.1.0
2017-03-09 19:06:50.483+0000: 2232: info : hostname: z-nuc-11.maas
2017-03-09 19:06:50.483+0000: 2232: warning : qemuDomainObjTaint:4056 : 
Domain id=1 name='vgpu-ubuntu' uuid=972b5e38-0437-11e7-8f97-d36dba74552d
is tainted: high-privileges
2017-03-09 19:06:50.819+0000: 2204: info : libvirt version: 3.1.0
2017-03-09 19:06:50.819+0000: 2232: warning : virDomainAuditHostdev:456
: Unexpected hostdev type while encoding audit message: 4
2017-03-09 19:06:50.819+0000: 2204: info : hostname: z-nuc-11.maas
2017-03-09 19:06:50.819+0000: 2204: error : virNetSocketReadWire:1800 : 
End of file while reading data: Input/output error Domain vgpu-ubuntu started

Tested-by: Yongli, He <yongli.he@xxxxxxxxx>


>-----Original Message-----
>From: libvir-list-bounces@xxxxxxxxxx [mailto:libvir-list-bounces@xxxxxxxxxx]
>On Behalf Of Erik Skultety
>Sent: Monday, February 20, 2017 10:28 PM
>To: libvir-list@xxxxxxxxxx
>Cc: Erik Skultety <eskultet@xxxxxxxxxx>
>Subject:  [RFC PATCH v2 REBASE 00/18] Introduce vGPU mdev framework
>to libvirt
>
>since the original v2 [1]:
>- resolved a few merge conflicts caused by @9d92f533 which refactored out
>some duplicate code which eventually lead to dropping patch 14/18 from the
>original series due to being unnecessary
>- rebased onto fresh HEAD
>
>[1] https://www.redhat.com/archives/libvir-list/2017-February/msg00739.html
>
>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: Bump the memory locking limit for mdevs as well
>  qemu: Format mdevs on 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                                      |   9 +
> 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_command.c                            |  49 +++
> src/qemu/qemu_command.h                            |   5 +
> src/qemu/qemu_domain.c                             |  23 +-
> 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 +
> 30 files changed, 1333 insertions(+), 44 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
>
>--
>2.10.2
>
>--
>libvir-list mailing list
>libvir-list@xxxxxxxxxx
>https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: gdb-libvirt
Description: gdb-libvirt

Attachment: myvirsh
Description: myvirsh

<domain type='kvm'>
  <name>vgpu-fedrea</name>
  <uuid>69dcd4dd-3f83-46d3-aa89-905e755bdb49</uuid>
  <memory unit='KiB'>1953125</memory>
  <currentMemory unit='KiB'>1953125</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
    <!-- <loader type='rom'>$STAGE_DIR/../packages/seabios/bios.bin</loader> /-->
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>


  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='$STAGE_DIR/fedora1.qcow2'/>
      <target dev='sda' bus='ide'/>
    </disk>

    <controller type='pci' index='0' model='pci-root'/>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>

    <interface type='bridge'>
      <mac address='52:54:00:1b:8a:02'/>
      <source bridge='virbr0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

    <serial type='pty'>
      <target port='0'/>
    </serial>

    <console type='pty'>
      <target type='serial' port='0'/>
    </console>

    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>

    <video>
      <model type='cirrus' vram='67108864' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
   
     <graphics type='vnc' port='5900' autoport='yes'/>

    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
      <source>
        <address type='mdev' uuid='894f3983-1a36-42b3-b52c-1024aca216be'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </memballoon>

  </devices>


</domain>
<domain type='kvm'>
  <name>vgpu-ubuntu</name>
  <uuid>972b5e38-0437-11e7-8f97-d36dba74552d</uuid>
  <memory unit='KiB'>1953125</memory>
  <currentMemory unit='KiB'>1953125</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
   <!--  <loader type='rom'>$STAGE_DIR/../packages/seabios/bios.bin</loader> /-->
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>


  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='$STAGE_DIR/ub64_1.qcow2'/>
      <target dev='sda' bus='ide'/>
    </disk>

    <controller type='pci' index='0' model='pci-root'/>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>

    <interface type='bridge'>
      <mac address='52:54:00:1b:8a:02'/>
      <source bridge='virbr0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <video>
      <model type='cirrus' vram='67108864' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
   
     <graphics type='vnc' port='5900' autoport='yes'/>

    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
      <source>
        <address type='mdev' uuid='894f3983-1a36-42b3-b52c-1024aca216be'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </hostdev>

    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </memballoon>
  </devices>
</domain>
<domain type='kvm'>
  <name>vgpu-win10</name>
  <uuid>916c5c36-0437-11e7-a23d-830ed1295d00</uuid>
  <memory unit='KiB'>1953125</memory>
  <currentMemory unit='KiB'>1953125</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
    <!-- <loader type='rom'>$STAGE_DIR/../packages/seabios/bios.bin</loader> /-->
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>


  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'  cache='none' io='native'/>
      <source file='$STAGE_DIR/win10-64.qcow2'/>
      <target dev='sda' bus='ide'/>
    </disk>

    <controller type='pci' index='0' model='pci-root'/>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:1b:8a:02'/>
      <source bridge='virbr0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <video>
      <model type='cirrus' vram='67108864' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
   
     <graphics type='vnc' port='5900' autoport='yes'/>

    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
      <source>
        <address type='mdev' uuid='894f3983-1a36-42b3-b52c-1024aca216be'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </hostdev>

    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </memballoon>


  </devices>


</domain>
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux