Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyper-v host GPU encoding, slicing resources #4418

Open
totaam opened this issue Nov 11, 2024 · 3 comments
Open

hyper-v host GPU encoding, slicing resources #4418

totaam opened this issue Nov 11, 2024 · 3 comments
Labels
encoding enhancement New feature or request win32 MS Windows OS

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 11, 2024

This ticket may well end up moved to another project if it proves beneficial to more than just xpra.

Hyper-v:

Important: most passthrough and partitioning solutions don't allow guests to access to the hardware encoders, only opengl / vulcan.
Another (smaller) downside is that they require modifications to the OS configuration that cannot easily be managed using a package or script.
So, perhaps we should expose a memory mapped service to the guests so that they can hand over pixel buffers to the host which can take care of managing the encoder chip(s) and send back encoded frames.

For now, this is just an easy place to dump references and links:

  • libvf.io: LibVF.IO is a vendor neutral GPU multiplexing tool driven by YAML & VFIO sounds good, but looks outdated - lots of dead links and no updates since last year...
  • GVT - has now been abandoned by Intel
  • GPU Virtual Machine GPU Virtual Machine for IOMMU-capable computers such as x86 and ARM looks abandoned, openmdev.io no longer exists.
  • MxGPU-Virtualization - Linux kernel module for AMD SR-IOV based HW Virtualization, also abandoned
  • vgpu_unlock - clearly the nvidia drivers could enable vgpu on all cards... but choose not to

I CAN (edit) find the ivshmem equivalent for hyper-v: see #3666 and VMBUS: VMbus enables efficient, low-latency communication between the host and the guest VM


ivshmem links for the Linux implementation: #3810

@totaam
Copy link
Collaborator Author

totaam commented Nov 19, 2024

For OpenGL acceleration of WSL2 guests, see https://github.com/Xpra-org/xpra/blob/master/docs/Usage/WSL.md

@totaam
Copy link
Collaborator Author

totaam commented Nov 19, 2024

As for GPU encoding, AMD AMF includes some code samples:
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/samples/
It's not yet clear to me if we can use DirectX11 contexts when running in Windows Server context.
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c : this sample encodes NV12 frames using AMF Encoder and writes them to H.264 elementary stream

@totaam totaam added win32 MS Windows OS encoding labels Nov 23, 2024
@totaam
Copy link
Collaborator Author

totaam commented Dec 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoding enhancement New feature or request win32 MS Windows OS
Projects
None yet
Development

No branches or pull requests

1 participant