Accessing XenServer shared (Grant Table) memory from Windows (10) guest
-
Hello fellow humans,
--- PRELUDE ---
I've decided recently to use XenServer (xcp-ng to be more precise) in order to 'split' my workstation into Linux-kernel-based-system/Windows PC. I have solved my graphics issues by using two PCI-passthrough'ed GPUs with 'input switching' built-in into my monitors using DDC, but then the enemy revealed itself 'how do I send key presses and mouse input to appriopriate (screen-visible) machine?' (with as-low-as-possible latency, as the Windows VM is for gaming, of course). I'm planning to read the inputs with freedesktop's libinput directly as Dom0 does not need it/doesn't have any GPU/screen anyway. Then I found that Xen-people call the phenomenal feature allowing to map the same physical pages of memory multiple times, the Grant Table, but...
--- MAIN ISSUE ---
Accessing/mapping the memory from Linux-kernel-based guest seems very easy after... well... Googling it.
On the Windows guest, on the other hand, I cannot find any way to do it, not only I cannot find any wiki-articles, forums threads, nor GitHub projects that use that feature, but I also cannot figure how (I already assume the is no Windows library exposing it) could I perform a hypervisor-level call from Windows (I guess Windows might expose to the userspace apps some wrapper to do hypercalls, it does not seem to care about that level of security, if not, I assume it would at least be possible running a driver-level access application, commonly called a 'driver' for some dummy device, to perform that kind of call).
--- THE QUESTION ---
Do you know any kind of resource or something that would help me figure out how to access this memory from Windows guest (preferably by some nice wrapper/library, if not, in any way) or maybe some other way to solve my 'inputting' issue?
Keep in mind though, that I need to run a 'client application' in guests in order to inform the Dom0 'server' that (for example) server-known mouse position should be adjusted as current application locks Cursor for the current window, so it should not be 'redirected' to the other vm on the other monitor, etc. - the memory buffer solution seems be the easiest, cleaniest, and generally best option, if not for the Windows issues.Thank you for help, and if not, at least for reading this long thing.