[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111116":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":13,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":28,"discoverSource":29},111116,"guesthouse","xnixy\u002Fguesthouse","xnixy","GPU virtual machines on Linux",null,"Rust",123,12,2,5,0,16,49,9,59.9,"GNU General Public License v2.0",false,"main",[],"2026-11-23 20:37:53","2026-11-23 08:12:28","# Guesthouse\n\n**Windows and Linux VMs on KVM that share the GPU my desktop is running on, with the vendor's real driver inside.**\n\n![Godot's Forward+ renderer on Vulkan inside a Windows VM](docs\u002Fimages\u002Fvulkan-in-windows.jpg)\n\nThat's Godot on Vulkan, in Windows, in a VM on Fedora. Nothing is passed through. The host keeps the card, and my desktop keeps running on it.\n\n> **Status:** early. 0.4.0 is out. It runs well on my RTX 5090, and testers have run Windows on NVIDIA and AMD cards of their own, [listed below](#cards). AMD is newer and experimental. What works and what's next is in the [roadmap](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F2).\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fxnixy\u002Fguesthouse\u002Fmain\u002Finstall.sh | sh\n```\n\nYou need x86_64 Linux. For a GPU in a VM you need an NVIDIA card with the open kernel modules, or an AMD card on amdgpu. Without one it still installs, with plain VMs, and tells you why. The script is meant to be read first, and [what it does](docs\u002Finstall.md) is written out step by step.\n\n### Cards\n\nWindows with the GPU has run on these:\n\n| Card | | How it went |\n|---|---|---|\n| RTX 5090 | NVIDIA, Blackwell | Works. It's the card I build on |\n| RTX 4080 | NVIDIA, Ada | Works, on a tester's PC |\n| RTX A1000 Laptop | NVIDIA, Ampere | Windows and its driver work. Fixes for the laptop's screen are in 0.4.0, waiting on a retest |\n| RTX 3050 Laptop | NVIDIA, Ampere | Waiting to hear back |\n| Radeon 610M | AMD, RDNA2, integrated | Works. It's the graphics in my Ryzen |\n| RX 7900 XTX | AMD, RDNA3 | Works, basic 3D so far |\n| RX 6600 XT | AMD, RDNA2 | Works. One old Direct3D 9 game shows stripes |\n| RX 6900 XT | AMD, RDNA2 | The display driver failed on 0.3.0. Not tried on 0.4.0 yet |\n\nNobody has tried these yet. They should work, most likely first:\n\n- Other RTX 50 and 40 series cards, desktop and laptop\n- RTX 30 series, desktop and laptop\n- RTX 20 and GTX 16 series\n- Other RX 7000 and RX 6000 cards, and RDNA2 or RDNA3 graphics in a Ryzen\n- RX 5000 cards, which use the same AMD driver package as the RX 6000s\n\nNot yet: RX 9000 cards lay out their memory differently, and the copies to the screen don't handle that yet. Older AMD cards like Polaris, GTX 10 series and older NVIDIA cards, and datacentre cards like the A100 aren't handled.\n\nIf yours is in neither list, or you've tried one, [#9](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F9) is for NVIDIA and [#1](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F1) for AMD.\n\n## Why\n\nA real GPU in a Windows VM on Linux usually means passing the whole card through with VFIO, so the host loses it, or paying for a datacenter card and a vGPU licence.\n\nHyper-V has a third way, called GPU-PV. The guest runs the vendor's normal driver and shares the host's card. It's how WSL gets its GPU. KVM doesn't have it, and I wanted it, because my one big GPU is also the one running my desktop.\n\nSo Guesthouse teaches KVM to speak Hyper-V's GPU protocol. Windows boots, finds what looks like a Hyper-V GPU, and loads the vendor's unmodified driver. The commands that driver writes run straight on the card.\n\n## What works\n\n**Windows on NVIDIA.** Direct3D 12 and 11, Vulkan, OpenGL, OpenCL, CUDA, NVENC and NVDEC all run on the real card, and Edge is hardware accelerated. A fresh install takes about 9 minutes from picking the ISO to a working GPU. Work runs at full speed once it reaches the card. Superposition in Direct3D 11 gets about 89% of what the same card scores on the host, and OpenGL about 54%. I'm still looking for the rest, in [#124](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F124) and [#122](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F122).\n\n**Windows on AMD (experimental).** This uses AMD's own Windows driver, unpacked from AMD's installer. It has run on the integrated RDNA2 Radeon in my Ryzen and on testers' RX 6600 XT and RX 7900 XTX. The desktop, Direct3D 12 and 11, Vulkan and OpenGL work, and hardware video decode doesn't yet. [More on AMD](docs\u002Famd.md).\n\n**Linux guests.** These take a different route: the guest runs NVIDIA's Linux driver, and its calls are forwarded to the host's. CUDA, Vulkan, NVENC and NVDEC work at about host speed, and GNOME and Plasma run on it. On an AMD card the guest runs Mesa on the real card instead, through virtio-gpu's native context. See [`linux\u002F`](linux\u002FREADME.md).\n\nThe numbers, and how I check the picture is right, are in [performance](docs\u002Fperformance.md).\n\n**Without a window.** `guesthouse-vm` makes, installs, starts and stops machines from a terminal, so a PC with no desktop can run them. [How it works](docs\u002Fheadless.md).\n\n**Beside your own QEMU or libvirt.** The daemon can take the guest's memory as two files, so QEMU can be started by something else. [How, and what's untested](docs\u002Fstandalone.md).\n\n![The app's library, with a Windows machine and an Ubuntu machine](docs\u002Fimages\u002Fapp-library.jpg)\n\n## The app\n\nYou don't need a terminal. Give the app an ISO and it installs Windows or Ubuntu by itself, with the GPU set up. If your PC has more than one card, you pick one for each machine when you make it. A machine can move to another card from the same maker later, while it's off. Another maker's card needs a new machine, as Windows is set up for one vendor's driver.\n\n![Windows on the real GPU in the app's viewer](docs\u002Fimages\u002Fapp-viewer.jpg)\n\nIn the viewer, **Ctrl+Alt+M** captures the mouse, which games need. **Ctrl+Alt+Return** goes full screen, and **Ctrl+Alt+P** shows the performance overlay.\n\nFor the best speed, run games full screen and pick Direct3D 12 when a game offers it. In a window, Direct3D 11 presents through a copy that can cost up to half the frame rate, and Vulkan does everywhere for now.\n\n## How it works\n\n```\nWindows guest                              Linux host\n┌──────────────────────────┐               ┌──────────────────────────────┐\n│ your app                 │               │ a daemon, playing the part   │\n│ the vendor's driver      │               │ of Hyper-V                   │\n│ dxgkrnl (GPU-PV client)  │ ── VMBus ──▶  │ the host's GPU driver        │\n└──────────────────────────┘    (QEMU)     │ the card                     │\n                                           └──────────────────────────────┘\n```\n\n- **A QEMU patch** gives the guest the devices and VMBus channels it expects on Hyper-V, plus the Linux guest's device.\n- **A daemon** answers what Windows asks and runs its work on the card, through a backend for each vendor.\n- **The app** installs and runs the machines. It also puts a display driver of mine into Windows, signed with a certificate made on your PC.\n\nThe guest's commands aren't translated. Its driver writes them and the card runs them. [ARCHITECTURE.md](ARCHITECTURE.md) has the details.\n\n## Is it safe?\n\nPrograms in a VM get their own GPU page tables, and can't read each other's memory. Windows never talks to the host's driver, only to the daemon, which checks everything it's sent. QEMU and the daemon are jailed with Landlock and seccomp. A guest can still slow the card down for everyone, and a bug in the GPU driver is a bug in your kernel, so only run guests you trust. [The full picture](docs\u002Fsecurity.md).\n\n## What doesn't work yet\n\nQuite a lot, and I'd rather you hear it from me. The list lives in the [roadmap](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F2), so it stays current. The biggest gap is how few cards have run this. If you'd like to help with yours, see [#9](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F9) for NVIDIA and [#1](https:\u002F\u002Fgithub.com\u002Fxnixy\u002Fguesthouse\u002Fissues\u002F1) for AMD.\n\nSome of the bugs on the way were good ones. [Here are my favourites](docs\u002Fbugs.md).\n\n## Working on it\n\nYou need Rust 1.88 or newer, or 1.92 for the app, and no GPU.\n\n```sh\ncargo test                       # everything but the app\ncargo bench -p guesthouse-core   # the message path, in nanoseconds\ncargo run -p guesthouse-app      # needs GTK 4.16 and libadwaita 1.5 development files\n```\n\nWith GTK 4.14, add `--no-default-features` to leave out HDR. A plain build has no GPU backend, so add `--features guesthouse-daemon\u002Fnvidia,guesthouse-daemon\u002Famd`. [CONTRIBUTING.md](CONTRIBUTING.md) has the rest.\n\n## Bring your own\n\nThere are no NVIDIA, AMD or Microsoft binaries in this repo. You bring your own Windows ISO and GPU driver. A few tables and some sample code come from what they've published as open source, and [THIRD-PARTY.md](THIRD-PARTY.md) lists them. This is a personal project, and it has nothing to do with NVIDIA, AMD or Microsoft.\n\n## Thanks\n\nQEMU; Microsoft's dxgkrnl for Linux, the public source for how GPU-PV talks; NVIDIA's open kernel modules; Mesa, for Zink and the open AMD drivers; gVisor's nvproxy; zako-vdd, which the display driver is a fork of; Microsoft's OpenVMM; and GTK, libadwaita and the Rust crates the app is built on.\n\n## Licence\n\nCopyright (C) 2026 xnixy. GPL-2.0-or-later, the QEMU patch included, apart from what [THIRD-PARTY.md](THIRD-PARTY.md) lists. See [LICENSE](LICENSE).\n\nNVIDIA, GeForce, AMD, Radeon and Windows are trademarks of their owners.\n","Guesthouse 是一个基于 KVM 的 GPU 虚拟化工具，允许 Linux 主机在不独占显卡的前提下，为 Windows 或 Linux 虚拟机提供原生 GPU 加速能力。其核心通过实现 Hyper-V GPU 协议（GPU-PV），使虚拟机可直接加载 NVIDIA\u002FAMD 官方驱动并共享主机正在使用的显卡，支持 Vulkan、Direct3D 等图形 API。技术上基于 Rust 开发，依赖开源内核模块（NVIDIA open kernel modules 或 amdgpu），无需 VFIO 直通或商业 vGPU 授权。适用于桌面级开发、游戏测试、跨平台图形应用调试等需兼顾主机显示与虚拟机 GPU 性能的场景。","2026-11-24 04:40:11","CREATED_QUERY"]