public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Vga passthrough to KVM Guest issues
@ 2013-10-16 19:08 Max Schettler
  2013-10-28 16:17 ` Alex Williamson
  0 siblings, 1 reply; 6+ messages in thread
From: Max Schettler @ 2013-10-16 19:08 UTC (permalink / raw)
  To: kvm

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

Hi guys,

Im trying to set up vga passthrough. I use the latest mainline kernel
(3.12rc5) and patched qemu (1.6.50). When i try to start a VM using this
command:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu qemu64
-bios /usr/share/qemu/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=06:00.0,bus=root.1,multifunction=on,x-vga=on
-device vfio-pci,host=06:00.1,bus=root.1

The screen attached to the passthroughed GPU turns on but does not show
any output.
Also I get some warnings from amd_iommu and my kernel messages are full
of AMD-Vi messages:
"AMD-Vi: Completion-Wait loop timed out" and
"AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=06:00.0
address=0x0000000438544b90"

If i dont stop the qemu process this eventually forces me to reboot
since the host gets unusable.

I uploaded the whole dmesg output, if its of any help here:
http://pastebin.com/ki13dqEd

My hardware is an AMD FX-8350 with an Gigabyte 970A-UD3 and a Gigabyte
7870OC.

Any help is much appreciated, thanks in advance!

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Vga passthrough to KVM Guest issues
  2013-10-16 19:08 Vga passthrough to KVM Guest issues Max Schettler
@ 2013-10-28 16:17 ` Alex Williamson
  2013-11-01 15:09   ` Joerg Roedel
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Williamson @ 2013-10-28 16:17 UTC (permalink / raw)
  To: Max Schettler; +Cc: kvm, Joerg Roedel

On Wed, 2013-10-16 at 21:08 +0200, Max Schettler wrote:
> Hi guys,
> 
> Im trying to set up vga passthrough. I use the latest mainline kernel
> (3.12rc5) and patched qemu (1.6.50). When i try to start a VM using this
> command:
> 
> qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu qemu64
> -bios /usr/share/qemu/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=06:00.0,bus=root.1,multifunction=on,x-vga=on
> -device vfio-pci,host=06:00.1,bus=root.1
> 
> The screen attached to the passthroughed GPU turns on but does not show
> any output.
> Also I get some warnings from amd_iommu and my kernel messages are full
> of AMD-Vi messages:
> "AMD-Vi: Completion-Wait loop timed out" and
> "AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=06:00.0
> address=0x0000000438544b90"
> 
> If i dont stop the qemu process this eventually forces me to reboot
> since the host gets unusable.
> 
> I uploaded the whole dmesg output, if its of any help here:
> http://pastebin.com/ki13dqEd
> 
> My hardware is an AMD FX-8350 with an Gigabyte 970A-UD3 and a Gigabyte
> 7870OC.
> 
> Any help is much appreciated, thanks in advance!


You seem to get the AMD-Vi errors even before using VFIO, so I'd suspect
there's something wrong with the setup from the beginning.  Copying
Joerg in case he has any ideas.  You can also try the
disable_hugepages=1 module option for vfio_iommu_type1 (can also be set
via sysfs), but I'm not sure it's related.  Can you assign other devices
installed in the same slot?  Thanks,

Alex




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Vga passthrough to KVM Guest issues
  2013-10-28 16:17 ` Alex Williamson
@ 2013-11-01 15:09   ` Joerg Roedel
  2013-11-01 16:35     ` Max Schettler
  0 siblings, 1 reply; 6+ messages in thread
From: Joerg Roedel @ 2013-11-01 15:09 UTC (permalink / raw)
  To: Alex Williamson; +Cc: Max Schettler, kvm

Hey Max,

On Mon, Oct 28, 2013 at 10:17:19AM -0600, Alex Williamson wrote:
> On Wed, 2013-10-16 at 21:08 +0200, Max Schettler wrote:
> > Hi guys,
> > 
> > Im trying to set up vga passthrough. I use the latest mainline kernel
> > (3.12rc5) and patched qemu (1.6.50). When i try to start a VM using this
> > command:
> > 
> > qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu qemu64
> > -bios /usr/share/qemu/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=06:00.0,bus=root.1,multifunction=on,x-vga=on
> > -device vfio-pci,host=06:00.1,bus=root.1
> > 
> > The screen attached to the passthroughed GPU turns on but does not show
> > any output.
> > Also I get some warnings from amd_iommu and my kernel messages are full
> > of AMD-Vi messages:
> > "AMD-Vi: Completion-Wait loop timed out" and
> > "AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=06:00.0
> > address=0x0000000438544b90"
> > 
> > If i dont stop the qemu process this eventually forces me to reboot
> > since the host gets unusable.
> > 
> > I uploaded the whole dmesg output, if its of any help here:
> > http://pastebin.com/ki13dqEd
> > 
> > My hardware is an AMD FX-8350 with an Gigabyte 970A-UD3 and a Gigabyte
> > 7870OC.
> > 
> > Any help is much appreciated, thanks in advance!

That's interesting, what GPU is it that you are trying to pass through
to the guest? It seems to be an ATS capable device. Either there is a
problem in the AMD IOMMU driver with handling ATS or there is a problem
with the hardware and ATS should not be enabled there. Either way, the
fix/workaround has to be in the AMD IOMMU driver.


	Joerg



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Vga passthrough to KVM Guest issues
  2013-11-01 15:09   ` Joerg Roedel
@ 2013-11-01 16:35     ` Max Schettler
  2013-11-01 16:45       ` Joerg Roedel
  0 siblings, 1 reply; 6+ messages in thread
From: Max Schettler @ 2013-11-01 16:35 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Alex Williamson, kvm

[-- Attachment #1: Type: text/plain, Size: 2180 bytes --]

Hey Joerg,

Am Freitag, den 01.11.2013, 16:09 +0100 schrieb Joerg Roedel:
> Hey Max,
> 
> On Mon, Oct 28, 2013 at 10:17:19AM -0600, Alex Williamson wrote:
> > On Wed, 2013-10-16 at 21:08 +0200, Max Schettler wrote:
> > > Hi guys,
> > > 
> > > Im trying to set up vga passthrough. I use the latest mainline kernel
> > > (3.12rc5) and patched qemu (1.6.50). When i try to start a VM using this
> > > command:
> > > 
> > > qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu qemu64
> > > -bios /usr/share/qemu/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=06:00.0,bus=root.1,multifunction=on,x-vga=on
> > > -device vfio-pci,host=06:00.1,bus=root.1
> > > 
> > > The screen attached to the passthroughed GPU turns on but does not show
> > > any output.
> > > Also I get some warnings from amd_iommu and my kernel messages are full
> > > of AMD-Vi messages:
> > > "AMD-Vi: Completion-Wait loop timed out" and
> > > "AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=06:00.0
> > > address=0x0000000438544b90"
> > > 
> > > If i dont stop the qemu process this eventually forces me to reboot
> > > since the host gets unusable.
> > > 
> > > I uploaded the whole dmesg output, if its of any help here:
> > > http://pastebin.com/ki13dqEd
> > > 
> > > My hardware is an AMD FX-8350 with an Gigabyte 970A-UD3 and a Gigabyte
> > > 7870OC.
> > > 
> > > Any help is much appreciated, thanks in advance!
> 
> That's interesting, what GPU is it that you are trying to pass through
> to the guest? It seems to be an ATS capable device. Either there is a
> problem in the AMD IOMMU driver with handling ATS or there is a problem
> with the hardware and ATS should not be enabled there. Either way, the
> fix/workaround has to be in the AMD IOMMU driver.
> 
> 
> 	Joerg

I fixed this issue in the meanwhile by switching to another Mainboard,
so I guess it was at least somehow associated with the Hardware.

The first Setup was this one:
AMD FX-8350
Gigabyte 970A-UD3
Gigabyte 7870GHz Edition
Sapphire 6450

I switched to an Asrock 990FX Extreme3.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Vga passthrough to KVM Guest issues
  2013-11-01 16:35     ` Max Schettler
@ 2013-11-01 16:45       ` Joerg Roedel
  2013-11-01 16:54         ` Max Schettler
  0 siblings, 1 reply; 6+ messages in thread
From: Joerg Roedel @ 2013-11-01 16:45 UTC (permalink / raw)
  To: Max Schettler; +Cc: Alex Williamson, kvm

On Fri, Nov 01, 2013 at 05:35:38PM +0100, Max Schettler wrote:
> I fixed this issue in the meanwhile by switching to another Mainboard,
> so I guess it was at least somehow associated with the Hardware.
> 
> The first Setup was this one:
> AMD FX-8350
> Gigabyte 970A-UD3
> Gigabyte 7870GHz Edition
> Sapphire 6450
> 
> I switched to an Asrock 990FX Extreme3.

Hmm, in this case it might also have been a BIOS issue. The Gigabyte
BIOS might have configured the IOMMU in a wrong way causing those
errors. Have you tried with the latest BIOS on the Gigabyte Mainboard?


	Joerg



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Vga passthrough to KVM Guest issues
  2013-11-01 16:45       ` Joerg Roedel
@ 2013-11-01 16:54         ` Max Schettler
  0 siblings, 0 replies; 6+ messages in thread
From: Max Schettler @ 2013-11-01 16:54 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: Alex Williamson, kvm

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

Am Freitag, den 01.11.2013, 17:45 +0100 schrieb Joerg Roedel:
> On Fri, Nov 01, 2013 at 05:35:38PM +0100, Max Schettler wrote:
> > I fixed this issue in the meanwhile by switching to another Mainboard,
> > so I guess it was at least somehow associated with the Hardware.
> > 
> > The first Setup was this one:
> > AMD FX-8350
> > Gigabyte 970A-UD3
> > Gigabyte 7870GHz Edition
> > Sapphire 6450
> > 
> > I switched to an Asrock 990FX Extreme3.
> 
> Hmm, in this case it might also have been a BIOS issue. The Gigabyte
> BIOS might have configured the IOMMU in a wrong way causing those
> errors. Have you tried with the latest BIOS on the Gigabyte Mainboard?
> 
> 
> 	Joerg

I installed the latest BIOS when i tried to get it working.

Max


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-01 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 19:08 Vga passthrough to KVM Guest issues Max Schettler
2013-10-28 16:17 ` Alex Williamson
2013-11-01 15:09   ` Joerg Roedel
2013-11-01 16:35     ` Max Schettler
2013-11-01 16:45       ` Joerg Roedel
2013-11-01 16:54         ` Max Schettler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox