1

now i know this issue has been talked about before, but those topics are old now and slightly out dated.

So I have recently been following a few different guides on getting this system working, mainly;

http://www.howtogeek.com/117635/how-to-install-kvm-and-create-virtual-machines-on-ubuntu/
http://www.pugetsystems.com/labs/articles/Multiheaded-NVIDIA-Gaming-using-Ubuntu-14-04-KVM-585/

So far I am having no luck. My System consists of:

Intel Xeon e3-1230V2 with VT-d
Asrock Fatal1ty Pro z77 with VT-d enabled
A nvida 9800gt - for main host
a gtx 780 for windows vm
a gtx 750ti for windows vm

using the second guide i am able to get the cards i want as "claimed by stub" but i run into an issue when trying to run the vm.

Currently my system is grouping my 780 (device 0000:01:00.0) with my 9800gt (device 0000:02:00.0) together which tells me that I can not run the vm as I haven't allocated it the entire group.

I have seen mention that installing an acs override patch may work by splitting the devices up into smaller groups to allow me to pass the GPU, but so far every tutorial or topic just says "compile the patch in" or "add this line to the grub cmd".

I haven't seen anywhere explaining how to actually install the patch on ubuntu 14.04 or if I need to do anything else.

Has anyone else been able to get this all running?

All help is hugely appreciated and if possible please try to explain things as simple as can be. Whilst i do know linux, i don't know it off the top of my head

Note: the 9800gt is actually the second card in the system and the arrangement of them can't be changed so default display device currently goes to the 780

Edit

I just found these guides for debian

Patching

#!/bin/bash
# patch --dry-run --verbose -p 1 -i re_xxxxxxxxxxxxx

echo
echo ... PATCHING ... VGA Arbiter
patch -b -p 1 -i re_patch_01_i915_313rc4.patch
echo
echo ... PATCHING ... acs override
patch -b -p 1 -i re_patch_02_override_for_missing_acs_capabilities.patch
echo
echo ... PATCHING ... memleak
patch -b -p 1 -i re_patch_03_fix_memleak.patch
echo
echo ... PATCHING ... read DR6
patch -b -p 1 -i re_patch_04_fix_reading_of_DR6.patch
echo
echo ... PATCHING ... debug registers - has problem, needs to follow DR6 patch
patch -b -p 1 -i re_patch_05_debug_registers.patch
# patch -b -p 1 -i re_debug_registers_RE.patch   # Corrected to add additional lines before DR6 patch runs
echo
echo ... PATCHING ... kernel__gcc
patch -b -p 1 -i re_patch_06_kernel-38-gcc48-2.patch

Compiling

To compile a new kernel
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://help.ubuntu.com/community/Kernel/Compile
https://wiki.ubuntu.com/KernelTeam/KernelMaintenance
https://www.debian.org/releases/stable/i386/ch08s06.html.en

architecture is "amd64" or "x86_64"

1) download the source into the current directory using "apt-get source linux-image-xxxxx"  where xxxx is the name of the version eg. apt-get source linux-image-3.13.0-32-generic

This should download the tarball(s) and extract the source code into a directory (which should be renamed immediately because all versions use the same directory name !!!)

2) Open the new directory, clean up and prepare
  chmod a+x debian/scripts/*
  chmod a+x debian/scripts/misc/*
  fakeroot debian/rules clean

  and generate the required config by either -
  a) editing using "fakeroot debian/rules editconfigs"  (for all targets, one after another) ... or 
  b) "make menuconfig" and work through the various options. Remember to save before exit
  c) copy the current config from the boot directory as ".config" in the root direcotry for the new kernel and then use  "make oldconfig" ... which will ask a question for the value of each new config option

  Required config options are
    CONFIG_VFIO_IOMMU_TYPE1=y     in Device Drivers. 2 pages back from end
    CONFIG_VFIO=y
    CONFIG_VFIO_PCI=y
    CONFIG_VFIO_PCI_VGA=y
    CONFIG_PCI_STUB=y             in Bus Options, second page down
    HZ_1000=y                     in Processor Type & Features (last page)
    PREEMPT=voluntary

3) apply any patches /// remember to verify that they worked ok (look for fail)
   "sh re_apply_patches.sh > re_output_patch.txt"

4) "fakeroot debian/rules clean"   to remove any old build information / files

5) Ignore modules not created with new parameters ... copy re_modules.ignore to ...debian.master/abi/<previous-version>/modules.ignore

   and ignore other ABI errors by copying re_prevrelease_arch_ignore (rename to  "ignore") to debian.master/abi/<previous-version>/<arch>    eg. to debian.master/abi/3.13.0-32.56/amd64/

6) "DEB_BUILD_OPTIONS=parallel=3 skipmodule=true fakeroot debian/rules binary-headers binary-generic  > re_output_compile.txt"   to generate the deb files which can be installed (second thoughts don't pipe the poutput to a file - it will prevent selection of the CPU type)

7) Install all the Debs with command "sudo dpkg -i linux*<ver>*.deb
eg.   sudo dpkg -i linux*3.13.0-32_3.13.0-32.57*.deb
      sudo dpkg -i linux*3.13.0-32-generic_3.13.0-32.57*.deb

8) go into Synaptic and lock all the newly installed elements (linux-image*, linux-header*, linux-tool*, linx-cloud-tool*) - to prevent the new kernel and components being overwritten in the next upgrade

Not sure if this would work in ubuntu?

1 Answer 1

1

I know this thread is actually close to three years old but the ACS-override patch is obsolete because it has been build into the Ubuntu Kernel 4.8. Currently by installing the newest kernel on an ubuntu 16.04 LTS Xenial via apt-get install linux-generic-hwe-16.04 you get kernel 4.10 which fully splits all of the PCI devices into a seperated IOMMU-Group. So passing through graphic cards one-by-one to multiple VMs is now possible very easily.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .