Levitance:
There has been a lot of elitism about using Debian or Arch "because Ubuntu lags behind in kernel updates." But the truth of the matter is that this functionality has been around for a while now. You don't need kernel 4.9.9 to make this work. There may be performance benefits and/or bug fixes to be had though, and that's worth considering.
You don't need 4.9, but having 4.4 or later will make it A LOT easier. Performance benefits are negligible across kernels, the difference is in the ease of setting it up and how reliable it is.
Absolutely, you can without much pain. You shouldn't have too much difficulty, but there are a few tricks that need to be done to make your 1070 drivers work in the VM. Nvidia intentionally disables them if they detect they're running in a VM on a non-quadro card.
Now, if you want to learn more about passthrough, have a look at these two articles I wrote:
Intro
In this installation we are going to be discussing the technology behind PCI Passthrough to VMs. The concept of passthrough is relatively simple. You take a physical device and forward it's memory registers to the VM. A simple idea, however, doesn't make an implementation simple. There's a lot that goes into passthrough, and a bunch of extremely talented people have put a lot of time into software to bring passthrough to the point where it's a lot easier than it was before, but still not quite plug 'n' play.
Conceptual Discussion
Now, what goes into it exactly? To give a brief overview, we've got the hardware support for passthrough, the IOMMU or Input-Output Memory Management Unit, supported by both the motherboard and CPU. (more info on that here ) The Linux driver, VFIO, is assigned to the device at boot, preventing the device from being initialized. This will help us when it comes to passing our GPU into the vm. If we've got the GPU bound to another driver, we won't achieve successful passthrough, because you won't be able to exclusively lock the GPU's resources to the QEMU vm.
Now, let's talk about the PCIe bus. The machine I'm going to be using as a reference has an ASUS Z170 -a and a 6700k . This gives me 16 PCIe lanes on the CPU to play with. Most GPU's will be happy with 8 lanes, so we shouldn't have bandwith issues here. I am going to be passing two devices to my VM: GPU and USB-3 controller. The passthrough GPU will be using an 8x connection on the PCH and the USB controller will be using a 4x connection on the CPU. This will allow the GPU I'm using for Linux output to be connected by an 8x connection as well.
Handling PCIe passthrough isn't 100% straightforward. There are limitations and rules about how the IOMMU sees a device and its IO Virtual Addresses (IOVA). Some devices will alias to the same IOVA space which makes the IOMMU unable to destinguish between the two devices. This becomes problematic when dealing with tr…
Intro
In this installation, it's all QEMU, libvirt and KVM. It's been a long wait and I really do hope it's been worth it. This is the part where I'm actually going to guide you through working with libvirt, using virt-manager for most of our work. This can be done by anyone because it's so simple.
Software requirements
Before we get into the conceptual discussion, I'm going to be outlining a bit of the software that we're going to need to follow this guide.
libvirt and virt-manager (usually found as libvirt and virt-manager in your package manager)
QEMU (usually found as qemu in your package manager)
fedora-packaged virtio drivers, an ISO which is obtainable at this link . I normally download the latest variant, because I've had better results, but you should be okay with either.
OVMF, this is your UEFI firmware that the VM is going to run. Some distributions have it as a package, search your package manager for ovmf or edk2 to see if you have it. If not, you're going to have to extract an RPM for it. The binary files don't require any libraries, as they're firmware.
Moving on, you're going to need to do some configuration so that libvirt can find the OVMF images that we installed. This will be discussed in a later section.
Conceptual Discussion
Alright, this one's going to be a lot shorter than the previous since there's not quite as much to cover here. The tricky part is the implementation.
First up is KVM, the Kernel-based Virtual Machine. It's feature of the Linux kernel that allows you to get near-native performance on same-architecture virtualization. Your hardware must have virtualization extensions (Intel VT or AMD-V) to take full advantage of KVM. That said, you can't use KVM directly. KVM is more of an ABI (application binary interface) that exposes system calls than a user-executable program.
That's where QEMU (Quick Emulator) comes in. QEMU is software that emulates CPU's by translating binary instructions and …
That should help you get started!