You are not logged in.

#5801 2015-08-03 00:26:13

holovati
Member
From: Denmark
Registered: 2014-03-04
Posts: 4

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

lersek wrote:
Duelist wrote:

Is there a legitimate way of attaching an ISA debug console to a libvirt domain(VM)? I tried to pass the regular options as qemu:commandline, but it says that there's no such option...
Googling that problem leads me to my own messages about that debug feature.

I'm sure you did the right thing -- almost. The bit that you probably missed is that the "commandline" and "arg" elements come from a different XML namespace than the rest of the elements in the domain XML. (They are defined by an XML Schema that targets the "http://libvirt.org/schemas/domain/qemu/1.0" namespace -- BTW do not click this link, it's just a string.)

Therefore, you have to declare that XML namespace with a namespace prefix, and qualify the "commandline" and "arg" elements with this namespace prefix. This namespace / prefix association can occur in any element that (recursively) contains these elements; or, even, you could just set the default namespace with attributes of the "arg" and "commandline" elements themselves (but that would take a lot more typing). See:

https://en.wikipedia.org/wiki/XML_names … eclaration

In practice though, the namespace is usually declared in the root element of the XML document.

Anyway, enough of the abstract discussion, here's what you need:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  ... stuff ...

  <qemu:commandline>
    <qemu:arg value='-global'/>
    <qemu:arg value='isa-debugcon.iobase=0x402'/>
    <qemu:arg value='-debugcon'/>
    <qemu:arg value='file:/tmp/GUEST_NAME.log'/>
  </qemu:commandline>
</domain>

In the above,

qemu

is the namespace prefix being declared,

http://libvirt.org/schemas/domain/qemu/1.0

is the namespace URI being mapped to the

qemu

namespace prefix, and

qemu:commandline

and

qemu:arg

are the elements that you need.

(The "qemu" prefix is incidental, it could be replaced with any other prefix; the point is that the same prefix must be used in the namespace declaration and later for qualifying "commandline" and "arg". The "qemu" prefix is just a "mediator"; what matters is that "commandline" and "arg" come from the namespace "http://libvirt.org/schemas/domain/qemu/1.0".)

The namespace link seems dead.

Offline

#5802 2015-08-03 02:25:33

mostlyharmless
Member
Registered: 2014-01-16
Posts: 64

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Well if after 233 pages the Powers feel that the resident experts including the OP have violated the Arch Way, I guess that confirms everything I've heard about the Arch community. Too bad. Perhaps I should just go back to Slackware, not that anyone really cares about that here.  Sheesh.

Offline

#5803 2015-08-03 06:32:46

morphological
Member
Registered: 2015-08-01
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

KVM passthorugh seems to work fine on Lubuntu 14.4 but I seem to get better performance when I run it from arch.

Last edited by morphological (2015-08-03 18:59:38)

Offline

#5804 2015-08-03 10:10:24

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

morphological wrote:

Is there a way around using the grub.cfg, while getting the passthrough working?

Depends on the bootloader you use. There's a very rude way of including the kernel command line into the kernel itself. Different platforms have it different. RaspberryPi, a common example of embedded linux, has a /boot/cmdline.txt file. But that's waay beyond of this topic.


jasonwryan wrote:

No. There are support communities for those distributions; these boards are for Arch.

Alright, alright! I have installed pacman again.

[user@crossfire ~]$ pacman -V

 .--.                  Pacman v4.1.2 - libalpm v8.0.2
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2013 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

[user@crossfire ~]$ cat /etc/fedora-release 
Fedora release 22 (Twenty Two)

See?

Last edited by Duelist (2015-08-03 10:14:31)


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#5805 2015-08-03 12:19:02

morphological
Member
Registered: 2015-08-01
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
morphological wrote:

Is there a way around using the grub.cfg, while getting the passthrough working?

