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

Manuel Ullmann labre at posteo.de
Thu Sep 7 19:24:41 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
>

Sorry, forgot to look into my log for some reason. The log shows the
issue being caused by a memory allocation failure. I have however not
the slightest clue, where qemu gets the expression, that it should
allocate 16GB memory. I’ve configured 5. This is hugeadm --explain
directly before qemu invocation followed by Seabios log. Using the
recommended settings as suggested seems to freeze the host. Sysreq does
not work after reattaching the keyboard.

I’ve also used the 5 1GB Hugepages before in default runlevel. The
used memory is then at 80%, but nothing critical. Maybe it’s related to
x-igd-gms? Although the memory obviously is already stolen. It happens
usually before or shortly after the login screen is shown. No idea, why
it never happened before, but perhaps libvirt enforces some cgroup
constrains on the memory usage.

hugeadm:
Thu Sep  7 19:53:37 CEST 2017
Total System Memory: 6983 MB

Mount Point                               Options
/var/lib/hugetlbfs                        rw,relatime,pagesize=1073741824
/var/lib/hugetlbfs/user/qemu/pagesize-1GB rw,relatime,pagesize=1073741824

Huge page pools:
      Size  Minimum  Current  Maximum  Default
1073741824        5        5        5        *

Huge page sizes with configured pools:
1073741824

The /proc/sys/vm/min_free_kbytes of 5417 is too small. To maximiuse efficiency
of fragmentation avoidance, there should be at least one huge page free per zone
in the system which minimally requires a min_free_kbytes value of 46137344

A /proc/sys/kernel/shmmax value of 6442450944 bytes may be sub-optimal. To maximise
shared memory usage, this should be set to the size of the largest shared memory
segment size you want to be able to use. Alternatively, set it to a size matching
the maximum possible allocation size of all huge pages. This can be done
automatically, using the --set-recommended-shmmax option.

The recommended shmmax for your currently allocated huge pages is 5368709120 bytes.
To make shmmax settings persistent, add the following line to /etc/sysctl.conf:
  kernel.shmmax = 5368709120

To make your hugetlb_shm_group settings persistent, add the following line to /etc/sysctl.conf:
  vm.hugetlb_shm_group = 78

Note: Permanent swap space should be preferred when dynamic huge page pools are used.

