All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Gustav Sorenson <gu.sorenson@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: AMD integrated graphics passthrough to KVM guest
Date: Fri, 12 Jul 2013 09:54:31 -0600	[thread overview]
Message-ID: <1373644471.8441.126.camel@ul30vt.home> (raw)
In-Reply-To: <CAPW=oqh2t236c73SmeTFwr37pdPDk_21pvJBjPxG0zeGE4kHqw@mail.gmail.com>

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


  reply	other threads:[~2013-07-12 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 14:48 AMD integrated graphics passthrough to KVM guest Gustav Sorenson
2013-07-12 15:54 ` Alex Williamson [this message]
2013-07-12 16:13   ` Gustav Sorenson
2013-07-12 16:33     ` Alex Williamson
2013-07-12 18:18       ` Gustav Sorenson
2013-07-12 20:01         ` Alex Williamson
2013-07-12 22:26           ` Gustav Sorenson
2013-07-13 19:45           ` Gustav Sorenson
2013-07-15  3:21             ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373644471.8441.126.camel@ul30vt.home \
    --to=alex.williamson@redhat.com \
    --cc=gu.sorenson@gmail.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.