[vfio-users] Single GTX980 GPUPassthrough - Memory listener initialization failed for container

fenix23 . fenix.tczew at gmail.com
Fri Jul 8 21:47:39 UTC 2016


Hi,

I'm trying to build my own machine and at this point I have almost working
machine with some issues for future resolve with your help I hope so :)

Let me introduce to you my hardware setup and main problem for now.

Motherboard: Asus Rampapge VI
CPU: i7-5960X
GPU: Zotac GTX980
This is headless setup for host machine with only one GPU passedthrough to
VM.

Software:
Debian Jessie 8.0
Kernel 3.16.0-4
Qemu version 2.1.2 -(stable debian)

I'm successfully runing and even gaming on Windows 10 virtual machine with
latest nvidia drivers. Now I want to move control over vm to virsh but I've
got error and found too small information about it to solve it on my own.
Can you give me some hints how to diagnose the problem, what to check or
change.  I'm running vm as root and want to start it automaticly after host
startup. Below is the error and starting script.

ERROR:
error: Failed to start domain Windows10
error: internal error: early end of file from monitor: possible problem:
2016-07-08T23:07:50.518597Z qemu-system-x86_64: -device
vfio-pci,host=01:00.0,multifunction=on,romfile=/home/vm/windows10_test/GTX980_vbios.rom:
vfio_dma_map(0x7f1b4f4207a0, 0x0, 0xa0000, 0x7f1aa8000000) = -12 (Cannot
allocate memory)
2016-07-08T23:07:50.518785Z qemu-system-x86_64: -device
vfio-pci,host=01:00.0,multifunction=on,romfile=/home/vm/windows10_test/GTX980_vbios.rom:
vfio_dma_map(0x7f1b4f4207a0, 0xc0000, 0x20000, 0x7f1b3c200000) = -12
(Cannot allocate memory)
2016-07-08T23:07:50.518881Z qemu-system-x86_64: -device
vfio-pci,host=01:00.0,multifunction=on,romfile=/home/vm/windows10_test/GTX980_vbios.rom:
vfio_dma_map(0x7f1b4f4207a0, 0x100000, 0x7ff00000, 0x7f1aa8100000) = -12
(Cannot allocate memory)
2016-07-08T23:07:50.518938Z qemu-system-x86_64: -device
vfio-pci,host=01:00.0,multifunction=on,romfile=/home/vm/windows10_test/GTX980_vbios.rom:
vfio: memory listener initialization failed for container
2016-07-08T23:07:50.518966Z qemu-system-x86_64: -dev

WORKING QEMU COMMAND:
qemu-system-x86_64 \
  -enable-kvm \
  -smp cores=2,threads=2 \
  -m 8G \
  -cpu host,kvm=off \
  -vga none \
  -usb -usbdevice host:046d:c328 \
  -nographic \
  -usb -usbdevice host:046d:c069 \
  -device vfio-pci,host=01:00.0,multifunction=on,romfile=/root/vbios.rom \
  -device vfio-pci,host=01:00.1 \
  -soundhw hda,ac97 \
  -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \
  -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  -device virtio-scsi-pci,id=scsi \
  -drive file=/home/iso/windows10_x64.iso,id=isocd,format=raw,if=none
-device scsi-cd,drive=isocd \
  -drive file=/home/iso/virtio-win.iso,id=virtio,format=raw,if=none -device
ide-cd,bus=ide.1,drive=virtio \
  -drive
file=/home/vm/firebird_ws/firebird_ws.img,id=disk,format=qcow2,if=none,cache=writeback
-device scsi-hd,drive=disk \

XML FILE:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Windows10</name>
  <uuid>ab048875-7fbf-4e61-b10c-685ccf92c477</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/home/vm/windows10_test/windows10_test.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:88:73:ed'/>
      <source bridge='br0'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
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'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg
value='vfio-pci,host=01:00.0,multifunction=on,romfile=/home/vm/windows10_test/GTX980_vbios.rom'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1'/>
  </qemu:commandline>
</domain>


Best Regards
Tomasz Strzelecki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160708/e472a2d3/attachment.htm>


More information about the vfio-users mailing list