My latest project... a Linux enthusiast's ultimate wish granted. - Page 1
Forum section: electronics / general

author: gnif
author_rank: Unknown
timestamp: November 25, 2017, 01:08:42 pm
content: Well perhaps not the ultimate wish, but a pretty good one. Over the past month I have been working to make KVM Virtualization under Linux work well enough to be used as not just an office/productivity environment, but for high rate of input games that demand very low latency.I am extremely proud to produce a sneak preview of what I will be releasing open source in the next few weeks.TL;DR; Triple A games are fully playable in a VM under LinuxWhat you are seeing here is a Windows 10 64bit VM running in KVM with physical access to the secondary video card (GTX 1080Ti) in my PC. What is special here is the fact that it is completely integrated into my Linux environment, completely seamless! This is all done via a shared memory segment that is mapped back into the host via a virtual device and custom windows driver and a windows application . The result is almost zero latency (< 5ms on average) video streaming from the guest to the host, with zero quality loss.At current I am working with a few people to polish this up and get it to a state where it can be released to the general public. Finally for the first time ever we can run demanding windows titles under Linux without dual boot!Edit:3D Mark ResultsEdit2:Featured on level1techs.comhttps://youtu.be/1MI1s4hZ_yE

author: imidis
author_rank: Frequent Contributor
timestamp: November 25, 2017, 01:58:24 pm
content: I've been eying this (not this project but this feature) for a while. Does it require IOMMU?

author: MK14
author_rank: Super Contributor
timestamp: November 25, 2017, 02:02:35 pm
content: Sorry, if the following is a silly question.Could windows (10) update, potentially/sometimes stop it from working (i.e. break an existing working installation). A bit like a hackintosh, which can be made to stop working, every time Apple, updates the OS ?Just in case the above question is not silly enough, how about the following:Will it also work with Windows 7 ?I.e. allow free/quick access to the second video card.Now for what might be the silliest question of all:Can you use the integrated video (in the Intel cpu or AMD zen APU, when they come out), as the first graphics card ?I.e. You then only need the one/main video card, and don't need to mess around with having two of them.

author: gnif
author_rank: Unknown
timestamp: November 25, 2017, 02:19:32 pm
content: Quote from: imidis on November 25, 2017, 01:58:24 pmYesQuote from: MK14 on November 25, 2017, 02:02:35 pmNo, it doesn't involve any non standard hacks.Quote from: MK14 on November 25, 2017, 02:02:35 pmYMMV if you're using a NVidia GPU you must use UEFI boot in the VM, which Windows 7 doesn't play nice with.Quote from: MK14 on November 25, 2017, 02:02:35 pmYes, but you're Linux desktop will then be headless, it has to be completely isolated from the host machine and given to the guest. It's best to run two video cards, even if your primary is something old. I recommend anything that supports OpenGL 4.3 or later for the host card, it doesn't need to be very powerful since it's not really rendering anything.

author: imidis
author_rank: Frequent Contributor
timestamp: November 25, 2017, 02:29:10 pm
content: Thanks gnif, I figured. This is really nice and promising, really games and software that doesn't run on linux is the only thing keeping me on windows. I will have to look at upgrading to an IOMMU compatable processor/mb.

author: dr.diesel
author_rank: Super Contributor
timestamp: November 25, 2017, 03:04:01 pm
content: Great work!Will the Linux bits be upstreamed/mainlined?

author: gnif
author_rank: Unknown
timestamp: November 25, 2017, 04:24:59 pm
content: Quote from: dr.diesel on November 25, 2017, 03:04:01 pmWell the kernel patch for AMD NPT has been, it should be in 4.16. The rest is all user space, nothing to upstream/mainline

author: hermit
author_rank: Frequent Contributor
timestamp: November 25, 2017, 04:36:30 pm
content: Is this Window's specific or any OS like another Linux Distro? My system isn't 'killer' but not a slouch either. Sometimes I load something up in a VM and always get some GUI lag. I wanted to run the dev version of Kicad in a VM but it was just way too painful.

author: MK14
author_rank: Super Contributor
timestamp: November 25, 2017, 04:43:24 pm
content: Quote from: gnif on November 25, 2017, 02:19:32 pmI had not thought of it like that (the Linux desktop would then be headless), there is still more for me to learn about Virtual Machines.Thanks for all the nice replies, to my questions!This is sounding more and more like a big game changer, for me and many other people. Because Windows 10 is significantly unpopular, with people with enough technical ability to realise how potentially bad it is. As you said, dual booting is problematic at times. So the ability to run the latest games (and serious applications), in Linux, via a windows VM, is especially appealing.tl;drLinux is just great, but its lack of a 100% compatible way of running Windows 10 applications, is problematic at times. There is WINe, but its results are sometimes imperfect and not everything runs with it.

author: iromero
author_rank: Unknown
timestamp: November 25, 2017, 05:20:12 pm
content: This is great news! I really don't have any use for games as i got enough consoles for that. But if this works for running 3D cad software by just adding a second graphics card instead of having a separate computer it would allow me to switch some workstations to Linux at work.I wonder how the sharing of other devices work, can this do USB passthrough like virtualbox? that would be the cherry on top.

author: brucehoult
author_rank: Super Contributor
timestamp: November 25, 2017, 05:57:29 pm
content: Nice work!But I got all excited when you said a Linux enthusiast's ultimate wish. Sounds more like a Windows enthusiast's wish ... I run Linux on all my desktops and dev boards (MacOS/iOS on battery powered devices) and have ... less than zero interest in running Windows :-) :-)

author: gnif
author_rank: Unknown
timestamp: November 25, 2017, 11:11:11 pm
content: Quote from: hermit on November 25, 2017, 04:36:30 pmFor now it's specific to a Linux host with a Windows VM, but everything will be open sourced, it would in theory be possible to write a guest application to perform the buffer pass back to the host for other guest operating systems too.Quote from: iromero on November 25, 2017, 05:20:12 pmYes, Qemu+KVM already support this extremely well, many people passthrough their physical keyboard, mouse and in some cases a USB sound device. If you want to ensure excellent low latency USB support you could also install a PCI USB controller and pass the entire controller into the guest.Level1 techs just live steamed a demo of the project also where Wendell does an excellent job of explaining the current state and how it works:https://level1techs.com/video/livestream-headless-pcie-passthrough-coming-very-soon

author: rsjsouza
author_rank: Super Contributor
timestamp: November 25, 2017, 11:23:48 pm
content: Quote from: brucehoult on November 25, 2017, 05:57:29 pmGames, bruceholt... Games...Incredible work, gnif. Thanks for sharing!

author: nctnico
author_rank: Super Contributor
timestamp: November 26, 2017, 01:13:38 am
content: I bet this will also be very interesting for CAD software which uses 3D rendering.

author: Brumby
author_rank: Unknown
timestamp: November 26, 2017, 04:51:35 am
content: I'm not interested in the gaming aspect - but for CAD ... ? Do tell ....

author: gnif
author_rank: Unknown
timestamp: November 26, 2017, 05:26:10 am
content: Quote from: Brumby on November 26, 2017, 04:51:35 amWell yeah, native performance for anything that relies on the GPU. Most people want this for gaming and as such is the focus of the presented information, but it works equally well for any task that requires high performance GPU.

author: Ranayna
author_rank: Super Contributor
timestamp: November 27, 2017, 09:01:24 pm
content: Really looking forward to thisJust last week I was wondering if GPU passthrough made enough progress to try something like that again.I really do not like the way Windows is moving currently, but since gaming is something of a guilty pleasure of mine, I just cannot get rid of windows. And while WINE might work for some games, other will not work. And the number of native linux games just does not cut it. I had hopes for Steam to come around, but there is not much you hear about the linux client anymore, I am afraid it will not live that long anymore.This might finally allow me to permanently switch to linux, or at least try again.Now I am regretting that I did not choose a CPU with internal graphics

author: gnif
author_rank: Unknown
timestamp: November 28, 2017, 11:57:08 pm
content: I made a video to demonstrate it in action, please excuse the video quality, I only have an old camera to record things.If you are interested in this technology I could really do with your help, there is a GoFundMe campaign over here:https://www.gofundme.com/hardware-for-amd-kvm-developmentThis campaign is for two purposes:AMD ThreadRipper has a power state bug that makes it nearly useless for KVM PCI Passthrough which I intend to fix.To obtain a verity of hardware combinations for testing and development of this project.To obtain a Vega 56 to fix a buffer sync bug, and implement it's native high speed capture APIAt this point it is going to cost no less then $4,000 AUD for the components needed to build the development system, and with GoFundMe fees (AU: 7.25%, International: 8.4% + $0.30) the total that needs to be raised is around $4336 AUD. At the time of writing this I am at $3,105 before fees, leaving a $1,231 defect.This covers:CasePSU - needs to be 1000W or better for running the two video cards (worst case, my 1080Ti + Vega 56)Ryzen 1950x - This is needed for the additional PCIe lanes32GB RAM - 64GB would be better but can make do with the 32GBVega 56 (For both host and guest development)Hopefully a few cheap budget video cards of different brands for testing on the hostBest HDD I can get with whatever is remainingThe motherboard and CPU cooler have already been pledged by Level1Techs.PLE Computers Australia have offered to supply parts for this at cost, so final pricing at this point is an estimate.Hardware donations to cover any of the above list would also be greatly appreciated reducing the final required amount.

author: lundmar
author_rank: Frequent Contributor
timestamp: November 29, 2017, 01:06:08 am
content: Good stuff

author: gnif
author_rank: Unknown
timestamp: December 14, 2017, 07:27:22 pm
content: We released yesterday!https://level1techs.com/video/new-tech-iommu-users-looking-glass-headless-passthroughhttps://github.com/gnif/LookingGlasshttps://looking-glass.hostfission.comAnd today my project is 22nd on GitHub for trending projects,1st for programs written in C!https://github.com/trending/cFun times ahead!

author: apelly
author_rank: Unknown
timestamp: December 14, 2017, 07:36:44 pm
content: Quote from: gnif on December 14, 2017, 07:27:22 pmYou da man!Open source FTW!