Depends on the bootloader you use. There's a very rude way of including the kernel command line into the kernel itself. Different platforms have it different. RaspberryPi, a common example of embedded linux, has a /boot/cmdline.txt file. But that's waay beyond of this topic.

I use arch and lubuntu 14.04 as my main systems.
Could you provide some links to documentation or a general topic designation this matter corresponds to?

Thanks!

Offline

#5806 2015-08-03 14:35:47

fushfush
Member
Registered: 2015-08-03
Posts: 2

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hey Guys.

My current situations is this:

I got an W520 with an i7-2720QM and Nvidia Quadro 1000m. I want to virtualize with Debian as host and Windows as guest. Therefore i want to assign my Nvidia GPU to the guest.
The reason for this choice is because I'm an mechanical engineering student, and that requires alot of windows-only programs..

I got stuck at Nvidias error 43 problem.

I haved used the 377.88 Driver, with and without kvm as hidden. I have deleted all hypervisor tags.. It still reports error 43 .. 

This is my config file over my virtual windows machine:

<domain type='kvm'>
  <name>win7</name>
  <uuid>5ebc2f74-7bbd-482d-99f4-660155187f8d</uuid>
  <memory unit='KiB'>6291456</memory>
  <currentMemory unit='KiB'>6291456</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sda3'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <boot order='3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <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>
    <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>
    <interface type='network'>
      <mac address='52:54:00:69:ea:30'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Can you help me with something i can go on with? I'm pretty stuck at this point.

Thanks!

Offline

#5807 2015-08-03 16:30:39

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

fushfush wrote:

Hey Guys.

My current situations is this:

I got an W520 with an i7-2720QM and Nvidia Quadro 1000m. I want to virtualize with Debian as host and Windows as guest. Therefore i want to assign my Nvidia GPU to the guest.
The reason for this choice is because I'm an mechanical engineering student, and that requires alot of windows-only programs..
Thanks!

Assuming this is a laptop, there was no one, who got it working properly AFAIR. So you're pretty much stuck with windows. However, i find it strange you have a quadro in there...
I can't give you an advice, but i can link you the spreadsheet of hardware.


The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.

Offline

#5808 2015-08-03 18:11:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,749
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
jasonwryan wrote:

No. There are support communities for those distributions; these boards are for Arch.

Alright, alright! I have installed pacman again.

[user@crossfire ~]$ pacman -V

 .--.                  Pacman v4.1.2 - libalpm v8.0.2
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2013 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

[user@crossfire ~]$ cat /etc/fedora-release 
Fedora release 22 (Twenty Two)

See?

I see you aren't running Arch and you are going out of your way to flout the Forum Etiquette and antagonise the staff...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5809 2015-08-03 18:57:44

morphological
Member
Registered: 2015-08-01
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hey there.

I have got the Passthrough working on my GTX 750TI and 4690K  with Windows 10.
Performance is ok and overclocking of the GPU works, but I am noticing one little problem.

Coretemp and CPUZ are both reporting weird values, or none at all.
My CPU is at 4.5GHZ, yet 4GHZ are displayed.
http://s16.postimg.org/uaw7ohahv/Untitled.png

I have seen this occurring on other systems, but couldnt find out how to fix it.

nbhs also seems to have a CPUZ CPU Frequency output of 4GHZ, which is probably incorrect.
http://i.imgur.com/PtTM4BD.jpg

Last edited by morphological (2015-08-03 19:03:16)

Offline

#5810 2015-08-03 19:47:44

shade
Banned

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

morphological wrote:

Hey there.

I have got the Passthrough working on my GTX 750TI and 4690K  with Windows 10.
Performance is ok and overclocking of the GPU works, but I am noticing one little problem.

Coretemp and CPUZ are both reporting weird values, or none at all.
My CPU is at 4.5GHZ, yet 4GHZ are displayed.
http://s16.postimg.org/uaw7ohahv/Untitled.png

I have seen this occurring on other systems, but couldnt find out how to fix it.

