[vfio-users] kernel 4.12.5 traps qemu process on IGD passthrough VM startup

Manuel Ullmann labre at posteo.de
Thu Sep 7 16:50:59 UTC 2017


For some reason, the qemu process currently gets trapped by kernel
4.12.5. (qemu-cmd: [1]) Last thing I did was installing the Win7 Realtek
AC97 driver to get guest sound working. I did this with a qxl
configuration, because the passed through USB keyboard was not working
for disabling certified driver enforcement. (qxl xml: [2])

message is:
Sep  7 16:58:52 -host- kernel: traps: qemu-system-x86[4863] trap int3 ip:7f0cbc078024 sp:7f0cab7fd500 \
error:0
Sep  7 16:58:52 -host- kernel: qemu-system-x86 (4857) used greatest stack depth: 12824 bytes left

I’m also not able to get any Seabios debug output, although the chardev
is present. I tried to specify the Bios. bios-256k gets slightly earlier
output showing the loading files bar, but will result in the colored
stripes, I experienced on the Windows 10 Creator’s Update. bios.bin
seems to be the default and gets further, but will trap before any output is
shown.
Versions:
– Seabios 1.10.2
– qemu 2.9.0-r56
– kernel 4.12.5

Any suggestions?

Thanks,
Manuel

Note: I use the command line here, because libvirt does not allow access
to host alsa devices.
[1]: qemu-cmd

LC_ALL=C QEMU_AUDIO_DRV=alsa QEMU_DAC_FIXED_SETTINGS=1 QEMU_DAC_TRY_POLL=0 QEMU_DAC_FIXED_FMT=S16 QEMU_DAC_FIXED_FREQ=48000 QEMU_DAC_FIXED_BUFFER_SIZE=16384 QEMU_DAC_FIXED_PERIOD_SIZE=1024 QEMU_ALSA_DAC_DEV=default QEMU_ALSA_ADC_DEV=null QEMU_ALSA_ADC_VOICES=0 /usr/bin/qemu-system-x86_64 \
      -machine pc-i440fx-2.7,accel=kvm,usb=off,vmport=off,dump-guest-core=off,kernel_irqchip=on \
      -cpu host,migratable=no,+invtsc,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff \
      -m 5120 \
      -mem-prealloc \
      -mem-path /var/lib/hugetlbfs/user/qemu/pagesize-1GB/ \
      -realtime mlock=off \
      -smp 3,sockets=1,cores=3,threads=1 \
      -object iothread,id=iothread1 \
      -display none \
      -no-user-config \
      -nodefaults \
      -rtc base=localtime,clock=vm \
      -global kvm-pit.lost_tick_policy=delay \
      -no-hpet \
      -no-reboot \
      -global PIIX4_PM.disable_s3=1 \
      -global PIIX4_PM.disable_s4=1 \
      -boot menu=off,strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 \
      -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 \
      -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 \
      -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 \
      -device ahci,id=sata0,bus=pci.0,addr=0x8 \
      -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 \
      -drive if=none,media=cdrom,id=drive-sata0-0-1,readonly=on \
      -device ide-cd,bus=sata0.1,drive=drive-sata0-0-1,id=sata0-0-1 \
      -chardev stdio,id=seabios \
      -device isa-debugcon,iobase=0x402,chardev=seabios \
      -bios /usr/share/qemu/bios.bin \
      -drive file=/mnt/platz/Betriebssystemabbilder/virtio-win-0.1.118.iso,format=raw,if=none,media=cdrom,id=drive-sata0-0-4,readonly=on \
      -device ide-cd,bus=sata0.4,drive=drive-sata0-0-4,id=sata0-0-4 \
      -drive file=/mnt/platz/QemuMachines/Win10.img,format=raw,if=none,id=drive-virtio-disk0,cache=none,aio=native \
      -device virtio-blk-pci,iothread=iothread1,scsi=off,bus=pci.0,addr=0xb,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
      -drive file=/mnt/platz/QemuMachines/WinPlatz.img,format=raw,if=none,id=drive-virtio-disk1,cache=none,aio=native \
      -device virtio-blk-pci,iothread=iothread1,scsi=off,bus=pci.0,addr=0xa,drive=drive-virtio-disk1,id=virtio-disk1 \
      -drive file=/mnt/schnell/libvirt/ssd-image.img,format=raw,if=none,id=drive-virtio-disk4,cache=none,aio=native \
      -device virtio-blk-pci,iothread=iothread1,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk4,id=virtio-disk4 \
      -device virtio-net-pci,netdev=hostnet0,addr=0xc \
      -netdev tap,ifname=tap0,script=no,downscript=no,vhost=on,id=hostnet0 \
      -device AC97,addr=0xd,bus=pci.0,id=sound0 \
      -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2 \
      -device usb-host,hostbus=3,hostaddr=7,id=hostdev1,bus=usb.0,port=1 \
      -device usb-host,hostbus=3,hostaddr=6,id=hostdev3,bus=usb.0,port=2 \
      -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 \
      -set device.hostdev0.x-igd-opregion=on \
      -set device.hostdev0.x-igd-gms=5 \
      -set device.hostdev0.romfile=/mnt/platz/Bugs/intelBios/intelHaswell.rom.new \
      -msg timestamp=on 2>&1

[2]: qxl-spice xml

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>win10-qxlspice</name>
  <uuid>48e93bb5-7e8d-4b66-9756-6c1dcc755b75</uuid>
  <memory unit='KiB'>5242880</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>3</vcpu>
  <iothreads>1</iothreads>
  <cputune>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <emulatorpin cpuset='3'/>
    <iothreadpin iothread='1' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.7'>hvm</type>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='1'/>
    <feature policy='optional' name='invtsc'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' present='yes' tickpolicy='delay' track='guest'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='sdc' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='-path/file-'/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' iothread='1'/>
      <source file='-path/file-'/>
      <target dev='sda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' iothread='1'/>
      <source file='-path/file-'/>
      <target dev='sdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' iothread='1'/>
      <source file='-path/file-'/>
      <target dev='sde' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <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>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
    </controller>
    <interface type='direct'>
      <mac address='52:54:00:95:63:4c'/>
      <source dev='enp0s25' mode='bridge'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
    </graphics>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-machine'/>
    <qemu:arg value='pc-i440fx-2.7,accel=kvm,usb=off,vmport=off,dump-guest-core=off,kernel_irqchip=on'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,migratable=no,+invtsc,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff'/>
    <qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
    <qemu:env name='QEMU_DAC_FIXED_SETTINGS' value='1'/>
    <qemu:env name='QEMU_DAC_TRY_POLL' value='0'/>
    <qemu:env name='QEMU_DAC_FIXED_FMT' value='S16'/>
    <qemu:env name='QEMU_DAC_FIXED_FREQ' value='96000'/>
    <qemu:env name='QEMU_DAC_FIXED_BUFFER_SIZE' value='16384'/>
    <qemu:env name='QEMU_DAC_FIXED_PERIOD_SIZE' value='512'/>
    <qemu:env name='QEMU_DAC_DEV' value='-device-'/>
  </qemu:commandline>
</domain>




More information about the vfio-users mailing list