You are not logged in.

#2076 2014-06-11 21:29:13

mv0lnicky
Member
Registered: 2014-03-05
Posts: 16

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

aw wrote:
mv0lnicky wrote:

I'm surprised people can't verify for themselves since the first post mentions :

"NOTE: to get this working you'll need:

    AMD-VI/VT-D enabled and working."

To be fair, the kernel does like to lie and say things like "Intel-IOMMU: enabled" when actually all it's done is register that you've passed intel_iommu=on.  The actual telling line that nobody seems to get right when trying to prove that it's enabled is "PCI-DMA: Intel(R) Virtualization Technology for Directed I/O".

Do Intel K CPUs report the 'vmx' flag? [EDITED OUT: Don't want to confuse people]

Last edited by mv0lnicky (2014-06-11 21:33:51)

Offline

#2077 2014-06-11 21:29:57

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

mv0lnicky wrote:
aw wrote:
mv0lnicky wrote:

I'm surprised people can't verify for themselves since the first post mentions :

"NOTE: to get this working you'll need:

    AMD-VI/VT-D enabled and working."

To be fair, the kernel does like to lie and say things like "Intel-IOMMU: enabled" when actually all it's done is register that you've passed intel_iommu=on.  The actual telling line that nobody seems to get right when trying to prove that it's enabled is "PCI-DMA: Intel(R) Virtualization Technology for Directed I/O".

Do Intel K CPUs report the 'vmx' flag? If not, then it'd just be a matter of adding in the first post something like :

cat /proc/cpuinfo | grep 'vmx'

vmx != VT-d


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2078 2014-06-11 21:33:11

mv0lnicky
Member
Registered: 2014-03-05
Posts: 16

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

aw wrote:
mv0lnicky wrote:
aw wrote:

To be fair, the kernel does like to lie and say things like "Intel-IOMMU: enabled" when actually all it's done is register that you've passed intel_iommu=on.  The actual telling line that nobody seems to get right when trying to prove that it's enabled is "PCI-DMA: Intel(R) Virtualization Technology for Directed I/O".

Do Intel K CPUs report the 'vmx' flag? If not, then it'd just be a matter of adding in the first post something like :

cat /proc/cpuinfo | grep 'vmx'

vmx != VT-d

Oh you're right, it's for VT-x. So there's no cpu flag for VT-d.

Then I guess the only way really is:

dmesg | grep -i pci-dma

Offline

#2079 2014-06-12 00:45:20

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

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

aw wrote:
_pheinrich_ wrote:

CPU: i5 2500k
MB: Asus P8P67 EVO

Your CPU doesn't support VT-d - http://ark.intel.com/products/52210/Int … o-3_70-GHz

Thanks for playing

nbhs, maybe you could add a link to ark on the first post, we're getting this a lot.

Sure

Offline

#2080 2014-06-12 06:10:00

sinny
Member
Registered: 2014-05-24
Posts: 75

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

ttouch wrote:
mv0lnicky wrote:
ttouch wrote:

Umm, qemu adds an outer frame.
I change the resolution to 1920x1080, but the outer black frame remains. any advice? :)

You mean like underscan?

Yes.

i'm getting this as well.
my setup is one monitor (benq g2420hd) with connected:
- DVI : host (fedora 20, i7-4770 IGP)
- HDMI : guest (win 7, radeon HD 6450)

i just switch displayed input on monitor when needed.
host video (DVI) works just fine - native 1920x1080, no problems at all
but when i switch to guest video (HDMI) using 1920x1080 - i get pretty large black frame visible on the screen. so far, i "solved" it by decreasing screen resolution in guest

but if there is some sort of solution (e.g. it is not a problem with the monitor not being able to handle dual input correctly) - that would be great

Last edited by sinny (2014-06-12 06:10:24)

Offline

#2081 2014-06-12 06:40:33

_pheinrich_
Member
Registered: 2014-05-26
Posts: 53

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

Yes you are right ... I should have seen that my cpu supports VT-x only.

So if I take a http://ark.intel.com/products/52209/Int … o-3_70-GHz without that stupid --->K<--- I might have success?

Does anybody have experience with my MB (Asus P8P67 EVO) or do I get trouble with that too?

Offline

#2082 2014-06-12 09:00:22

blitzschlag
Member
Registered: 2013-10-30
Posts: 11

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

_pheinrich_ wrote:

Does anybody have experience with my MB (Asus P8P67 EVO) or do I get trouble with that too?

hey,
have a look at

https://docs.google.com/spreadsheet/ccc … _web#gid=0

maybe its in there (haven't checked myself).

that would actually be a good mention in the opening Post aswell *hinthint*

big_smile

keep up the good work guys

Offline

#2083 2014-06-12 13:38:38

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

_pheinrich_ wrote:

Yes you are right ... I should have seen that my cpu supports VT-x only.

So if I take a http://ark.intel.com/products/52209/Int … o-3_70-GHz without that stupid --->K<--- I might have success?

Does anybody have experience with my MB (Asus P8P67 EVO) or do I get trouble with that too?

It's probably fine, I have a similar generation P8H67-M PRO/CSM that works well with i5-3470T.  Host uses the Intel HD graphics with GT635 and HD8570 for guests.  If you have a rev 01 ASMedia PCI bridge you can pretty much write off the conventional PCI slots as useless, but that's true regardless of device assignment.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2084 2014-06-12 14:36:14

abdullah
Member
Registered: 2014-06-10
Posts: 34

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

If you don't ask you won't know,
How do apply the " i915: Add module option to support VGA arbiter on HD devices " patch ?

Never mind,

https://bbs.archlinux.org/search.php?ac … r_id=82136

Last edited by abdullah (2014-06-12 14:42:05)

Offline

#2085 2014-06-12 16:23:49

Torello
Member
Registered: 2014-04-01
Posts: 6

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

Hello, somehow I'm unable to pass any usb device to guest.

My start script is:

qemu-system-x86_64 -enable-kvm -M q35 -m 16384 -cpu Haswell \
-smp 8,sockets=1,cores=4,threads=2 \
-vga none \
-rtc clock=host \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-device virtio-scsi-pci,id=scsi \
-drive if=virtio,file=/home/user/virt_images/win7_meta.qcow2,format=qcow2,cache=none \
-drive file=/home/user/distr/gparted.iso,id=isocd -device ide-cd,bus=ide.0,drive=isocd \
-boot menu=on \
-device qxl

I have ich9 "Usb controllers" in device manager, and seems they are working fine( no any marks about errors in device manager ).

If I add, for example,
"-usb -device usb-host,hostbus=1,hostaddr=10 \"
I have got additonally 4 unknown devices( ICH9 2934, ICH9 2935 and so on ), each of them is ich9 usb host controller too.
This devices has a windows error 29 - "No drivers installed for device".
And Windows can't install a drivers for this controllers.
Do you have any suggestions how to fix that issue?

That's how device manager looks like:

Device Manager

Offline

#2086 2014-06-12 18:41:29

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

Just to give kudos where due, I finally got around to booting my Gigabyte GA-990FXA-UD3 system today and it allows full configuration of the initial display, letting me select PCI/PEG/PEG1/PEG2/PEG3 for the init display.  The only thing it won't let me select are the x1 slots.  I peeked at their latest, greatest Intel board manual (GA-Z97X-SOC) and it appears to offer the same, IGD, any one of the x16 slots, or PCI (BTW, the manual also has a great slot layout diagram for those confused about x16 vs x8 vs x4, PEG vs PCH, and DMI).  Asus hasn't really done anything to make me a loyal customer lately, so I may be looking to Gigabyte for my next board.  Please pardon this commercial interruption wink

Last edited by aw (2014-06-12 18:52:09)


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2087 2014-06-12 19:06:21

siddharta
Member
Registered: 2014-05-03
Posts: 30

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

aw wrote:

Just to give kudos where due,
...
Asus hasn't really done anything to make me a loyal customer lately, so I may be looking to Gigabyte for my next board.  Please pardon this commercial interruption wink

Interesting. I've been using Asrock boards mostly as their BIOS seems to do well for VT-x/VT-d unlike some Asus boards I have here. Is Gigabyte consistent in that respect? The Asrock boards are overall not too bad but a bit on the flimsy side, they bend if you look at them the wrong way.

Offline

#2088 2014-06-12 19:16:27

flack
Member
Registered: 2014-06-12
Posts: 7

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

Torello wrote:

Hello, somehow I'm unable to pass any usb device to guest.

My start script is:

qemu-system-x86_64 -enable-kvm -M q35 -m 16384 -cpu Haswell \
-smp 8,sockets=1,cores=4,threads=2 \
-vga none \
-rtc clock=host \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-device virtio-scsi-pci,id=scsi \
-drive if=virtio,file=/home/user/virt_images/win7_meta.qcow2,format=qcow2,cache=none \
-drive file=/home/user/distr/gparted.iso,id=isocd -device ide-cd,bus=ide.0,drive=isocd \
-boot menu=on \
-device qxl

...

Hi I am here new in forum. Why you dont use somethink like this. In lsusb you can find your device vendorID and productID.

back@KVM-Ubuntu:~$ lsusb
Bus 002 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 003: ID 9710:7830 MosChip Semiconductor MCS7830 10/100 Mbps Ethernet adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 13ba:0018 PCPlay Barcode PCP-BCG4209
Bus 005 Device 002: ID 2109:0811  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04b3:310b IBM Corp. Red Wheel Mouse

my mouse is 04b3:310b then i add this parameter to qemu.

-usb -usbdevice host:04b3:310b

Last edited by flack (2014-06-12 19:32:04)

Offline

#2089 2014-06-12 19:20:30

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

siddharta wrote:
aw wrote:

Just to give kudos where due,
...
Asus hasn't really done anything to make me a loyal customer lately, so I may be looking to Gigabyte for my next board.  Please pardon this commercial interruption wink

Interesting. I've been using Asrock boards mostly as their BIOS seems to do well for VT-x/VT-d unlike some Asus boards I have here. Is Gigabyte consistent in that respect? The Asrock boards are overall not too bad but a bit on the flimsy side, they bend if you look at them the wrong way.

Asrock got on my personal sh*t list when I was searching for an AMD-Vi system several years ago.  When I sent a support request trying to figure out if their IOMMU option in the BIOS was actually enabling AMD-Vi or simply added a hole in memory for using a GART as an IOMMU.  They gave me a non-answer referring me back to the manual and the exact BIOS option I was asking about, then volunteered that Asrock does not support Linux (I guess based on my OS selection or browser agent).  I ended up with this Gigabyte board instead.  There seem to be plenty of success stories with Asrock, so I guess they work.  I can't speak to consistency on Gigabyte boards.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2090 2014-06-12 19:29:56

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

mv0lnicky wrote:
aw wrote:
mv0lnicky wrote:

Do Intel K CPUs report the 'vmx' flag? If not, then it'd just be a matter of adding in the first post something like :

cat /proc/cpuinfo | grep 'vmx'

vmx != VT-d

Oh you're right, it's for VT-x. So there's no cpu flag for VT-d.

Then I guess the only way really is:

dmesg | grep -i pci-dma

Then you may run into this:

PCI-DMA: Using software bounce buffering for IO (SWIOTLB)

http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2091 2014-06-13 07:56:11

Torello
Member
Registered: 2014-04-01
Posts: 6

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

flack wrote:
Torello wrote:

Hello, somehow I'm unable to pass any usb device to guest.
My start script is:
...

Hi I am here new in forum. Why you dont use somethink like this. In lsusb you can find your device vendorID and productID.

back@KVM-Ubuntu:~$ lsusb
Bus 002 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 003: ID 9710:7830 MosChip Semiconductor MCS7830 10/100 Mbps Ethernet adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 13ba:0018 PCPlay Barcode PCP-BCG4209
Bus 005 Device 002: ID 2109:0811  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04b3:310b IBM Corp. Red Wheel Mouse

my mouse is 04b3:310b then i add this parameter to qemu.

-usb -usbdevice host:04b3:310b

Thanks for help, but it doesn't work, I have same issue with your suggestion ( 4 unknown-device usb host controllers in device-manager ).

Last edited by Torello (2014-06-13 07:57:10)

Offline

#2092 2014-06-13 09:05:45

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

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

flack wrote:

Hi I am here new in forum. Why you dont use somethink like this. In lsusb you can find your device vendorID and productID.

back@KVM-Ubuntu:~$ lsusb
Bus 002 Device 004: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 003: ID 9710:7830 MosChip Semiconductor MCS7830 10/100 Mbps Ethernet adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 13ba:0018 PCPlay Barcode PCP-BCG4209
Bus 005 Device 002: ID 2109:0811  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04b3:310b IBM Corp. Red Wheel Mouse

my mouse is 04b3:310b then i add this parameter to qemu.

-usb -usbdevice host:04b3:310b

I pass both my mouse and keyboard to VM in the same way as you, it's very robust. But if you want to use host keyboard at the same time, you need a second one with a different device ID (this probably means different model or vendor). For me it does not matter, I only ssh to host anyway (when running a VM).

I wonder if a USB hub can be passed through this way (taking with it all the attached devices), didn't have time to check yet. Even better if this also worked for USB3.0 hub ...

Offline

#2093 2014-06-13 11:47:32

mbroemme
Member
From: Cologne
Registered: 2014-02-05
Posts: 40

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

aw wrote:

Just to give kudos where due, I finally got around to booting my Gigabyte GA-990FXA-UD3 system today and it allows full configuration of the initial display, letting me select PCI/PEG/PEG1/PEG2/PEG3 for the init display.  The only thing it won't let me select are the x1 slots.

It is the same board I use and works really great with IOMMU and device passthrough. It is very stable solution from my point of view, except for the reset problem of R9 290X but all other devices I used for passthrough works like a charme.

Offline

#2094 2014-06-13 12:21:21

Midov
Member
Registered: 2013-10-22
Posts: 9

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

sinny wrote:
ttouch wrote:
mv0lnicky wrote:

You mean like underscan?

Yes.

i'm getting this as well.
my setup is one monitor (benq g2420hd) with connected:
- DVI : host (fedora 20, i7-4770 IGP)
- HDMI : guest (win 7, radeon HD 6450)

i just switch displayed input on monitor when needed.
host video (DVI) works just fine - native 1920x1080, no problems at all
but when i switch to guest video (HDMI) using 1920x1080 - i get pretty large black frame visible on the screen. so far, i "solved" it by decreasing screen resolution in guest

but if there is some sort of solution (e.g. it is not a problem with the monitor not being able to handle dual input correctly) - that would be great

I had exactly same problem with my Geforce 660 over HDMI when i installed newest drivers (version 337.88) in client.
It went away after i deleted those drivers and installed older ones (version 335 i belive) and now its working in full screen without that anoying black frame around it.
It was also working without any problems when i used default drivers that windows (win8) found on its own.

Offline

#2095 2014-06-13 13:47:58

vais
Member
Registered: 2014-06-07
Posts: 2

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

Hello everyone!

This is a great thread and using it and a few other sources I too was able to get VFIO VGA passthrough working on Fedora 20.
My specs:

MB: Asrock Z97 Extreme4
CPU: Intel i5-4570
Host GPU: IGP HD 4600
Passed GPU: Radeon R9 270x

Qemu: 2.0.0-6 (from fedora-virt-preview, no patches)
Kernel: 12.5 (patched)

The only way I got it working was to use an already built kernel (thanks Stewart!) with the necessary patches applied - however this kernel is 3.12.5, which is now rather old and I would like to update it.
The issue is I was unable to apply the patch myself (and build the RPM) successfully.
I am trying to build a 3.15.rc8 (3.15.0.1 came out today in the repo, so I will switch to that) and tried all kinds of combinations of patches - none worked

In the end I believe all I need is the VGA arbiter patch: https://lkml.org/lkml/2014/5/9/517 but the host graphics issue persists.

Are there any other patches for the VGA arb that need to be applied too?
If anyone with a similar config, and running Fedora, has a working 3.15 kernel could you list the patches used?
Also sharing the binaries will be appreciated  smile

EDIT: Something that doesn't seem right - all modules of my built kernel (3.15.0-0.rc8.git2.1) are compressed - i915.ko.xz for example, while on the working kernel (3.12.5) they are not.
Has anything change in the kernel structure or I am doing something very wrong while building the RPM?

P.S. I use simply

rpmbuild -ba ./kernel.spec

Last edited by vais (2014-06-13 13:59:16)

Offline

#2096 2014-06-13 14:19:54

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

vais wrote:

In the end I believe all I need is the VGA arbiter patch: https://lkml.org/lkml/2014/5/9/517 but the host graphics issue persists.

Using this version of the patch, make sue you boot with i915.enable_hd_vgaarb=1


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2097 2014-06-13 19:47:33

setedivento
Member
Registered: 2014-06-08
Posts: 3

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

aw wrote:
setedivento wrote:

Hello everybody, really great topic, thanks!

If only I could make things work. I seemed so close... may anyone help?
I am trying to vga passthrough an Nvidia Quadro 4000 on a Kubuntu 14.04 host machine. Reports indicate more than one here has coped, on Ubuntu based distros, so I've decided to ask.

Full stop, you have a Quadro card and while it's not the version that NVIDIA supports for device assignment, it's hopefully close enough.  Forget about Q35, -vga none, and x-vga=on, Quadro doesn't need any of that.  Just add it to the VM as you would any other assigned device, you can even use virt-manager for it.  Install using the emulated VGA.  When you install the NVIDIA driver stack, the emulated VGA will be disabled and you'll automatically switch over to the Quadro card.  We intend to support K-series Quadros on RHEL7 using this mode, but those cards are also known not to work with x-vga=on.  K-series cards are Kepler based and yours I believe is Fermi based.  Those are only one generation apart, so it will hopefully work.  For others out there hoping their cheapy Quadro NVS cards can work like this, don't bet on it.

EDIT: The audio device on K-series Quadro is also known not to work and will not be supported for assignment on RHEL7.  Try it, but expect it not to work.  Just bind it to pci-stub and forget it's there.


woa, that's great to hear, thanks aw! (and sorry for the delay in answering, always busy with work)

may I just have a quick hint? how do I correctly add the device using the qemu-system-x86_64 CLI?
I have bound the card to the ioh3420 PCI bus as per OP guidelines (and of course removed the 'x-vga=on','vga-none' and '-M q35' arguments);
but then when I start Windows, install the nvidia drivers and launch the nvidia control panel, the latter tells me 'you are not currently using a display attached to an NVIDIA GPU' (there's no switch from the emulated VGA to the passed through card).
I quite don't have my ideas that clear, too, about how to instruct qemu to make the guest OS think the passed through graphic card is connected to the display... Especially in terms of what happens behind the scenes: if the display in qemu is somehow a device/device driver one can interact with or not....(sorry for the confusion, as I said I am a little newbie)...
virt-manager gave me the error described here:
https://bugs.launchpad.net/ubuntu/+sour … /+activity
(both with and without the device being claimed by pci-stub)
and even when I successfully applied the relative workaround, it stayed an hour or so to launch the install process after I had configured the emulated hardware, before I decided to quit it.
I did not search for its log because in general, maybe it's more advisable for me to use a lower level tool, that forces me into better learning what exactly I am doing.

thanks again for your precious help!

Offline

#2098 2014-06-13 20:00:37

aw
Member
Registered: 2013-10-04
Posts: 921
Website

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

setedivento wrote:
aw wrote:
setedivento wrote:

Hello everybody, really great topic, thanks!

If only I could make things work. I seemed so close... may anyone help?
I am trying to vga passthrough an Nvidia Quadro 4000 on a Kubuntu 14.04 host machine. Reports indicate more than one here has coped, on Ubuntu based distros, so I've decided to ask.

Full stop, you have a Quadro card and while it's not the version that NVIDIA supports for device assignment, it's hopefully close enough.  Forget about Q35, -vga none, and x-vga=on, Quadro doesn't need any of that.  Just add it to the VM as you would any other assigned device, you can even use virt-manager for it.  Install using the emulated VGA.  When you install the NVIDIA driver stack, the emulated VGA will be disabled and you'll automatically switch over to the Quadro card.  We intend to support K-series Quadros on RHEL7 using this mode, but those cards are also known not to work with x-vga=on.  K-series cards are Kepler based and yours I believe is Fermi based.  Those are only one generation apart, so it will hopefully work.  For others out there hoping their cheapy Quadro NVS cards can work like this, don't bet on it.

EDIT: The audio device on K-series Quadro is also known not to work and will not be supported for assignment on RHEL7.  Try it, but expect it not to work.  Just bind it to pci-stub and forget it's there.


woa, that's great to hear, thanks aw! (and sorry for the delay in answering, always busy with work)

may I just have a quick hint? how do I correctly add the device using the qemu-system-x86_64 CLI?
I have bound the card to the ioh3420 PCI bus as per OP guidelines (and of course removed the 'x-vga=on','vga-none' and '-M q35' arguments);
but then when I start Windows, install the nvidia drivers and launch the nvidia control panel, the latter tells me 'you are not currently using a display attached to an NVIDIA GPU' (there's no switch from the emulated VGA to the passed through card).
I quite don't have my ideas that clear, too, about how to instruct qemu to make the guest OS think the passed through graphic card is connected to the display... Especially in terms of what happens behind the scenes: if the display in qemu is somehow a device/device driver one can interact with or not....(sorry for the confusion, as I said I am a little newbie)...
virt-manager gave me the error described here:
https://bugs.launchpad.net/ubuntu/+sour … /+activity
(both with and without the device being claimed by pci-stub)
and even when I successfully applied the relative workaround, it stayed an hour or so to launch the install process after I had configured the emulated hardware, before I decided to quit it.
I did not search for its log because in general, maybe it's more advisable for me to use a lower level tool, that forces me into better learning what exactly I am doing.

thanks again for your precious help!

If this card works like the K-series Quadros, then ignore the OP in this thread entirely.  ioh3420 is a component of q35, don't use it.  The qemu CLI for adding the GPU is simply:

-device vfio-pci,host=1:00.0

(replace with your device address as appropriate)  Also, be sure that you're installing the Quadro driver, not the standard GeForce driver.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2099 2014-06-13 21:32:02

setedivento
Member
Registered: 2014-06-08
Posts: 3

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

thanks, I will try that and report here the results, if of any use... smile

Offline

#2100 2014-06-14 05:17:32

rabcor
Banned
Registered: 2013-02-09
Posts: 500

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

I'm having a bit of a problem with partition sharing. I'll make this short, I tried to follow this here once with virtualbox and I do not remember how exactly it ended, just that it did not end in any sort of success. So this time I would like to get some help. Here is the partition setup I need to pass through.

/dev/sda (MBR = Bootmgr on /dev/sda1)
/dev/sda1 = System Reserved partition (windows's bootloader)
/dev/sda2 = Windows 7's C:/ partition
/dev/sda3 = Arch Linux (Host)

I've got /dev/sda3's grub installed into the MBR of /dev/sdc (meaning booting /dev/sdc will boot me into my arch linux install, booting /dev/sda will boot me into windows)

I need to passthrough /dev/sda1, /dev/sda2 and preferably /dev/sda's MBR as well (but I don't mind using another method to make it boot as long as /dev/sda1 and /dev/sda2 are passed through)

How exactly should I proceed?

Additionally I have a GPT, NTFS partition on /dev/sdb2 that I want to be easily accessible from both the host and my guest at the same time (I want to share it between both systems) how do I do that too?

Last edited by rabcor (2014-06-14 05:20:49)

Offline

Board footer

Powered by FluxBB