nbhs also seems to have a CPUZ CPU Frequency output of 4GHZ, which is probably incorrect.
http://i.imgur.com/PtTM4BD.jpg

Been there.
We can't get the temperatures right for two years on modern AMD platforms(TCTL!), and you're asking for frequencies inside the VM.

#5811 2015-08-04 03:24:22

wmarler
Member
From: Denver, CO
Registered: 2015-04-18
Posts: 10

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

What's the SOW with regards to passthrough of USB audio devices? That was by far the easiest way I've found to get sound working without lag, but a) it doesn't mux audio from the guest and the host, and (more importantly) b) the audio is "crackly." I'm not sure where to pull debug data from to submit a bug report nor ... really where to submit a bug report anyway.

Also ... I'm open to suggestions! I think I saw one person with successful audio by "buying a different USB audio device," which I'm not opposed to, just want to try a few more things first.

I haven't really had good luck with PulseAudio (mostly because I'm not sure how to verify that the environment variables I'm exporting are being accepted by the vm when it starts; managing this machine using virt-manager).

Offline

#5812 2015-08-04 06:53:46

morphological
Member
Registered: 2015-08-01
Posts: 7

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

I am wondering if the UEFI GPU Passthrough method via OVMF would grant me more GPU and CPU performance in the VM, than the legacy variant with i915 and arbiter patch.
Are there any reports on that subject?

Last edited by morphological (2015-08-04 07:13:28)

Offline

#5813 2015-08-04 07:30:59

fushfush
Member
Registered: 2015-08-03
Posts: 2

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
fushfush wrote:

Hey Guys.

My current situations is this:

I got an W520 with an i7-2720QM and Nvidia Quadro 1000m. I want to virtualize with Debian as host and Windows as guest. Therefore i want to assign my Nvidia GPU to the guest.
The reason for this choice is because I'm an mechanical engineering student, and that requires alot of windows-only programs..
Thanks!

Assuming this is a laptop, there was no one, who got it working properly AFAIR. So you're pretty much stuck with windows. However, i find it strange you have a quadro in there...
I can't give you an advice, but i can link you the spreadsheet of hardware.

Thanks for for spreadsheet, and yes its a Quadro. Its a workstation laptop designed for CAD/FEM-work.. You're right about posting on an wrong forum, but arch seems to have much more knowledge about this topic then debian .. Another reason to try Arch.

Offline

#5814 2015-08-04 11:51:58

lersek
Member
Registered: 2015-03-15
Posts: 38

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

holovati wrote:
lersek wrote:

