Author Topic: My latest project... a Linux enthusiast's ultimate wish granted.  (Read 3532 times)

0 Members and 1 Guest are viewing this topic.

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
My latest project... a Linux enthusiast's ultimate wish granted.
« on: November 25, 2017, 01:08:42 pm »
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 Linux

What 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 Results

Edit2: Featured on level1techs.com
https://youtu.be/1MI1s4hZ_yE
« Last Edit: November 25, 2017, 11:33:48 pm by gnif »
SMTS Software Development Engineer @ AMD
 
The following users thanked this post: hans, firewalker, Lightages, BravoV, SeanB, dr.diesel, takahidehimself, lem_ix, bitseeker, MK14, imidis

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #1 on: November 25, 2017, 01:58:24 pm »
I've been eying this (not this project but this feature) for a while. Does it require IOMMU?
Gone for good
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4853
  • Country: gb
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #2 on: November 25, 2017, 02:02:35 pm »
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.
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #3 on: November 25, 2017, 02:19:32 pm »
I've been eying this (not this project but this feature) for a while. Does it require IOMMU?

Yes

Could windows (10) update, potentially/sometimes stop it from working

No, it doesn't involve any non standard hacks.

Will it also work with Windows 7 ?

YMMV if you're using a NVidia GPU you must use UEFI boot in the VM, which Windows 7 doesn't play nice with.

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.

Yes, 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.
« Last Edit: November 25, 2017, 02:24:42 pm by gnif »
SMTS Software Development Engineer @ AMD
 
The following users thanked this post: MK14

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #4 on: November 25, 2017, 02:29:10 pm »
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.  :-+
Gone for good
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #5 on: November 25, 2017, 03:04:01 pm »
Great work!

Will the Linux bits be upstreamed/mainlined?

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #6 on: November 25, 2017, 04:24:59 pm »
Great work!

Will the Linux bits be upstreamed/mainlined?

Well the kernel patch for AMD NPT has been, it should be in 4.16. The rest is all user space, nothing to upstream/mainline :)
SMTS Software Development Engineer @ AMD
 
The following users thanked this post: dr.diesel

Offline hermit

  • Frequent Contributor
  • **
  • Posts: 482
  • Country: us
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #7 on: November 25, 2017, 04:36:30 pm »
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.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4853
  • Country: gb
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #8 on: November 25, 2017, 04:43:24 pm »
Yes, 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.

I 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;dr
Linux 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.
 

Offline iromero

  • Supporter
  • ****
  • Posts: 26
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #9 on: November 25, 2017, 05:20:12 pm »
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 :D.

I wonder how the sharing of other devices work, can this do USB passthrough like virtualbox? that would be the cherry on top.
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4417
  • Country: nz
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #10 on: November 25, 2017, 05:57:29 pm »
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 :-) :-)
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #11 on: November 25, 2017, 11:11:11 pm »
Is this Window's specific or any OS like another Linux Distro?

For 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.

I wonder how the sharing of other devices work, can this do USB passthrough like virtualbox? that would be the cherry on top.

Yes, 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
« Last Edit: November 25, 2017, 11:14:44 pm by gnif »
SMTS Software Development Engineer @ AMD
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 6045
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #12 on: November 25, 2017, 11:23:48 pm »
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 :-) :-)
Games, bruceholt... Games... :D

Incredible work, gnif. Thanks for sharing!
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27711
  • Country: nl
    • NCT Developments
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #13 on: November 26, 2017, 01:13:38 am »
I bet this will also be very interesting for CAD software which uses 3D rendering.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12379
  • Country: au
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #14 on: November 26, 2017, 04:51:35 am »
I'm not interested in the gaming aspect - but for CAD ... ?  Do tell ....  :)
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #15 on: November 26, 2017, 05:26:10 am »
I'm not interested in the gaming aspect - but for CAD ... ?  Do tell ....  :)

Well 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.
SMTS Software Development Engineer @ AMD
 

Offline Ranayna

  • Frequent Contributor
  • **
  • Posts: 901
  • Country: de
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #16 on: November 27, 2017, 09:01:24 pm »
Really looking forward to this :)
Just 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  ;D
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #17 on: November 28, 2017, 11:57:08 pm »
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-development

This 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 API

At 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:
  • Case
  • PSU - 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 lanes
  • 32GB RAM - 64GB would be better but can make do with the 32GB
  • Vega 56 (For both host and guest development)
  • Hopefully a few cheap budget video cards of different brands for testing on the host
  • Best HDD I can get with whatever is remaining

The 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.
« Last Edit: November 28, 2017, 11:59:51 pm by gnif »
SMTS Software Development Engineer @ AMD
 

Offline lundmar

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: dk
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #18 on: November 29, 2017, 01:06:08 am »
Good stuff :-+
https://lxi-tools.github.io - Open source LXI tools
https://tio.github.io - A simple serial device I/O tool
 

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1700
  • Country: au
  • Views and opinions are my own
    • AMD
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #19 on: December 14, 2017, 07:27:22 pm »
We released yesterday!

https://level1techs.com/video/new-tech-iommu-users-looking-glass-headless-passthrough
https://github.com/gnif/LookingGlass
https://looking-glass.hostfission.com

And today my project is 22nd on GitHub for trending projects,
1st for programs written in C!

https://github.com/trending/c

Fun times ahead!
SMTS Software Development Engineer @ AMD
 
The following users thanked this post: thm_w, imidis

Offline apelly

  • Supporter
  • ****
  • Posts: 1061
  • Country: nz
  • Probe
Re: My latest project... a Linux enthusiast's ultimate wish granted.
« Reply #20 on: December 14, 2017, 07:36:44 pm »
And today my project is 22nd on GitHub for trending projects,
1st for programs written in C!
You da man!  :-+

Open source FTW!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf