tenclass / mvisor-win-vgpu-driver

Implementation of OpenGL on windows guest virtual machine using Mesa/Virgl protocol.
GNU General Public License v3.0
114 stars 21 forks source link

what's the difference between usermode and kernelmode #12

Open devtinoimao opened 1 week ago

devtinoimao commented 1 week ago

so I don't really know the difference however I read once in How Linux works (part 2 I think), is that the linux kernel has a space , one for the system and base of the kernel (kernelmode space I think) (my brain is cooked) and another space for user apps and the desktop, and mixing both spaces causes severe instability and crashes (well that's what I know atleast), so I'm just very confused in this

nooodles2023 commented 1 week ago

For both real device and virtual device, we can't access it directly in a normal application program. The only way to use device is using driver installed on device. The driver is in kernel space, it provides interface for program in user space.

nooodles2023 commented 1 week ago

In this project, the guest app loads opengl32.dll. Opengl operations will be transmited to MvisorVGPU.dll which translate them to virgl commands and deliver them to kernelmode driver