Hi, it seems, that my Haswell IGD Rom is not readable anymore (but working in Linux). Also tested this on a Live CD. I have a backup from sysfs, when it was still readable, but Alex advised me to not use it, because it would have to be prepared for Qemu usage. Now I’m interested on how I would achieve that. You mentioned correcting PCI Ids would be a part of it.
Best regards, Manuel Here is, why I think, that the rom is not readable. Catting the rom file gives an I/O error (after echo 1 > rom). Qemu logs this: 2017-03-29T18:15:42.394709Z qemu-system-x86_64: -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: IGD device 0000:00:02.0 has no ROM, legacy mode disabled SeaBIOS (version rel-1.10.1-0-g8891697-prebuilt.qemu-project.org) BUILD: gcc: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11) binutils: version 2.25.1-22.base.el7 No Xen hypervisor found. Running on QEMU (i440fx) RamSize: 0xc0000000 [cmos] Relocating init from 0x000da360 to 0xbffac900 (size 79472) 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@i0cf8/scsi@b/disk@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 - c2cf PCI: 32: 00000000c0000000 - 00000000fec00000 PCI: map device bdf=00:03.0 bar 0, addr 0000c000, size 00000100 [io] PCI: map device bdf=00:02.0 bar 4, addr 0000c100, size 00000040 [io] PCI: map device bdf=00:04.0 bar 0, addr 0000c140, size 00000040 [io] PCI: map device bdf=00:0a.0 bar 0, addr 0000c180, size 00000040 [io] PCI: map device bdf=00:0b.0 bar 0, addr 0000c1c0, size 00000040 [io] PCI: map device bdf=00:05.0 bar 0, addr 0000c200, size 00000020 [io] PCI: map device bdf=00:06.0 bar 4, addr 0000c220, size 00000020 [io] PCI: map device bdf=00:06.1 bar 4, addr 0000c240, size 00000020 [io] PCI: map device bdf=00:06.2 bar 4, addr 0000c260, size 00000020 [io] PCI: map device bdf=00:07.0 bar 0, addr 0000c280, size 00000020 [io] PCI: map device bdf=00:08.0 bar 4, addr 0000c2a0, size 00000020 [io] PCI: map device bdf=00:01.1 bar 4, addr 0000c2c0, size 00000010 [io] PCI: map device bdf=00:02.0 bar 0, addr fe400000, size 00400000 [mem] PCI: map device bdf=00:03.0 bar 6, addr fe800000, size 00040000 [mem] PCI: map device bdf=00:02.0 bar 6, addr fe840000, size 00020000 [mem] PCI: map device bdf=00:09.0 bar 0, addr fe860000, size 00004000 [mem] PCI: map device bdf=00:1b.0 bar 0, addr fe864000, size 00004000 [mem] PCI: map device bdf=00:03.0 bar 1, addr fe868000, size 00001000 [mem] PCI: map device bdf=00:04.0 bar 1, addr fe869000, size 00001000 [mem] PCI: map device bdf=00:05.0 bar 1, addr fe86a000, size 00001000 [mem] PCI: map device bdf=00:06.7 bar 0, addr fe86b000, size 00001000 [mem] PCI: map device bdf=00:08.0 bar 5, addr fe86c000, size 00001000 [mem] PCI: map device bdf=00:0a.0 bar 1, addr fe86d000, size 00001000 [mem] PCI: map device bdf=00:0b.0 bar 1, addr fe86e000, 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: 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 PCI: init bdf=00:03.0 id=10ec:8139 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:09.0 id=8086:293e PCI: init bdf=00:0a.0 id=1af4:1001 PCI: init bdf=00:0b.0 id=1af4:1001 PCI: init bdf=00:1b.0 id=8086:8c20 PCI: Using 00:02.0 for primary VGA handle_smp: apic_id=0x2 handle_smp: apic_id=0x1 Found 3 cpu(s) max supported 3 cpu(s) Copying PIR from 0xbffbfcbc to 0x000f6b90 Copying MPTABLE from 0x00006dbc/bffa3290 to 0x000f6a40 Copying SMBIOS entry point from 0x00006dbc to 0x000f6860 Scan for VGA option rom 2017-03-29T18:15:45.024216Z qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:00:02.0 Device option ROM contents are probably invalid (check dmesg). Skip option ROM probe with rombar=0, or load from file with romfile= EHCI init on dev 00:06.7 (regs=0xfe86b020) UHCI init on dev 00:06.0 (io=c220) UHCI init on dev 00:06.1 (io=c240) UHCI init on dev 00:06.2 (io=c260) 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 0xfe86c000, irq 11 Searching bootorder for: /pci@i0cf8/*@8/drive@1/disk@0 PS2 keyboard initialized AHCI/1: registering: "DVD/CD [AHCI/1: QEMU DVD-ROM ATAPI-4 DVD/CD]" Searching bootorder for: /pci@i0cf8/*@8/drive@4/disk@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@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@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@i0cf8/*@b Found 0 lpt ports Found 0 serial ports All threads complete. Scan for option roms Running option rom at c000:0003 pmm call arg1=1 pmm call arg1=0 pmm call arg1=1 pmm call arg1=0 Searching bootorder for: /pci@i0cf8/*@3 Searching bootorder for: /rom@genroms/kvmvapic.bin Searching bootorder for: HALT drive 0x000f6610: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=105922560 drive 0x000f66d0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=115343360 drive 0x000f6670: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=314572800 Running option rom at c100:0003 Space available for UMB: c3800-ec800, f6410-f65e0 Returned 77824 bytes of ZoneHigh e820 map has 8 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 00000000bffd3000 = 1 RAM 4: 00000000bffd3000 - 00000000c0000000 = 2 RESERVED 5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED 6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED 7: 0000000100000000 - 0000000180000000 = 1 RAM enter handle_19: NULL Booting from Hard Disk... Booting from 0000:7c00 2017-03-30 01:49:12.019+0000: shutting down, reason=failed dmesg spreads a lot of these in the meantime; co: Mar 30 03:49:10 sonnengebleicht kernel: dmar_fault: 3700872 callbacks suppressed Mar 30 03:49:10 sonnengebleicht kernel: DMAR: DRHD: handling fault status reg 3 Mar 30 03:49:10 sonnengebleicht kernel: DMAR: [DMA Read] Request device [00:02.0] fault addr 9f56e000 [fault reason 06] PTE Read access is not set Couldn’t find anything else in dmesg. Just from earlier runs. Finally libvirt xml: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>win10</name> <uuid>0427c09b-0d09-4827-82d9-93c64a65bdd8</uuid> <memory unit='KiB'>5242880</memory> <currentMemory unit='KiB'>5242880</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <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'> <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>destroy</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='/mnt/platz/Betriebssystemabbilder/virtio-win-0.1.118.iso'/> <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='/mnt/platz/QemuMachines/Win10.img'/> <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='/mnt/platz/QemuMachines/WinPlatz.img'/> <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='/mnt/schnell/libvirt/ssd-image.img'/> <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> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <sound model='ich9'> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </sound> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x046d'/> <product id='0xc246'/> </source> <address type='usb' bus='0' port='1'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x046a'/> <product id='0x010d'/> </source> <address type='usb' bus='0' port='2'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </hostdev> <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:arg value='-set'/> <qemu:arg value='device.hostdev0.x-igd-opregion=on'/> <qemu:arg value='-set'/> <qemu:arg value='device.hostdev0.x-igd-gms=5'/> <qemu:arg value='-chardev'/> <qemu:arg value='stdio,id=seabios'/> <qemu:arg value='-device'/> <qemu:arg value='isa-debugcon,iobase=0x402,chardev=seabios'/> <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='default'/> </qemu:commandline> </domain> _______________________________________________ vfio-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/vfio-users
