Skip to content

GPU paravirtualization for Windows VMs - bringing QEMU/KVM-style VM customization freedom to Windows with GPU acceleration

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

templarsco/pvgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

PVGPU - Paravirtualized GPU for Windows VMs

Build License

GPU paravirtualization for Windows guests on Windows hosts - bringing QEMU/KVM-style VM customization freedom to Windows while providing GPU acceleration for gaming.

๐ŸŽฏ The Problem We Solve

On Linux, QEMU/KVM + VFIO gives you:

  • โœ… Full VM identity customization (SMBIOS, CPUID, firmware)
  • โœ… GPU passthrough for near-native gaming performance

On Windows, your options are limited:

  • Hyper-V/NanaBox: GPU-PV works, but no identity customization
  • QEMU with WHPX: Full customization, but no GPU acceleration for Windows guests
  • VMware/Parallels: Proprietary, limited customization

PVGPU bridges this gap - run Windows VMs with QEMU's customization AND GPU acceleration, all on a Windows host.

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Windows Guest (10/11)                                          โ”‚
โ”‚  โ””โ”€โ”€ Game/App (DX11) โ†’ WDDM Paravirt Driver (KMD + UMD)         โ”‚
โ”‚            โ”‚                                                    โ”‚
โ”‚            โ–ผ Shared Memory (Command Rings + Fences)             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  QEMU (WHPX acceleration)                                       โ”‚
โ”‚  โ””โ”€โ”€ qemu-pvgpu device (PCIe virtual, BAR0 config, BAR2 shmem)  โ”‚
โ”‚            โ”‚                                                    โ”‚
โ”‚            โ–ผ                                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Host Backend Service (Rust)                                    โ”‚
โ”‚  โ””โ”€โ”€ D3D11 Renderer โ†’ Real GPU (NVIDIA/AMD)                     โ”‚
โ”‚  โ””โ”€โ”€ Presentation: Local window + Headless/Streaming            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Components

Component Language Description
protocol/ C Shared protocol definitions
qemu-device/ C QEMU PCIe device emulation
backend/ Rust Host rendering service (D3D11)
driver/kmd/ C Windows kernel-mode WDDM driver
driver/umd/ C++ Windows user-mode D3D11 driver

๐Ÿš€ Quick Start

Prerequisites

  • Windows 11 with Hyper-V/WHPX enabled
  • NVIDIA (10 series+) or AMD (RDNA+) GPU
  • Rust (for backend)
  • QEMU with WHPX support
  • Windows Driver Kit (for driver development)

Building

# Build the backend service
cd backend
cargo build --release

# For QEMU device - see qemu-device/README.md
# For drivers - see driver/README.md

Running

# Start the backend service
.\backend\target\release\pvgpu-backend.exe

# Start QEMU with pvgpu device
qemu-system-x86_64 -accel whpx -device pvgpu,shmem_size=256M ...

๐ŸŽฎ Use Cases

  • Gaming in VMs with GPU acceleration AND custom VM identity
  • Anti-fingerprinting - appear as different hardware to guest OS
  • Development/Testing - test on various "hardware" configurations
  • Streaming - works with Parsec, Moonlight, Sunshine

๐Ÿ“Š Performance Targets

  • Target: 60-80% of native GPU performance
  • Latency: <50ms additional input latency
  • API: DirectX 11 (DX12 planned for future)

๐Ÿ›ฃ๏ธ Roadmap

  • Protocol definition (shared header, command types, feature flags)
  • QEMU PCIe device (BAR0 config, BAR2 shared memory, MSI-X, named pipe IPC)
  • Rust backend service (D3D11 renderer, command processor, presentation pipeline)
  • Full D3D11 command implementation (50+ DDI functions, all draw/state/resource commands)
  • WDDM kernel-mode driver (BAR mapping, ring buffer, heap allocator, VidPn, interrupt handler)
  • WDDM user-mode driver (D3D11 DDI, staging buffer, fence sync, compute shader support)
  • Display mode support (720p-4K, 60-144Hz, dynamic resolution change)
  • Presentation pipeline (windowed, headless, dual mode, VSync, frame events)
  • Format support data (78 DXGI formats with capability flags)
  • Shared resource opening (cross-process resource sharing)
  • Compute shader support (CS dispatch, UAV, SRV, sampler, constant buffer binding)
  • Error handling and robustness (device lost, OOM, shader errors, backend crash)
  • Driver packaging (INF, WDK build configs, CI pipeline)
  • Integration testing (requires VM environment)
  • Performance optimization (profiling, command batching, telemetry)
  • DX12 support (future)

๐Ÿค Contributing

Contributions are welcome! This is an ambitious project that needs help with:

  • D3D11/D3D12 expertise
  • Windows driver development
  • QEMU device development
  • Testing on various hardware

See CONTRIBUTING.md for guidelines.

๐Ÿ“œ License

Dual-licensed under MIT and Apache 2.0. See LICENSE-MIT and LICENSE-APACHE.

QEMU device code is GPL-2.0-or-later to match QEMU's license.

๐Ÿ™ Acknowledgments

Inspired by:

โš ๏ธ Disclaimer

This project is for legitimate use cases like development, testing, and privacy. It is not intended for bypassing anti-cheat systems or any malicious purposes.

About

GPU paravirtualization for Windows VMs - bringing QEMU/KVM-style VM customization freedom to Windows with GPU acceleration

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published