(They are defined by an XML Schema that targets the "http://libvirt.org/schemas/domain/qemu/1.0" namespace -- BTW do not click this link, it's just a string.)

The namespace link seems dead.

Oh geez, did you read what I wrote at all? I trimmed the quote now, to add more emphasis. The namespace URI is *just a string*, not something to retrieve from the network. This is explained in the wikipedia articles that I had linked, and I had also mentioned it in my comment; see above.

Offline

#5815 2015-08-04 14:55:53

Bronek
Member
From: London
Registered: 2014-02-14
Posts: 108

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

fushfush wrote:

Thanks for for spreadsheet, and yes its a Quadro. Its a workstation laptop designed for CAD/FEM-work.. You're right about posting on an wrong forum, but arch seems to have much more knowledge about this topic then debian .. Another reason to try Arch.

well I am afraid not for much longer. The main author of this functionality in both kernel and qemu is now gone from this thread, since he happens to be a RedHat developer and local moderators here told in no uncertain terms that this forum should be used for Arch related issues only.

Last edited by Bronek (2015-08-04 14:57:02)

Offline

#5816 2015-08-04 21:15:26

Samsonite
Banned

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

morphological wrote:

I am wondering if the UEFI GPU Passthrough method via OVMF would grant me more GPU and CPU performance in the VM, than the legacy variant with i915 and arbiter patch.
Are there any reports on that subject?

Hmm, from what i remember - there was no viable difference in Unigine Heaven 4.0 benchmark numbers.
Usually people come to OVMF when x-vga doesn't work, so that makes it difficult to test side-by-side.
Take the opportunity to be the first! I suppoose there may be slight CPU difference, but otherwise the numbers should be close.

lersek wrote:
holovati wrote:
lersek wrote:

(They are defined by an XML Schema that targets the "http://libvirt.org/schemas/domain/qemu/1.0" namespace -- BTW do not click this link, it's just a string.)

The namespace link seems dead.

Oh geez, did you read what I wrote at all? I trimmed the quote now, to add more emphasis. The namespace URI is *just a string*, not something to retrieve from the network. This is explained in the wikipedia articles that I had linked, and I had also mentioned it in my comment; see above.

Don't stress out, i see that guy for the first time there.
I've been successful in attaching the debug console, however i haven't compiled a test platform yet.
There seem to be some hardware failure of some sort on my machine, as windows 10 install with the latest OVMF build BSODs with some kernel-level errors. The nested virtualization toggle, suddenly, makes some difference, as with it enabled it crashes more often. Also, not only the setup, but the passed-through devices suddenly remain code-10'ed on some builds.
Is there some patching in process, like someone rewriting SMBus logic maybe or something?

OLD, maybe even pre-sourceforge-war builds work like a charm...

Last edited by Samsonite (2015-08-04 21:16:52)

#5817 2015-08-04 23:54:36

mauorrizze
Member
Registered: 2014-08-22
Posts: 18

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

jasonwryan wrote:

I see you aren't running Arch[...]

Dear Jason Wryan,
I hope you're joking, aren't you? I've got the deepest respect for this community and also your work you invest in moderation (and administration?) of this forum. I know there's the "Arch Linux distribution support ONLY" rule, but there's also the "Respect other distributions and operating systems" rule. I think it's correct to say with many problems, especially beginner's problems, that a mix of users from different linux distributions might complicate the solution and a separation is often usefull and yes, this forum here has archlinux in its domain name, logo and everywhere. Acknowledged.
BUT: this thread's topic is a power-user, enthusiast topic, involving several aspects of a linux system. Kernel modules, -parameters, lot of different software packets etc. There can't be a topic with this name in each distribution forum, because there aren't enough people with interest and knowledge. Instead, because the lack of another single forum that fits the whole package of this topic and nonetheless because Arch linux has been predestined for this kind of experiments in the beginning (quite current kernel, AUR), this forum HAPPEND to be the place where this thread EMERGED, many arch users joined the discussion more than two years ago and still in 2013, the first cross-distribution users joined, too. Some of them had questions, but some joined with deep knowledge, partially even involved in development, helping both arch- and non-arch-users.
If you strip the non-arch-part of this thread, you might kill not all, but most of its usefulness.

PLEASE rethink your decision of strict observation of this thread and banning non-arch-users. Because of this thread no harm was done besides violation of one rule of the etiquette and bruising some egos. Sure, violating the etiquette is more than nothing, but on the other hand this thread was very, very useful and unique. There's no guarantee that AW, Duelist and other power-contributors would return/stay, but we can at least try.

If you want to close this thread I'd hope we could find a way to revive it somewhere else, but apart from the question if you'd export all posts for us, I'd no idea where. I or someone else could host a specific forum, but I have my doubts enough users would find it/register/follow. Google for KVM VGA and if you resist clicking "kvm switches", you're directed here.

P.S: You can't ban me because for not being an arch user, because I am. Longterm. But you're free to ban me for having offended you in any way. Gonna make it easy by reporting your comments in this thread, propably to yourself big_smile , but, well, I really don't understand the sudden and non-comprehensible events, more than two years after the creation of this helpful and productive thread.

Regards, an irritated arch user

Offline

#5818 2015-08-05 00:08:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,690

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Allow me to clarify a few things.  First, this topic has been discussed by the moderation team.  It is not just one of us taking action.
We do welcome everyone on the forums, regardless of whether they do, or do not use Arch Linux.  At issue is that these are support forums for Arch Linux, and it is our goal to have them be the canonical reference for Arch.  We have nothing against other distributions and we wish them well, but having specific support information that is appropriate for non Arch distributions that is not applicable to Arch is inconsistent with our published policies.

There has been no talk about closing or deleting this thread amongst the moderators.

https://wiki.archlinux.org/index.php/Fo … pport_ONLY
https://wiki.archlinux.org/index.php/Fo … _the_staff

Can we try to pull this back on track as it applies to Arch Linux?

Edit:  mauorrizze, I did see your report, but not until after I posted this message.

Last edited by ewaller (2015-08-05 00:11:19)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5819 2015-08-05 10:44:52

Nesousx
Member
Registered: 2012-03-27
Posts: 46
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hi everyone,

I have a working vga passthrough setup and I'd like to switch from gummiboot to grub. My "stupid" Asrock motheboard has a button that "clears" the bios on the I/O shield. If I press it while trying to a plug a cable it'll erase the bios config, and I have to reinstall gummibit via a LiveCD... which is boring !

My setup is : IGD for host, and an Nvidia GTX card for my guest VM.

I installed grub and it works as expected : it loads my os with the required kernel. However,

However, as soon as I add the  "intel_iommu=on" to GRUB_CMDLINE_LINUX in /etc/default/grub and regenerate config file, then my system stops booting right after grub. I have a weird screen similar to this one : http://lists.linuxfoundation.org/piperm … t-0001.jpg. The problem seems to be like this guy here: http://lists.linuxfoundation.org/piperm … 08805.html

I tried each of the following :

GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_off"
GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_on"
GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_off vfio_iommu_type msi=1 pci-stub.ids=10de:13c2,10de:0fbb,00:1d.0"

Nothing worked.

Right now it works fine with gummiboot and the following "boot line", in  /boot/loader/entries/vfio.conf :

options root=/dev/sda2 rw intel_iommu=on,igfx_off vfio_iommu_type msi=1 pci-stub.ids=10de:13c2,10de:0fbb,00:1d.0

I'd glad to hear any thought on this. Thanks in advance.

Last edited by Nesousx (2015-08-05 12:26:58)

Offline

#5820 2015-08-05 14:16:15

Ecliptual
Guest

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Nesousx wrote:

Hi everyone,

I have a working vga passthrough setup and I'd like to switch from gummiboot to grub. My "stupid" Asrock motheboard has a button that "clears" the bios on the I/O shield. If I press it while trying to a plug a cable it'll erase the bios config, and I have to reinstall gummibit via a LiveCD... which is boring !

My setup is : IGD for host, and an Nvidia GTX card for my guest VM.

I installed grub and it works as expected : it loads my os with the required kernel. However,

However, as soon as I add the  "intel_iommu=on" to GRUB_CMDLINE_LINUX in /etc/default/grub and regenerate config file, then my system stops booting right after grub. I have a weird screen similar to this one : http://lists.linuxfoundation.org/piperm … t-0001.jpg. The problem seems to be like this guy here: http://lists.linuxfoundation.org/piperm … 08805.html

I tried each of the following :

GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_off"
GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_on"
GRUB_CMDLINE_LINUX="intel_iommu=on, igfx_off vfio_iommu_type msi=1 pci-stub.ids=10de:13c2,10de:0fbb,00:1d.0"

Nothing worked.

Right now it works fine with gummiboot and the following "boot line", in  /boot/loader/entries/vfio.conf :

options root=/dev/sda2 rw intel_iommu=on,igfx_off vfio_iommu_type msi=1 pci-stub.ids=10de:13c2,10de:0fbb,00:1d.0

I'd glad to hear any thought on this. Thanks in advance.

First of all, "vfio_iommu_type" isn't a valid parameter to begin with.
Make sure you don't need the i915 vgaarb patch.
Which screen outputs this mess? The IGD one or GPU one?
Seems like you've got it working only on EFI-boot without CSM, am i right?
Also, you say it works "fine" with the gummiboot and igfx_off - you're using the system as a headless host?


ewaller wrote:

but having specific support information that is appropriate for non Arch distributions that is not applicable to Arch is inconsistent with our published policies.

The only distro-specific information is, obviously, kernel patches and boot loaders. I may not remember everything, but one of the things arch users have different is OVMF git builds - there's an AUR package for that, afair. Most of distro-specific information is easily adapted for arch.

ewaller wrote:

There has been no talk about closing or deleting this thread amongst the moderators.
https://wiki.archlinux.org/index.php/Fo … pport_ONLY
https://wiki.archlinux.org/index.php/Fo … _the_staff
Can we try to pull this back on track as it applies to Arch Linux?

Nice to see that this wasn't one man's decision.
I've thought about collaborating with nbhs in order to close & move this thread to another forum, but i think no one would like this.
I don't know about aw, but I am staying here. Even if i'll have to hide from you all thoroughly.
For everyone.
I just don't understand the idea of saying "arch only" to non-arch helpers. What i should do to follow that policy? Install arch? I mean, i've helped(or tried to help) to arch, gentoo, fedora and ubuntu users, to me they're no different. Moreover, most people don't even specify their distro at all...

Last edited by Ecliptual (2015-08-05 14:17:08)

#5821 2015-08-05 14:35:14

Nesousx
Member
Registered: 2012-03-27
Posts: 46
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Thanks for your reply Ecliptual.

I thought that with latest kernels, (can't remember which version, 4.1 I believe) which is the one I am using iirc, I no longer needed arbiter patch. Because indeed, it looks like the problem is coming from here since I am using IGD on host and with a "head" setup, so it is the IGD that messes.

I am booting full EFI as far as I understand it, but I have no clue about the CSM thing.

Finally, I'll look on the vfio_iommu_tpe thing and remove it if it is not valid.

Offline

#5822 2015-08-05 14:43:20

Ecliptual
Guest

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Nesousx wrote:

I am booting full EFI as far as I understand it, but I have no clue about the CSM thing.

That's easy to check.
0. The UEFI setup menu should be clear to understand, try checking there.
1. MBR entries won't be there. So if you don't have an ESP - you won't be able to boot. You're using gummiboot, so i assume you do have a valid ESP with the EFI loader in there.
2. I think /dev/vga_arbiter doesn't exist on systems booted without VGA present.
3. check lspci for these VGA memory and port IO ranges. They may not be present on a pure efi system.

        Region 0: Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Region 2: Memory at fe300000 (64-bit, non-prefetchable) [size=256K]
        Region 4: I/O ports at e000 [size=256]

Actually, you spark my interest...

#5823 2015-08-05 22:10:26

Nesousx
Member
Registered: 2012-03-27
Posts: 46
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Ecliptual wrote:
Nesousx wrote:

I am booting full EFI as far as I understand it, but I have no clue about the CSM thing.

That's easy to check.
0. The UEFI setup menu should be clear to understand, try checking there.
1. MBR entries won't be there. So if you don't have an ESP - you won't be able to boot. You're using gummiboot, so i assume you do have a valid ESP with the EFI loader in there.
2. I think /dev/vga_arbiter doesn't exist on systems booted without VGA present.
3. check lspci for these VGA memory and port IO ranges. They may not be present on a pure efi system.

        Region 0: Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Region 2: Memory at fe300000 (64-bit, non-prefetchable) [size=256K]
        Region 4: I/O ports at e000 [size=256]

Actually, you spark my interest...

I'll be more than happy to answer your questions, however I need more explanation.

0. Not sure where to find this thing, I checked my bios in order to see if I could access some kind of UEFI shell, didn't find anything.
1. I also assume I have a valid ESP, I remember doing it when installing Arch for the first time. I have a fat boot partition with a /boot/EFI folder mounted there. I believe this is what you are talking about.
2. Does this help ?:

ls -l /dev/vga_arbiter 
crw------- 1 root root 10, 63  6 août  00:01 /dev/vga_arbiter

3.

lspci 
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1c.6 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 7 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Z77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
04:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57781 Gigabit Ethernet PCIe (rev 10)
05:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
	Subsystem: ASRock Incorporation Device 0152
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 37
	Region 0: Memory at f7400000 (64-bit, non-prefetchable) [size=4M]
	Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 4: I/O ports at f000 [size=64]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 8508
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at f6000000 (32-bit, non-prefetchable) [disabled] [size=16M]
	Region 1: Memory at e0000000 (64-bit, prefetchable) [disabled] [size=256M]
	Region 3: Memory at f0000000 (64-bit, prefetchable) [disabled] [size=32M]
	Region 5: I/O ports at e000 [disabled] [size=128]
	Expansion ROM at f7000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau

Offline

#5824 2015-08-05 22:37:04

FlatronEZ
Banned
Registered: 2015-08-05
Posts: 2

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hello,

I am new to this community and hope I don't do anything completely wrong here wink

So my problem is the "standard" Nvidia Error Code 43 problem.

First my setup:

Ubuntu 15.04
3.19.0-26-generic #27-Ubuntu SMP Tue Jul 28 18:27:31 UTC 2015
QEMU emulator version 2.2.0 (Debian 1:2.2+dfsg-5expubuntu9.3)

i7 4790k
Nvidia GTX 750 Ti (Palit) (in main PCIe slot)
MB: Gigabyte Z97X Gaming 7

I installed Windows 10 (64bit) as a guest operating system using virt-manager. The installation process worked fine and the OS is running. When I pass my Nvidia GTX 750 Ti to the guest and install the latest Nvidia Driver then the card get's recognized correctly but gives me error code 43 after the reboot.

So what I tried:

Adding "intel_iommu=on igfx_off" to my boot paramters aswell as manually adding "-kvm=off" to my virsh config with:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
[...]
  <qemu:commandline>
    <qemu:arg value='-kvm=off'/>
  </qemu:commandline>

which gave me this error: "qemu-system-x86_64: -kvm=off: invalid option"

Okay so for now I dont know what to try next... What can I try to get my card running?

Here is my virt-manager config:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Windows-10</name>
  <uuid>c7f056b0-fd21-4cfe-a050-dd23cdc40ef6</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static' current='1'>8</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-utopic'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='invpcid'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='erms'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='smep'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='abm'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='fma'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='fsgsbase'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='invtsc'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='avx2'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='bmi1'/>
    <feature policy='require' name='bmi2'/>
    <feature policy='require' name='pcid'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='movbe'/>
    <feature policy='require' name='rdrand'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/Windows-10.qcow2'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </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='usb' index='0' model='nec-xhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:56:38:04'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='cirrus' vram='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-kvm=off'/>
  </qemu:commandline>
</domain>

Let me know if you need more information!

Offline

#5825 2015-08-05 22:54:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 8,932
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

FlatronEZ wrote:

Hello,

I am new to this community and hope I don't do anything completely wrong here wink
First my setup:

Ubuntu 15.04
3.19.0-26-generic #27-Ubuntu SMP Tue Jul 28 18:27:31 UTC 2015
QEMU emulator version 2.2.0 (Debian 1:2.2+dfsg-5expubuntu9.3)

i7 4790k
Nvidia GTX 750 Ti (Palit) (in main PCIe slot)
MB: Gigabyte Z97X Gaming 7

Please ask on the Ubuntu support forums, we only support Arch here.

https://wiki.archlinux.org/index.php/Fo … pport_ONLY


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB