New Tech for IOMMU Users - Looking Glass (Headless Passthrough)

**The Future of Gaming: SR-IOV and Linux**

As I'm sure many of you are aware, the video game industry is constantly evolving, and one technology that's been making waves lately is SR-IOV. This technology has been used in the enterprise for some time now, but its potential applications in the gaming world are vast and exciting.

For those who may not be familiar with SR-IOV, it allows a single graphics card to support multiple virtual machines, each of which can access the graphics card independently. This opens up a world of possibilities for gamers who want to run multiple operating systems or virtual desktops on their hardware. And the best part? Many SR-IOV capable graphics cards don't even have outputs, making them difficult to use in traditional gaming setups.

So, how does it work? Well, to be honest, it's not entirely clear yet. The current implementation involves copying the frame buffer at high speed and 32-bit color depth. While this is impressive, it's just a starting point, and there are many questions still unanswered. For example, how would you even access the graphics card in the first place? This is where SR-IOV technology comes in.

**The Power of SR-IOV**

One of the most exciting things about SR-IOV is its potential to revolutionize gaming on Linux. Currently, there's no native support for SR-IOV in Linux, but that could all change soon. In fact, some gamers have already started experimenting with using SR-IOV in their Linux setups, and the results are promising.

One of the biggest hurdles facing SR-IOV adoption is getting access to the graphics card itself. This can be a challenge, especially for AMD cards that don't even have outputs. But one company, Hosts Vision, has made significant strides in this area using an SR-IOV capable NVIDIA card.

Hosts Vision's work on SR-IOV has been instrumental in bringing this technology to the gaming community. The team has created a custom driver and setup that allows for seamless SR-IOV support, even with the absence of outputs. And the results are impressive - we're talking about full-screen mode, high-refresh-rate performance, and all the usual suspects.

**The Community Comes Together**

So, how did this incredible achievement come to be? The answer lies in the power of community. A group of passionate gamers, developers, and tech enthusiasts came together to make SR-IOV a reality. And it's not just about the technical side of things - it's also about collaboration and communication.

The level 1 text forms\\n\thave been instrumental in facilitating this effort, providing a platform for discussion, testing, and feedback. And let me tell you, the community has come together in a big way to support Hosts Vision and their mission. From Sapphire and AMD, who provided the necessary hardware, to Gigabyte, who supplied the motherboard, it's clear that everyone is committed to making SR-IOV a success.

**The Road Ahead**

So, what can we expect from SR-IOV in the future? Well, the answer is simple - a lot. As researchers continue to explore the possibilities of SR-IOV, we're likely to see significant advancements in terms of performance, efficiency, and usability. And with the potential for direct frame buffer access through PCI Express, the possibilities become endless.

Of course, there are still many challenges ahead, from the technical hurdles to the practical considerations of widespread adoption. But one thing is clear - SR-IOV has the potential to revolutionize gaming on Linux, and we can't wait to see what's next.

"WEBVTTKind: captionsLanguage: enCaptain's Log supplemental we're about to release a new technology onto the internet so that it may grow and flourish and maybe take root it's hard to say KVM frame relay could change everything or it could be just another blip on the radar I can't say let me to introduce Looking Glass it's not every day I get to introduce a new technology although I guess the pedantic among you would say that it's not really new technology but it kind of is I mean honestly it is and it's very exciting Looking Glass is a piece of software that will help you copy the frame buffer from a windows guest to a Linux host that means that you can see what you see on your windows guest on your Linux host in a window we're running Fedora 26 I think on this this is hooked up to our host operating system we have a virtual machine running windows with iommu pass through this GT X 1080 Ti is passed through to our windows guest this ultra wide display is hooked up to our windows guest this window is coming from our windows guest and the way that's doing that is through the looking-glass software which creates a shared memory buffer between the host and guest operating system and through that shared memory buffer the two video cards are doing frame buffer stuff with that shared buffer so the guest video card as soon as a frame is done that frame is copied into that frame buffer and almost in real time that frame buffer is being displayed by the host operating system so the latency is extremely low as opposed to you know something like some kind of streaming technology or remote desktop or anything like that no it has none of the overhead of that the overhead of this is literally just the memory of memory copy plus whatever we have to deal with in the driver stack which we found was was actually quite a bit allow me to demonstrate rise of the Tomb Raider running we're going to run a rise of the Tomb Raider benchmark its 2560 by 1080 on both the guest and the host in NVIDIA dynamic super resolution is an option if you want to do that you can do 4k theoretical maximum frame rate is about 300 FPS at 4k with the memory bandwidth of our Intel Core i 9 our setup here is the gigabyte Oris x to 99 gaming with the 10 core 7900 X Intel we've got 32 gigabytes of g.skill Trident z DDR memory our host GPU is an r9 390x and our guest GPU is a gtx 1080i now I'm running Linux kernel 4.15 with the AMD GPU DC the next generation graphics drivers enabled for our r9 390x we've also tested this with gtx 1060 in the host and Vega in the host and an r9 fury in the host now there is a problem with Vega vega's framerate is not very good for some reason we're still investigating that big thanks to sapphire and AMD for providing a Vega this technology this program was written by a Jeff who figured out the NPT bug on rise in the same guy so he and I sort of got together and compared notes and we're looking at stuff and so this is his project and he showed me some of the early versions of stuff we've been working on it the last few weeks we had a fundraiser on level one Linux that was massively successful so again huge thanks to the level 1 Linux community you guys made it rain and that was enough stuff to buy to sort of fill in the gaps and make ends meet in terms of hardware but also big thanks to gigabyte so big thanks to pili computers Australia they're supplying the parts for this thing that because for Jeff it's local and it's really good so huge thanks to them there's a link to them in the description below be sure to click that and check them out just so they can see that hey there's a lot of interest in this project big thanks a lot of coverage a lot of excitement so the community sort of came together to make this technology happen and as you can see the latency is actually pretty low if you look at our high-speed footage you know typically it's running about one frame behind now we've got an experimental version of this that will allow us to grab the frame before the video card has started to display it because it's waiting on the monitor it's waiting on vsync and you get into an interesting situation so for the future it may be possible for us to grab the frame before it's displayed from the Nvidia graphics card and then display it on the host graphics card using free sync so yeah you could have free sync on a gtx 10a DTI technically although you're still going to get a little bit of latency that you get from the memory to memory copy memory to memory copy latency it's not really super high so it could be really exciting by the time we hit beta but right now it's just alpha don't look at your overly excited but this is available on github for you to download and compile and that sort of thing it's definitely not for the faint of heart you can't just you know rpm install this or dpkg install this we tested on ubuntu debian and fedora and you will have to make some changes some adjustments to the source for your system to actually compile this and do it hopefully in a few weeks or a couple of months or something like that it'll be ready for packaging there is a full how-to on the level 1 forum it's a wiki so if you want to set this up there's sort of a general how-to this set up has been really tuned to minimize latency now because this is an alpha release I do want to note that there are some known issues so don't everybody flood with a zillion bug requests in fact yeah definitely like let's keep the signal-to-noise ratio to a minimum there are bugs around qem use input so this is a spice client for those of you that know what that means but KVM and the spice client if the input mode is like a tablet where the positioning of the cursor is absolute there are bugs with qemu and relative input and QA mu has already been notified and they're working on it Jeff is sort of filed a bug report and that's really good the other thing is you're gonna need the Red Hat shared memory driver which can be a little tricky to install sometimes it will cause QEMU to crash when you install it again that's been fixed we're just waiting on qmu to catch up there are patches if you want to manually install it if you're feeling adventurous there are some other bugs that have been exposed with qemu because if you're using a emulated ps2 mouse and keyboard sometimes QAM you will get mixed up about which device is active so for now I would recommend still using a separate ps2 mouse and keyboard and passing those through separately or a separate USB keyboard and passing those through separately that are physical Hardware that's what I'm doing back here but because it is a spice client once the bugs are fixed in spice it should be okay it's not actually a problem with with looking glass or anything like that it's just that nobody uses relative input mouse mode because it doesn't make sense the normal way that you use spice so you know just keep that in mind there are other known issues that are documented on a level one text forum so be sure to check that before we get 387 requests it's about you know the mouse not working or something like that with looking glass because it's gonna be a really busy next few weeks if you want to support us hey you know Jeff's info is down there at the bottom level one text can always use more people on patreon or buying t-shirts or mugs or whatever so it's a it's an exciting time I can't wait to do more projects like this you know if you're a crazy person you could use a KVM to switch between guest and host like I do but I think this technology's gonna make that obsolete although I'm gonna use the KPM because I've got so many computers they're not necessarily all on the same box but it still works really well if you leave vsync at the defaults on the guest and a host you can introduce extra latency but as you can see from our high-speed footage the guest is running only about one frame ahead of the host at around 1 and a refresh of about 60 Hertz give or take which is mind-blowing it's mind-blowing that it's that it's that fast now in terms of capturing the frame from the guest to the host the Nvidia capture API for this is really great but to be able to use the Nvidia capture API at least for plebs like us you've got to have an NVIDIA Quadro so it's a little bit like the code 43 problem except there's not exactly a workaround so if you if anybody knows anybody at Nvidia that an Nvidia would be willing to you know sort of look at our use case and open up the cat your API for consumer cards because we know that they have opened up the capture API for some consumer cards then we are confident that we can make use of the capture API to really you know have some extra features and a little bit less latency on Nvidia guests as it is right now we can also use the DirectX capture API which is a little slower than the Nvidia capture API but it still works really well so you know the DirectX capture API is definitely an option so if anybody knows anybody at Nvidia it's like hey check out what these nerds are working on they're not trying to supplant the enterprise income they're just trying to play games under Linux we should help them out with that in the drivers and not you know do stuff please do put in a good word for us reach out and get in contact I've sent some emails to some of my contacts maybe we can maybe we can get stuff done because this technology is you know super duper exciting it isn't so much it I just I'm so excited it's gonna be a lot of fun now seeing this up close and personal has got your interest the future really honestly only gets brighter a lot of you may have heard especially if you've made it this far with the video you may have heard of a technology called SR io v and that technology has been in the enterprise you can take a single graphics card this supports SR io v and run multiple virtual machines that are all attached to that single graphics card most SR io v capable graphics cards don't even have outputs so if you look at you know especially some of the AMD cards that are SR I will be capable there's there's no output on the card so how do you get the output from the card to somewhere that a user can see it well a lot of the time those SR io v cards are used in virtual desktop infrastructure like you find in a company where people are remoting into a server and running their desktop that way this technology is the technology that we as consumers would use to run sr io v I know that AMD Vega has really great support for us our Iove a lot of people in the community myself included thought that maybe at least on the Vega frontier edition we would see sr io v support didn't come to pass but maybe by showing the technology that we have now we have the technology to copy the frame buffer at high speed and 32 bits you know full-color depth we're not playing any shenanigans with the color depth or anything like that it is literally a full frame buffer - frame buffer copy in the future it may even be possible to do direct copies through the PCI Express bus I mean that's gonna be way way down the road we don't have any idea how we would do that but theoretically that should be possible to do that which is I mean that is also Mon Boeing that is where the technology we go and then at that point we can package the entire operating system inside the container if you have SR iov support on your host GPU so you do have some outputs then you don't even need multiple GPUs SR io v would let a guest operating-system share the hosts operating systems single graphics card and that's why is our iove is so important but the other part of the missing equation with sr io v was how are we gonna get to the frame buffer that's being rendered rendered on the sr io v card and that's how we have the technology now there is one link hole with this you still have to have some kind of a monitor hook to the output because if you don't have any monitor displayed at least with the setup that i have it only goes to one o 24 by 768 vga not to worry we have dummy edid plugs you plug this in this shows up on the guest graphics card like you've got a 4k 60 Hertz monitor it's got a whole bunch of different display modes some of the cheap ones of these only have one or two video modes which is bad but this one has everything from 800 by 600 all the way up to 4 out of 96 by 2160 at 60 Hertz you plug this in and windows thinks a monitor is attached but you don't actually have to have a monitor attached you can get your your windows guest in a window windows in a window windows in a sandbox is more like it this technology is so exciting mad props to Jeff at hosts vision for pulling this off this is mostly his work I've just been along for the ride and helped with testing and the level 1 community again has really done a nice job supporting him there's a link in the description if you want to learn more about Jeff and support him directly and do all that kind of stuff and again big thanks to sapphire and AMD for providing Vega for us to be able to do stuff with this big thanks to gigabyte for providing Jeff's motherboard and big thanks to everybody who contributed the project without without all of us coming together as a community this would not be possible and yes this is very early alpha yes it's rough around the edges and yes it's not perfect but think about how much better we are today than we were yesterday it is really exciting I'm Wendell I'm signing out you can find me the level 1 text formsCaptain's Log supplemental we're about to release a new technology onto the internet so that it may grow and flourish and maybe take root it's hard to say KVM frame relay could change everything or it could be just another blip on the radar I can't say let me to introduce Looking Glass it's not every day I get to introduce a new technology although I guess the pedantic among you would say that it's not really new technology but it kind of is I mean honestly it is and it's very exciting Looking Glass is a piece of software that will help you copy the frame buffer from a windows guest to a Linux host that means that you can see what you see on your windows guest on your Linux host in a window we're running Fedora 26 I think on this this is hooked up to our host operating system we have a virtual machine running windows with iommu pass through this GT X 1080 Ti is passed through to our windows guest this ultra wide display is hooked up to our windows guest this window is coming from our windows guest and the way that's doing that is through the looking-glass software which creates a shared memory buffer between the host and guest operating system and through that shared memory buffer the two video cards are doing frame buffer stuff with that shared buffer so the guest video card as soon as a frame is done that frame is copied into that frame buffer and almost in real time that frame buffer is being displayed by the host operating system so the latency is extremely low as opposed to you know something like some kind of streaming technology or remote desktop or anything like that no it has none of the overhead of that the overhead of this is literally just the memory of memory copy plus whatever we have to deal with in the driver stack which we found was was actually quite a bit allow me to demonstrate rise of the Tomb Raider running we're going to run a rise of the Tomb Raider benchmark its 2560 by 1080 on both the guest and the host in NVIDIA dynamic super resolution is an option if you want to do that you can do 4k theoretical maximum frame rate is about 300 FPS at 4k with the memory bandwidth of our Intel Core i 9 our setup here is the gigabyte Oris x to 99 gaming with the 10 core 7900 X Intel we've got 32 gigabytes of g.skill Trident z DDR memory our host GPU is an r9 390x and our guest GPU is a gtx 1080i now I'm running Linux kernel 4.15 with the AMD GPU DC the next generation graphics drivers enabled for our r9 390x we've also tested this with gtx 1060 in the host and Vega in the host and an r9 fury in the host now there is a problem with Vega vega's framerate is not very good for some reason we're still investigating that big thanks to sapphire and AMD for providing a Vega this technology this program was written by a Jeff who figured out the NPT bug on rise in the same guy so he and I sort of got together and compared notes and we're looking at stuff and so this is his project and he showed me some of the early versions of stuff we've been working on it the last few weeks we had a fundraiser on level one Linux that was massively successful so again huge thanks to the level 1 Linux community you guys made it rain and that was enough stuff to buy to sort of fill in the gaps and make ends meet in terms of hardware but also big thanks to gigabyte so big thanks to pili computers Australia they're supplying the parts for this thing that because for Jeff it's local and it's really good so huge thanks to them there's a link to them in the description below be sure to click that and check them out just so they can see that hey there's a lot of interest in this project big thanks a lot of coverage a lot of excitement so the community sort of came together to make this technology happen and as you can see the latency is actually pretty low if you look at our high-speed footage you know typically it's running about one frame behind now we've got an experimental version of this that will allow us to grab the frame before the video card has started to display it because it's waiting on the monitor it's waiting on vsync and you get into an interesting situation so for the future it may be possible for us to grab the frame before it's displayed from the Nvidia graphics card and then display it on the host graphics card using free sync so yeah you could have free sync on a gtx 10a DTI technically although you're still going to get a little bit of latency that you get from the memory to memory copy memory to memory copy latency it's not really super high so it could be really exciting by the time we hit beta but right now it's just alpha don't look at your overly excited but this is available on github for you to download and compile and that sort of thing it's definitely not for the faint of heart you can't just you know rpm install this or dpkg install this we tested on ubuntu debian and fedora and you will have to make some changes some adjustments to the source for your system to actually compile this and do it hopefully in a few weeks or a couple of months or something like that it'll be ready for packaging there is a full how-to on the level 1 forum it's a wiki so if you want to set this up there's sort of a general how-to this set up has been really tuned to minimize latency now because this is an alpha release I do want to note that there are some known issues so don't everybody flood with a zillion bug requests in fact yeah definitely like let's keep the signal-to-noise ratio to a minimum there are bugs around qem use input so this is a spice client for those of you that know what that means but KVM and the spice client if the input mode is like a tablet where the positioning of the cursor is absolute there are bugs with qemu and relative input and QA mu has already been notified and they're working on it Jeff is sort of filed a bug report and that's really good the other thing is you're gonna need the Red Hat shared memory driver which can be a little tricky to install sometimes it will cause QEMU to crash when you install it again that's been fixed we're just waiting on qmu to catch up there are patches if you want to manually install it if you're feeling adventurous there are some other bugs that have been exposed with qemu because if you're using a emulated ps2 mouse and keyboard sometimes QAM you will get mixed up about which device is active so for now I would recommend still using a separate ps2 mouse and keyboard and passing those through separately or a separate USB keyboard and passing those through separately that are physical Hardware that's what I'm doing back here but because it is a spice client once the bugs are fixed in spice it should be okay it's not actually a problem with with looking glass or anything like that it's just that nobody uses relative input mouse mode because it doesn't make sense the normal way that you use spice so you know just keep that in mind there are other known issues that are documented on a level one text forum so be sure to check that before we get 387 requests it's about you know the mouse not working or something like that with looking glass because it's gonna be a really busy next few weeks if you want to support us hey you know Jeff's info is down there at the bottom level one text can always use more people on patreon or buying t-shirts or mugs or whatever so it's a it's an exciting time I can't wait to do more projects like this you know if you're a crazy person you could use a KVM to switch between guest and host like I do but I think this technology's gonna make that obsolete although I'm gonna use the KPM because I've got so many computers they're not necessarily all on the same box but it still works really well if you leave vsync at the defaults on the guest and a host you can introduce extra latency but as you can see from our high-speed footage the guest is running only about one frame ahead of the host at around 1 and a refresh of about 60 Hertz give or take which is mind-blowing it's mind-blowing that it's that it's that fast now in terms of capturing the frame from the guest to the host the Nvidia capture API for this is really great but to be able to use the Nvidia capture API at least for plebs like us you've got to have an NVIDIA Quadro so it's a little bit like the code 43 problem except there's not exactly a workaround so if you if anybody knows anybody at Nvidia that an Nvidia would be willing to you know sort of look at our use case and open up the cat your API for consumer cards because we know that they have opened up the capture API for some consumer cards then we are confident that we can make use of the capture API to really you know have some extra features and a little bit less latency on Nvidia guests as it is right now we can also use the DirectX capture API which is a little slower than the Nvidia capture API but it still works really well so you know the DirectX capture API is definitely an option so if anybody knows anybody at Nvidia it's like hey check out what these nerds are working on they're not trying to supplant the enterprise income they're just trying to play games under Linux we should help them out with that in the drivers and not you know do stuff please do put in a good word for us reach out and get in contact I've sent some emails to some of my contacts maybe we can maybe we can get stuff done because this technology is you know super duper exciting it isn't so much it I just I'm so excited it's gonna be a lot of fun now seeing this up close and personal has got your interest the future really honestly only gets brighter a lot of you may have heard especially if you've made it this far with the video you may have heard of a technology called SR io v and that technology has been in the enterprise you can take a single graphics card this supports SR io v and run multiple virtual machines that are all attached to that single graphics card most SR io v capable graphics cards don't even have outputs so if you look at you know especially some of the AMD cards that are SR I will be capable there's there's no output on the card so how do you get the output from the card to somewhere that a user can see it well a lot of the time those SR io v cards are used in virtual desktop infrastructure like you find in a company where people are remoting into a server and running their desktop that way this technology is the technology that we as consumers would use to run sr io v I know that AMD Vega has really great support for us our Iove a lot of people in the community myself included thought that maybe at least on the Vega frontier edition we would see sr io v support didn't come to pass but maybe by showing the technology that we have now we have the technology to copy the frame buffer at high speed and 32 bits you know full-color depth we're not playing any shenanigans with the color depth or anything like that it is literally a full frame buffer - frame buffer copy in the future it may even be possible to do direct copies through the PCI Express bus I mean that's gonna be way way down the road we don't have any idea how we would do that but theoretically that should be possible to do that which is I mean that is also Mon Boeing that is where the technology we go and then at that point we can package the entire operating system inside the container if you have SR iov support on your host GPU so you do have some outputs then you don't even need multiple GPUs SR io v would let a guest operating-system share the hosts operating systems single graphics card and that's why is our iove is so important but the other part of the missing equation with sr io v was how are we gonna get to the frame buffer that's being rendered rendered on the sr io v card and that's how we have the technology now there is one link hole with this you still have to have some kind of a monitor hook to the output because if you don't have any monitor displayed at least with the setup that i have it only goes to one o 24 by 768 vga not to worry we have dummy edid plugs you plug this in this shows up on the guest graphics card like you've got a 4k 60 Hertz monitor it's got a whole bunch of different display modes some of the cheap ones of these only have one or two video modes which is bad but this one has everything from 800 by 600 all the way up to 4 out of 96 by 2160 at 60 Hertz you plug this in and windows thinks a monitor is attached but you don't actually have to have a monitor attached you can get your your windows guest in a window windows in a window windows in a sandbox is more like it this technology is so exciting mad props to Jeff at hosts vision for pulling this off this is mostly his work I've just been along for the ride and helped with testing and the level 1 community again has really done a nice job supporting him there's a link in the description if you want to learn more about Jeff and support him directly and do all that kind of stuff and again big thanks to sapphire and AMD for providing Vega for us to be able to do stuff with this big thanks to gigabyte for providing Jeff's motherboard and big thanks to everybody who contributed the project without without all of us coming together as a community this would not be possible and yes this is very early alpha yes it's rough around the edges and yes it's not perfect but think about how much better we are today than we were yesterday it is really exciting I'm Wendell I'm signing out you can find me the level 1 text forms\n"