You are not logged in.

#3101 2014-10-30 14:59:12

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

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

Duelist wrote:
aw wrote:

And I keep dis-recommending Q35, it's not needed for Windows guests

Can you write a somewhat detailed answer about the reason why Q35 is bad? Or is it covered in your speech(which i haven't watched yet)?

Q35 isn't necessarily bad, but it adds more complication for typically no gain.  The default AHCI controller in the Q35 model has typically been horrible, both in performance and integrity.  The PCIe topology becomes a problem for anyone wanting to migrate to libvirt because libvirt support for Q35 is very restrictive, which necessitates using of <qemu:commandline> blocks, which makes libvirt unaware of the assigned devices, which causes it to not setup file permissions and memory limits, etc.  We also seem to have some unresolved Code 12 issues on Q35, for instance I cannot get a Quadro card to work on Q35 even though nvidia supports Quadro as a secondary device in a VM.  I also wouldn't be surprised if there's some relation to Q35 for the Radeon BSODs.

Maybe the better question is what do you gain from Q35?  Theoretically you gain access to extended PCI config space in the guest, but what does that get you?

There are cases with Linux guests where drivers blindly assume topology and may oops when a root port isn't present.  Those cases certainly justify using Q35 today.

Someday Q35, or it's successor, will be a better option than 440FX for Windows guests, but I don't believe that day is today.


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

#3102 2014-10-30 19:17:24

4kGamer
Member
Registered: 2014-10-29
Posts: 88

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

Awesome! thanks a lot for your help Alex! I can confirm that the brand new MSI GTX 980 Gaming has been successfully passed through Windows 8.1 with the latest NVidia drivers!

Now, I will try to install it with virtio.

One question: do you recommend the use of libvirt for performance reasons? If so, is it enough to simply install it??

Offline

#3103 2014-10-30 20:10:32

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

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

4kGamer wrote:

Awesome! thanks a lot for your help Alex! I can confirm that the brand new MSI GTX 980 Gaming has been successfully passed through Windows 8.1 with the latest NVidia drivers!

Now, I will try to install it with virtio.

One question: do you recommend the use of libvirt for performance reasons? If so, is it enough to simply install it??

libvirt makes some aspects of performance tuning easier, especially things like vCPU pinning, network configuration, and device tuning options, but it's not required.  If you use VGA assignment you also need to deal with the lack of support for the x-vga option, which often leads people to use <qemu:commandline> blocks that hide the device assignment from libvirt and make lots of things more difficult.  I recommend instead using a wrapper script around qemu to insert the option (I provided a link to some redhat documentation that could be adapted for this a while ago).  The even better option is to use OVMF, which seems like it should be possible for you since you're running Win8.1 and have a new video card.  There are no libvirt hacks required for GPU assignment with OVMF (but you do need very new libvirt).

libvirt needs to manage the VM, so it's a bit more than simply installing it, you'll need to create/import the VM to work from libvirt.  virt-manager is a reasonable tool to get started for that, but for advanced tuning you'll likely need to edit the xml and refer to the excellent documentation on the libvirt website.  My blog below hopefully also has some useful examples.


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

#3104 2014-10-31 01:10:19

Child_of_Sun
Member
Registered: 2014-07-16
Posts: 8

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

Hi @all

I have managed to passthrough my Primary Graphic Card (And the Secondary for CrossfireX).

I use a custom initramfs with a custom init script, which means that i don't know if it's important to setup this during boot.

My Computer:
CPU: Amd FX-8350
Mainboard: Asrock 970 Extreme4
Primary Graphics: PowerColor PCS+ HD7770 GHz Edition 1GB GDDR5      (vfio-pci, Windows)
Secondary Graphics: PowerColor HD7770 GHz Edition 1GB GDDR5 (V2?)  (vfio-pci, Windows)
Tertiary Graphics: PowerColor HD7750 1GB GDDR5                                     (Linux Host)
Memory: 16 GB Transcend 1333MHz Memory
Power Supply: Thermaltake Berlin 630W

I use Gentoo Linux ~amd64 with kernel 3.18.0-rc2 (Because of the OverlayFS :-), should work with 3.17.1 too) and Qemu-2.1.2 with Seabios-1.7.5 (Release)

My Kernel cmdline is:

root=/dev/mapper/root rootfstype=btrfs rw iommu=pt video=radeondrmfb:1280x1024-24@75,mtrr:3,pmipal,ywrap kvm.ignore_msrs=1 vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1b21:1042,1002:4383,1002:4391,1002:4393,1002:439c vfio-bind=0000:02:00.0,0000:02:00.1,0000:01:00.0,0000:01:00.1,0000:00:14.2,0000:00:11.0,0000:04:00.0,0000:05:00.0 hugepagesz=1GB fbcon=map:1

The vfio-bind Option is parsed by the custom init in my initramfs.

At boot i bind the devices (Like mentioned here) to the pci-stub driver, later to the vfio-pci driver. The Essential Lines from my init for this Proces are:

/sbin/vfio-bind "${vfiobond}"
echo 0000:03:00.1 > /sys/bus/pci/devices/0000:03:00.1/driver/unbind # The Amd Audio device binds to pci-stub, since it has the same ids at the 7750 and the 7770, this fix this Problem.
modprobe radeon # Here i Load the radeon kernel module for the framebuffer
sleep 4 # Wait a little bit to be sure everything has enough time to switch
echo 1 > /sys/bus/pci/drivers/vfio-pci/0000:01:00.0/remove # Here i remove the Primary adapter from the PCI bus
echo 1 > /sys/bus/pci/drivers/vfio-pci/0000:01:00.1/remove
echo 1 > /sys/bus/pci/rescan # Here i rescan the Pci-Bus for new devices, it find the Primary radeon and binds it automatically to the vfio-pci driver

The Last three Lines are Essential for this to work, with this config i can restart the VM, install newer Graphics Drivers, Play 3D Games (Elder Scrolls Online at the moment :-) ).

I use the rombios=/path/to/bios/file Option for the Primary Card, don't know if it is essential.

At Last here is the Qemu Startup Line from my script:


until /usr/bin/sudo /usr/bin/nice -n 10 /usr/bin/qemu-system-x86_64 -M q35 -enable-kvm -monitor stdio -nographic -balloon none -mem-path /dev/hugepages -mem-prealloc \
-m 10240 -k de -cpu host -smp 8,sockets=1,cores=8,threads=1 -bios /usr/share/qemu/bios.bin-1.7.5 -realtime mlock=on \
-vga none -D /var/log/qemu-out.log -boot menu=on -usb -usbdevice host:046d:c517 -usbdevice host:093a:2510 \
-device vfio-pci,host=00:11.0,bus=pcie.0,addr=1c.0,multifunction=on,bootindex=0 \
-device vfio-pci,host=00:14.2,bus=pcie.0,addr=1c.1,multifunction=on \
-device ioh3420,bus=pcie.0,addr=1c.2,multifunction=on,port=1,chassis=2,id=root.0 \
-device ioh3420,bus=pcie.0,addr=1c.3,multifunction=on,port=2,chassis=3,id=root.1 \
-device nec-usb-xhci,multifunction=on,addr=1c.4,bus=pcie.0,id=usb3 \
-device vfio-pci,host=01:00.0,bus=root.0,addr=00.0,multifunction=on,romfile=/etc/qemu/vbios/Powercolor.HD7770.1024.120418.rom,x-vga=on \
-device vfio-pci,host=01:00.1,bus=pcie.0,multifunction=on \
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=02:00.1,bus=pcie.0,multifunction=on \
-device vfio-pci,host=04:00.0,bus=pcie.0,addr=1c.6,multifunction=on \
-device vfio-pci,host=05:00.0,bus=pcie.0,addr=1c.7,multifunction=on \
-drive id=bitlocker_keys,file=/dev/loop0,if=none -device usb-storage,drive=bitlocker_keys,bus=usb3.0 \
-netdev type=tap,id=guest0,vhost=on,ifname="${IFACE}" -device virtio-net-pci,netdev=guest0,mac="${macaddr}" ${options} ; do
 echo "Qemu crashed with exit code $?.  Respawning.." >&2
    sleep 5
done

I hope it helps somebody who tries the same :-)

Last edited by Child_of_Sun (2014-11-01 00:11:24)

Offline

#3105 2014-10-31 01:14:50

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

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

Child_of_Sun wrote:

I use Gentoo Linux ~amd64 with kernel 3.18.0-rc2 (Because of the OverlayFS :-), should work with 3.17.1 too) and a Patched Qemu from here: https://github.com/awilliam/qemu-vfio/releases with Seabios-1.7.5 (Release)

Please don't use random tags (or even branches) from my tree.  My tags are for pull requests to upstream and not intended to be any kind of release for general consumption.


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

#3106 2014-10-31 07:48:13

winie
Member
Registered: 2014-03-01
Posts: 17

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

I have a dedicated monitor and keyboard and mouse for my windows guest.
i have a keyboard shortcut for starting the guest when its off.
is there a way that the host could ignore input from that mouse and keyboard except for that shortcut?
if not can you suggest other ideas so that each guest machine can be started from behind its dedicated desk and not interfere with host machine when its off?

Offline

#3107 2014-10-31 10:17:00

thearcherblog
Member
Registered: 2014-10-30
Posts: 165

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

Hello,

The kernel file looks like is not available anymore and when I try to patch my kernel I get some errors.

What I made:

Created a folder kernelbuild
Get into that folder
Downloaded kernel mainline: linux-3.18-rc2.tar.xz
Extract it with tar -xvJf linux-3.18-rc2.tar.xz
make mrproper (clean up (according to https://wiki.archlinux.org/index.php/Ke … ditional))
zcat /proc/config.gz > .config (to have a good .config (VIRTIO ENABLED)

Downloaded the patches from https://lkml.org/lkml/diff/2013/5/30/513/1 and https://lkml.org/lkml/diff/2014/5/9/517/1

Saved first one as i915.patch and i915.2.patch the second one.

Then the errors:

[root@arch linux-3.18-rc2]# patch -p1 < i915.patch
patching file Documentation/kernel-parameters.txt
Hunk #1 succeeded at 2725 with fuzz 1 (offset 376 lines).
patching file drivers/pci/quirks.c
Hunk #1 FAILED at 3292.
1 out of 1 hunk FAILED -- saving rejects to file drivers/pci/quirks.c.rej

[root@arch linux-3.18-rc2]# patch -p1 < i915.2.patch
patching file drivers/gpu/drm/i915/i915_dma.c
Hunk #1 succeeded at 1318 (offset 12 lines).
Hunk #2 succeeded at 1379 with fuzz 2.
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 FAILED at 2080.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/i915_params.c
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 152.
2 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_params.c.rej
patching file drivers/gpu/drm/i915/intel_display.c
Hunk #1 succeeded at 12936 (offset 1652 lines).
Hunk #2 succeeded at 13301 (offset 1680 lines).
Hunk #3 succeeded at 13553 (offset 1677 lines).
patching file drivers/gpu/drm/i915/intel_drv.h
Hunk #1 succeeded at 1125 (offset 191 lines).
patching file include/linux/vgaarb.h
[root@arch linux-3.18-rc2]# 

Can someone help me with that, please?

Thanks a lot.

Best regards,


TheArcher

Offline

#3108 2014-10-31 12:50:15

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

thearcherblog wrote:

Hello,

The kernel file looks like is not available anymore and when I try to patch my kernel I get some errors.

What I made:

Created a folder kernelbuild
Get into that folder
Downloaded kernel mainline: linux-3.18-rc2.tar.xz
Extract it with tar -xvJf linux-3.18-rc2.tar.xz
make mrproper (clean up (according to https://wiki.archlinux.org/index.php/Ke … ditional))
zcat /proc/config.gz > .config (to have a good .config (VIRTIO ENABLED)

Downloaded the patches from https://lkml.org/lkml/diff/2013/5/30/513/1 and https://lkml.org/lkml/diff/2014/5/9/517/1

Saved first one as i915.patch and i915.2.patch the second one.

Then the errors:

[root@arch linux-3.18-rc2]# patch -p1 < i915.patch
patching file Documentation/kernel-parameters.txt
Hunk #1 succeeded at 2725 with fuzz 1 (offset 376 lines).
patching file drivers/pci/quirks.c
Hunk #1 FAILED at 3292.
1 out of 1 hunk FAILED -- saving rejects to file drivers/pci/quirks.c.rej

[root@arch linux-3.18-rc2]# patch -p1 < i915.2.patch
patching file drivers/gpu/drm/i915/i915_dma.c
Hunk #1 succeeded at 1318 (offset 12 lines).
Hunk #2 succeeded at 1379 with fuzz 2.
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 FAILED at 2080.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/i915_params.c
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 152.
2 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_params.c.rej
patching file drivers/gpu/drm/i915/intel_display.c
Hunk #1 succeeded at 12936 (offset 1652 lines).
Hunk #2 succeeded at 13301 (offset 1680 lines).
Hunk #3 succeeded at 13553 (offset 1677 lines).
patching file drivers/gpu/drm/i915/intel_drv.h
Hunk #1 succeeded at 1125 (offset 191 lines).
patching file include/linux/vgaarb.h
[root@arch linux-3.18-rc2]# 

Can someone help me with that, please?

Thanks a lot.

Best regards,


TheArcher

This is not the arch's way of building the kernel, and for arch users, i provided a kernel pkg with all the patches you need on page 1.

EDIT: the kernel pkg should be up now

Last edited by nbhs (2014-10-31 13:48:39)

Offline

#3109 2014-10-31 13:00:47

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

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

nbhs wrote:

This is not the arch's way of building the kernel, and for arch users, i provided a kernel pkg with all the patches you need on page 1.

While we appreciate the forum hosting, not everyone here runs arch.


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

#3110 2014-10-31 13:02:31

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:
nbhs wrote:

This is not the arch's way of building the kernel, and for arch users, i provided a kernel pkg with all the patches you need on page 1.

While we appreciate the forum hosting, not everyone here runs arch.

I know but it looks like he does

Last edited by nbhs (2014-10-31 13:48:06)

Offline

#3111 2014-10-31 13:04:36

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

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

nbhs wrote:
aw wrote:
nbhs wrote:

This is not the arch's way of building the kernel, and for arch users, i provided a kernel pkg with all the patches you need on page 1.

While we appreciate the forum hosting, not everyone here runs arch.

I know but it looks like he does

touché


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

#3112 2014-10-31 14:00:51

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

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

Child_of_Sun wrote:

Hi @all
I have managed to passthrough my Primary Graphic Card (And the Secondary for CrossfireX).

...post full of usefullness

I hope it helps somebody who tries the same :-)

Maaaan, i wanted to talk to you a while ago, and now you're posting the whole setup. I just love that post of yours.
But there's few strange things...
Do you really need that romfile option? You're running BIOS-setup, so you won't need to pass some new, UEFI-compatible ROM image to get it working.

Do you really-really-really need that "allow_unsafe_interrupts=1" option? aw mentioned it's needed in somewhat rare case.


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

#3113 2014-10-31 14:12:18

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

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

Duelist wrote:

Do you really-really-really need that "allow_unsafe_interrupts=1" option? aw mentioned it's needed in somewhat rare case.

All AMD-Vi IOMMUs support interrupt remapping with CONFIG_IRQ_REMAP enabled, so no, they don't need it.


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

#3114 2014-10-31 14:16:56

thearcherblog
Member
Registered: 2014-10-30
Posts: 165

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

nbhs wrote:
thearcherblog wrote:

Hello,

The kernel file looks like is not available anymore and when I try to patch my kernel I get some errors.

What I made:

Created a folder kernelbuild
Get into that folder
Downloaded kernel mainline: linux-3.18-rc2.tar.xz
Extract it with tar -xvJf linux-3.18-rc2.tar.xz
make mrproper (clean up (according to https://wiki.archlinux.org/index.php/Ke … ditional))
zcat /proc/config.gz > .config (to have a good .config (VIRTIO ENABLED)

Downloaded the patches from https://lkml.org/lkml/diff/2013/5/30/513/1 and https://lkml.org/lkml/diff/2014/5/9/517/1

Saved first one as i915.patch and i915.2.patch the second one.

Then the errors:

[root@arch linux-3.18-rc2]# patch -p1 < i915.patch
patching file Documentation/kernel-parameters.txt
Hunk #1 succeeded at 2725 with fuzz 1 (offset 376 lines).
patching file drivers/pci/quirks.c
Hunk #1 FAILED at 3292.
1 out of 1 hunk FAILED -- saving rejects to file drivers/pci/quirks.c.rej

[root@arch linux-3.18-rc2]# patch -p1 < i915.2.patch
patching file drivers/gpu/drm/i915/i915_dma.c
Hunk #1 succeeded at 1318 (offset 12 lines).
Hunk #2 succeeded at 1379 with fuzz 2.
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 FAILED at 2080.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/i915_params.c
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 152.
2 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_params.c.rej
patching file drivers/gpu/drm/i915/intel_display.c
Hunk #1 succeeded at 12936 (offset 1652 lines).
Hunk #2 succeeded at 13301 (offset 1680 lines).
Hunk #3 succeeded at 13553 (offset 1677 lines).
patching file drivers/gpu/drm/i915/intel_drv.h
Hunk #1 succeeded at 1125 (offset 191 lines).
patching file include/linux/vgaarb.h
[root@arch linux-3.18-rc2]# 

Can someone help me with that, please?

Thanks a lot.

Best regards,


TheArcher

This is not the arch's way of building the kernel, and for arch users, i provided a kernel pkg with all the patches you need on page 1.

EDIT: the kernel pkg should be up now

Thanks a lot sir!!!

Sorry, I was trying to follow the right way and I was taking the information from the official guide.

One question: Can be done on my kernel? An in case that can be done... can you show me the right way to do it?

Thanks a lot!!!

Regards,


TheArcher

Offline

#3115 2014-10-31 14:37:29

slis
Member
Registered: 2014-06-02
Posts: 127

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

20-30 pages back someone explained it, so look for it....

Offline

#3116 2014-10-31 14:44:45

thearcherblog
Member
Registered: 2014-10-30
Posts: 165

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

slis wrote:

20-30 pages back someone explained it, so look for it....

Truth: https://bbs.archlinux.org/viewtopic.php?id=162768&p=99

I will try later today smile

By the way... this is difficult now smile Maybe would be a good idea to edit post 1 an update relevant information for other users like an appendix smile

Anyway... thanks a lot smile


Regards,



TheArcher

Offline

#3117 2014-10-31 15:03:43

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

thearcherblog wrote:
slis wrote:

20-30 pages back someone explained it, so look for it....

Truth: https://bbs.archlinux.org/viewtopic.php?id=162768&p=99

I will try later today smile

By the way... this is difficult now smile Maybe would be a good idea to edit post 1 an update relevant information for other users like an appendix smile

Anyway... thanks a lot smile


Regards,



TheArcher

tar xvzf linux-mainline-3.17.2.tar.gz
cd linux-mainline
makepkg -s
sudo pacman -U linux-mainline-*

Offline

#3118 2014-10-31 15:39:08

thearcherblog
Member
Registered: 2014-10-30
Posts: 165

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

Thanks a lot sir smile

I will let you all know how it goes this weekend!!!

Thanks for your help smile

Offline

#3119 2014-10-31 16:37:05

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

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

Strange fact: i need to enable that
http://technet.microsoft.com/en-us/libr … 78411.aspx
registry parameter to stop my VM's keyboard lagging. When i press more than two buttons in sequence, system is having small freeze-and-go cycle.

I am using Q35 and i have -device qxl to get me a surface in qemu's graphical window, where qemu could grab host input.
I've tried using synergy but it doesn't work without a client and it doesn't get input working when windows displays you another context(like UAC).

But that is a minor problem. I typed that post while having my freshly-installed WIN7 VM without drivers installed, and got BSOD IRQL_NOT_LESS_OR_EQUAL. That was funny. I love windowns. Dmesg reports the usual io-page-faults on hdmi audio device.

EDIT: Now i'm using 440fx, and the problem is still present - bsod 116 after drivers install, with or without HDMI-audio. Oh well, back to the flashing ROM quest.

EDIT: -realtime mlock=on seemed to help address IO-PAGE-FAULTs. Benchmarking to test... Second GPU is still code 12.

EDIT: THAT. WAS. THE END! IT FINALLY WORKS! CHILD_OF_SUN, YOU ARE TRULY GODLIKE FOR YOUR SETUP, MANY THANKS!

I've got my HD7750 working on F2A55, all asus. Crossfire left. IO_PAGE_FAULTs are fixed by -realtime mlock=on switch.

Last edited by Duelist (2014-10-31 18:34:17)


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

#3120 2014-10-31 18:51:17

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

Duelist wrote:

...
EDIT: THAT. WAS. THE END! IT FINALLY WORKS! CHILD_OF_SUN, YOU ARE TRULY GODLIKE FOR YOUR SETUP, MANY THANKS!
...

The hero we deserve.

Offline

#3121 2014-10-31 19:00:12

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

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

nbhs wrote:
Duelist wrote:

...
EDIT: THAT. WAS. THE END! IT FINALLY WORKS! CHILD_OF_SUN, YOU ARE TRULY GODLIKE FOR YOUR SETUP, MANY THANKS!
...

The hero we deserve.

Well, i've been digging this system for two months, spending last two-three weeks on the quest of getting OVMF working. But he came and enlightened me.


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

#3122 2014-10-31 19:05:50

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

Duelist wrote:
nbhs wrote:
Duelist wrote:

...
EDIT: THAT. WAS. THE END! IT FINALLY WORKS! CHILD_OF_SUN, YOU ARE TRULY GODLIKE FOR YOUR SETUP, MANY THANKS!
...

The hero we deserve.

Well, i've been digging this system for two months, spending last two-three weeks on the quest of getting OVMF working. But he came and enlightened me.

I wasn't being sarcastic, this is actually the first time i see someone getting this working.

Offline

#3123 2014-10-31 19:09:17

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

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

nbhs wrote:
Duelist wrote:
nbhs wrote:

The hero we deserve.

Well, i've been digging this system for two months, spending last two-three weeks on the quest of getting OVMF working. But he came and enlightened me.

I wasn't being sarcastic, this is actually the first time i see someone getting this working.

You mean crossfire? There are some entries in the google-doc list. Child_Of_Sun is one of the three. I hope i may be the fourth guy with crossfire. But not yet - second gets code12.


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

#3124 2014-10-31 19:13:51

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

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

Duelist wrote:

I've got my HD7750 working on F2A55, all asus. Crossfire left. IO_PAGE_FAULTs are fixed by -realtime mlock=on switch.

This would be surprising, mlock=on should do nothing when a device is assigned.  The memory is already pinned for the IOMMU, so mlock'ing it is redundant.


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

#3125 2014-10-31 19:17:20

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

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

aw wrote:
Duelist wrote:

I've got my HD7750 working on F2A55, all asus. Crossfire left. IO_PAGE_FAULTs are fixed by -realtime mlock=on switch.

This would be surprising, mlock=on should do nothing when a device is assigned.  The memory is already pinned for the IOMMU, so mlock'ing it is redundant.

Well, there may be some quirks. But the io page faults were pointing into system ram area of /proc/iomem. And also, may be not the mlock, but allow-unsafe-interrupt thing did the job, that's to pin down for me. Definitely, it's mlock that does the trick. When i remove it - it gets BSOD 116. Or maybe i'm just hell of extremely lucky, getting memory locked in a ~safe area and not messing up anything(but HD7750 needs at least 256M as noted by lspci). Not a case either - i've survived a reboot.

UPD: putting two gpus on one root port was an interesting idea - i've got a message in DMESG about msi\msi-X mapping for the second gpu, the screen flashed a bit(messy guest drivers) and i've got bsod 7E. Changed the model back to -M pc btw, i observe no difference yet.

UPD2:Now something bizarre and exotic! My screen has VGA and DVI inputs. They can be used concurelly. !!FUN!! part is i've connected both inputs to both gpus. so my DVI output is from GPU1 and vga(via dvi-vga adapter) is from GPU2. When i turn x-vga=on on both cards sitting on one pci-e root port, i've got VGA output. When i enable only the first one, i get DVI output. That means the second card is actually working and initialised first. But in any way of interconnection, i get code 10 on the second one(which is showing me output) in devmgmt.msc. I think a driver install would do something fun. But the VGA output isn't showing me all 1920x1080, just 1440x1050.
After installing the drivers, i've got something showed up on both outputs at once(like, loading windowns on one gpu, desktop-ey loading thing on the other), and then... *gasps* my pc turned itself off. MCE? Dmesg -w was clear that moment. Glitches in virtual machine(talking to the real hardware, though) got the host shutdown itself?..

P.S. sorry for the "live" posting and many edits.

Last edited by Duelist (2014-10-31 20:29:29)


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

Board footer

Powered by FluxBB