seabios log:
Thu Sep  7 19:53:37 CEST 2017
SeaBIOS (version 1.10.2-1.fc27)
BUILD: gcc: (GCC) 7.0.1 20170211 (Red Hat Cross 7.0.1-0.2) binutils: version 2.27-6.fc26
No Xen hypervisor found.
RamSize: 0xc0000000 [cmos]
Relocating init from 0x000daf60 to 0xbffad2c0 (size 76960)
Found QEMU fw_cfg
QEMU fw_cfg DMA interface supported
RamBlock: addr 0x0000000000000000 len 0x00000000c0000000 [e820]
RamBlock: addr 0x0000000100000000 len 0x0000000080000000 [e820]
Moving pm_base to 0x600
boot order:
1: /pci at i0cf8/scsi at b/disk at 0,0
2: HALT
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
Found 18 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: c000 - c6ef
PCI: 32: 00000000c0000000 - 00000000fec00000
PCI: map device bdf=00:0d.0  bar 0, addr 0000c000, size 00000400 [io]
PCI: map device bdf=00:0d.0  bar 1, addr 0000c400, size 00000100 [io]
PCI: map device bdf=00:02.0  bar 4, addr 0000c500, size 00000040 [io]
PCI: map device bdf=00:04.0  bar 0, addr 0000c540, size 00000040 [io]
PCI: map device bdf=00:0a.0  bar 0, addr 0000c580, size 00000040 [io]
PCI: map device bdf=00:0b.0  bar 0, addr 0000c5c0, size 00000040 [io]
PCI: map device bdf=00:05.0  bar 0, addr 0000c600, size 00000020 [io]
PCI: map device bdf=00:06.0  bar 4, addr 0000c620, size 00000020 [io]
PCI: map device bdf=00:06.1  bar 4, addr 0000c640, size 00000020 [io]
PCI: map device bdf=00:06.2  bar 4, addr 0000c660, size 00000020 [io]
PCI: map device bdf=00:07.0  bar 0, addr 0000c680, size 00000020 [io]
PCI: map device bdf=00:08.0  bar 4, addr 0000c6a0, size 00000020 [io]
PCI: map device bdf=00:0c.0  bar 0, addr 0000c6c0, size 00000020 [io]
PCI: map device bdf=00:01.1  bar 4, addr 0000c6e0, size 00000010 [io]
PCI: map device bdf=00:02.0  bar 0, addr fe400000, size 00400000 [mem]
PCI: map device bdf=00:0c.0  bar 6, addr fe800000, size 00040000 [mem]
PCI: map device bdf=00:02.0  bar 6, addr fe840000, size 00010000 [mem]
PCI: map device bdf=00:04.0  bar 1, addr fe850000, size 00001000 [mem]
PCI: map device bdf=00:05.0  bar 1, addr fe851000, size 00001000 [mem]
PCI: map device bdf=00:06.7  bar 0, addr fe852000, size 00001000 [mem]
PCI: map device bdf=00:08.0  bar 5, addr fe853000, size 00001000 [mem]
PCI: map device bdf=00:0a.0  bar 1, addr fe854000, size 00001000 [mem]
PCI: map device bdf=00:0b.0  bar 1, addr fe855000, size 00001000 [mem]
PCI: map device bdf=00:0c.0  bar 1, addr fe856000, size 00001000 [mem]
PCI: map device bdf=00:02.0  bar 2, addr e0000000, size 10000000 [prefmem]
PCI: map device bdf=00:04.0  bar 4, addr f0000000, size 00800000 [prefmem]
PCI: map device bdf=00:05.0  bar 4, addr f0800000, size 00800000 [prefmem]
PCI: map device bdf=00:07.0  bar 4, addr f1000000, size 00800000 [prefmem]
PCI: map device bdf=00:0a.0  bar 4, addr f1800000, size 00800000 [prefmem]
PCI: map device bdf=00:0b.0  bar 4, addr f2000000, size 00800000 [prefmem]
PCI: map device bdf=00:0c.0  bar 4, addr f2800000, size 00800000 [prefmem]
PCI: init bdf=00:00.0 id=8086:1237
PCI: init bdf=00:01.0 id=8086:7000
PIIX3/PIIX4 init: elcr=00 0c
PCI: init bdf=00:01.1 id=8086:7010
PCI: init bdf=00:01.3 id=8086:7113
Using pmtimer, ioport 0x608
PCI: init bdf=00:02.0 id=8086:0412
Intel IGD OpRegion enabled at 0xbfffe000, size 8KB, dev 00:02.0
Intel IGD BDSM enabled at 0xb5d00000, size 162MB, dev 00:02.0
PCI: init bdf=00:04.0 id=1af4:1001
PCI: init bdf=00:05.0 id=1af4:1003
PCI: init bdf=00:06.0 id=8086:2934
PCI: init bdf=00:06.1 id=8086:2935
PCI: init bdf=00:06.2 id=8086:2936
PCI: init bdf=00:06.7 id=8086:293a
PCI: init bdf=00:07.0 id=1af4:1002
PCI: init bdf=00:08.0 id=8086:2922
PCI: init bdf=00:0a.0 id=1af4:1001
PCI: init bdf=00:0b.0 id=1af4:1001
PCI: init bdf=00:0c.0 id=1af4:1000
PCI: init bdf=00:0d.0 id=8086:2415
PCI: init bdf=00:1f.0 id=8086:8c4a
PCI: Using 00:02.0 for primary VGA
handle_smp: apic_id=0x1
handle_smp: apic_id=0x2
Found 3 cpu(s) max supported 3 cpu(s)
Copying PIR from 0xbffbfc80 to 0x000f6d00
Copying MPTABLE from 0x00006e14/bffa3b60 to 0x000f6bc0
Copying SMBIOS entry point from 0x00006e14 to 0x000f6a00
Scan for VGA option rom
Running option rom at c000:0003
Turning on vga text mode console
SeaBIOS (version 1.10.2-1.fc27)
EHCI init on dev 00:06.7 (regs=0xfe852020)
UHCI init on dev 00:06.0 (io=c620)
UHCI init on dev 00:06.1 (io=c640)
UHCI init on dev 00:06.2 (io=c660)
ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)
ATA controller 2 at 170/374/0 (irq 15 dev 9)
AHCI controller at 00:08.0, iobase 0xfe853000, irq 11
Searching bootorder for: /pci at i0cf8/*@8/drive at 1/disk at 0
PS2 keyboard initialized
AHCI/1: registering: "DVD/CD [AHCI/1: QEMU DVD-ROM ATAPI-4 DVD/CD]"
Searching bootorder for: /pci at i0cf8/*@8/drive at 4/disk at 0
AHCI/4: registering: "DVD/CD [AHCI/4: QEMU DVD-ROM ATAPI-4 DVD/CD]"
found virtio-blk at 00:04.0
pci dev 0:4 virtio cap at 0x84 type 5 [pci cfg access]
pci dev 0:4 virtio cap at 0x70 type 2 bar 4 at 0xf0000000 off +0x3000 [mmio]
pci dev 0:4 virtio cap at 0x60 type 4 bar 4 at 0xf0000000 off +0x2000 [mmio]
pci dev 0:4 virtio cap at 0x50 type 3 bar 4 at 0xf0000000 off +0x1000 [mmio]
pci dev 0:4 virtio cap at 0x40 type 1 bar 4 at 0xf0000000 off +0x0000 [mmio]
pci dev 00:04.0 using modern (1.0) virtio mode
Searching bootorder for: /pci at i0cf8/*@4
found virtio-blk at 00:0a.0
pci dev 0:a virtio cap at 0x84 type 5 [pci cfg access]
pci dev 0:a virtio cap at 0x70 type 2 bar 4 at 0xf1800000 off +0x3000 [mmio]
pci dev 0:a virtio cap at 0x60 type 4 bar 4 at 0xf1800000 off +0x2000 [mmio]
pci dev 0:a virtio cap at 0x50 type 3 bar 4 at 0xf1800000 off +0x1000 [mmio]
pci dev 0:a virtio cap at 0x40 type 1 bar 4 at 0xf1800000 off +0x0000 [mmio]
pci dev 00:0a.0 using modern (1.0) virtio mode
Searching bootorder for: /pci at i0cf8/*@a
found virtio-blk at 00:0b.0
pci dev 0:b virtio cap at 0x84 type 5 [pci cfg access]
pci dev 0:b virtio cap at 0x70 type 2 bar 4 at 0xf2000000 off +0x3000 [mmio]
pci dev 0:b virtio cap at 0x60 type 4 bar 4 at 0xf2000000 off +0x2000 [mmio]
pci dev 0:b virtio cap at 0x50 type 3 bar 4 at 0xf2000000 off +0x1000 [mmio]
pci dev 0:b virtio cap at 0x40 type 1 bar 4 at 0xf2000000 off +0x0000 [mmio]
pci dev 00:0b.0 using modern (1.0) virtio mode
Searching bootorder for: /pci at i0cf8/*@b
Found 0 lpt ports
Found 0 serial ports
All threads complete.
Scan for option roms
Running option rom at cf00:0003
pmm call arg1=1
pmm call arg1=0
pmm call arg1=1
pmm call arg1=0
Searching bootorder for: /pci at i0cf8/*@c
Searching bootorder for: /rom at genroms/kvmvapic.bin
Searching bootorder for: HALT
drive 0x000f67b0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=105922560
drive 0x000f6870: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=115343360
drive 0x000f6810: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=314572800
Running option rom at d000:0003
Space available for UMB: d2800-ec800, f6580-f6780
Returned 77824 bytes of ZoneHigh
e820 map has 10 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 00000000b5d00000 = 1 RAM
  4: 00000000b5d00000 - 00000000bff00000 = 2 RESERVED
  5: 00000000bff00000 - 00000000bffd3000 = 1 RAM
  6: 00000000bffd3000 - 00000000c0000000 = 2 RESERVED
  7: 00000000feffc000 - 00000000ff000000 = 2 RESERVED
  8: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
  9: 0000000100000000 - 0000000180000000 = 1 RAM
enter handle_19:
  NULL
Booting from Hard Disk...
Booting from 0000:7c00

(process:4823): GLib-ERROR **: -path/to/gmem.c:130: failed to allocate 16705790624 bytes
-script.sh-: line 49:  4823 Trace/breakpoint trap   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-256k.bin -drive file=-path/to/virtio.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=-system.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=-storage.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=-fast-storage.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=-haswell.rom- -msg timestamp=on 2>&1

> 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