On Fri, 2013-07-12 at 16:48 +0200, Gustav Sorenson wrote: > Hello list, > > I hope this is the right place for my question. If it is not, I'd be > very happy if you pointed me in the right direction. > > I have an AMD A10 6800K APU with integrated graphics and I'm trying to > pass that graphics adapter to a KVM guest. > My mainboard is an ASRock FM2A75 Pro4 with latest firmware, so that it > (supposedly) supports IOMMU. > > Since this is the first time I'm attempting this, I followed this > guide: https://bbs.archlinux.org/viewtopic.php?id=162768 > > I'm running Debian wheezy amd64, mainline kernel 3.10 with the > kernel-vfio-vga-reset patch mentioned in the link above, and qemu > 1.5.1 with a corresponding patch (again, see link above.) > Kernel config options I set that I assume are relevant: > CONFIG_VFIO_IOMMU_TYPE1=y > CONFIG_VFIO=y > CONFIG_VFIO_PCI=y > CONFIG_VFIO_PCI_VGA=y > > When I run > > qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host -smp > 2,sockets=1,cores=2,threads=1 -bios /home/gustav/myroot/bios.bin -vga > none -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 > -device vfio-pci,host=00:01.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on > -device vfio-pci,host=00:01.1,bus=root.1,addr=00.1 > > I receive the message > > qemu-system-x86_64: Attempt to reset PCI bus for VGA support failed > (Device or resource busy). VGA may not work. One problem with integrated graphics is that it's on the root complex. That means a) there's no visible bridge from which to reset it and b) there are lots of other devices on the bus, so we couldn't reset it even if we knew how. > Indeed the display output doesn't change, i.e. the login promt (on the > console, there is no X installed) of the host doesn't vanish, and I > don't get SeaBIOS output from the KVM guest. VGA assignment should only even be attempted on non-primary displays at this point (unless of course you want to work on adding support). > Next, I took a really old PCIe graphics card, installed it and set it > to be my primary graphics adapter in BIOS (or rather UEFI?), so that I > now saw POST and kernel messages via the dedicated GPU. Surprisingly > to me, I was able to pass-through the dedicated PCIe card to a KVM > guest, but still not the now supposedly unused integrated GPU, still > getting the same message when I tried. What is the plugin graphics card? > After changing the primary graphics adapter to be the integrated one, > I still wasn't able to pass through the integrated GPU, but was able > to see SeaBIOS output if I passed the dedicated card to the guest. > However in this case, the graphics output was a bit strange in that > the space bewteen characters and lines was unusually large and I saw > only what seemed to be part of the whole screen output. > > Since my integrated GPU is more powerful than the dedicated one, I'd > like to know what I can try to pass it to a guest, or what I can do to > find out why "Device or resource busy" is reported. > Please let me know if you need any more data. Also please note that > the computer is not in any kind of "production" use, so it wouldn't be > a problem if some operation resulted in an unusable operating system, > as long as there is no hardware damage. GPUs have all sorts quirks, none of which are openly documented by the vendors. I've only tried plugin Radeon cards and it's entirely possible that an integrated Radeon has a completely different set of quirks. Also, if it's anything like Intel IGD, the GPU is actually spread across multiple components of the chipset, so not as easy to pass through as a dedicated GPU. Please provide 'sudo lspci -vvv'. Thanks, Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html