Giter Club home page Giter Club logo

vfio's Introduction

My VFIO setup

NOTE

This is not maintained anymore. Gaming on Linux is very possible nowadays (see ProtonDB). I don't have Windows anymore. I will keep this Repo up so someone might find it some day, but I will no longer contribute anything.

Acknowledgements

This setup was made possible by:

Hardware Setup

  • i7 7700K
  • Palit Super Jetstream GTX 1070
  • 8GB RAM, 6GB of which are reserved for the VM at any time (yes I know that sounds and maybe is stupid)
  • an entire SSD is passed to the VM

How-to

I basically followed the instructions in YuriAleks wiki and the ArchWiki, but here is what I did (approximately):

  • first, I set up my host according to the steps described in Setting up IOMMU and Isolating GPU
  • I set up my VM with virt-manager and installed windows in it (see ArchWiki -- VFIO)
  • using virt-manager, I removed the SPICE display and other unnecessary stuff, and set it to pass through the GPU, a USB controller (which my mouse and keyboard are connected to) and my PCI sound card
  • using virsh (virsh edit win10), I set up additional stuff unavailable in virt-manager (see README in libvirt folder)
    • important here: set the rom file for the GPU (see below)
  • in the VM, installed the graphics driver and voila!
  • important: in the libvirt folder, there is the .xml file and an explanation what I did. Read it, otherwise the performance will be crap

The GPU VBIOS

You need to provide a patched GPU VBIOS if you want to use the boot GPU for your VM. First, you need to extract the VBIOS:

  • either you download one from techpowerup
    • some versions did not work for me, others did. Make sure to try a different version if it doesn't work
  • you can extract the VBIOS with the extract-vbios-nvflash.sh script (see scripts folder) and nvflash (fromtechpowerup)
  • if you run windows either in dualboot or in a VM with a dedicated GPU (like, the classical way), you can extract it with GPU-Z
    • I needed to set the kernel parameter 'kvm.ignore_msrs=1' in my host, otherwise launching GPU-Z would crash my system (see this reddit thread)

Then, you need to patch it. joeknock90 made a nice how-to for that. You can use the script he provides, or you can just use a hex-editor like bless and patch it manually. I patched it manually, it is very easy and probably quicker and safer.

File and folder explanations

  • arch_vm.conf -- systemd-boot entry
  • scripts/ -- well... launch scripts, helper scripts, environment variables
  • libvirt/ -- the windows10.xml file, which contains all the configuration and an explanation what I did
  • kodi/ -- Kodi addon to launch windows
  • windows.desktop -- Nice desktop entry for GNOME
  • windows.service -- Systemd unit file

vfio's People

Contributors

mistadon avatar moritzwm avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.