feat: MSI interrupt-driven VirtIO GPU + VirGL fixes#243
Merged
Conversation
Replace busy-polling with MSI interrupt + WFI completion for VirtIO GPU commands. Each VirGL frame previously burned ~50ms spinning in a tight poll loop with SeqCst fences. Now the guest halts with WFI, Parallels processes the command immediately, and delivers an MSI interrupt to wake the vCPU. Result: 10 FPS → 2000-3000 FPS. Key changes: - SPI allocation infrastructure (allocate_msi_spi) so GPU and xHCI don't collide on the same GICv2m SPI - Cached queue notify addresses — single write_volatile instead of 3 MMIO ops per notification - MSI setup + interrupt handler with WFI completion loop - GPU MSI dispatch in aarch64 exception handler VirGL command encoding fixes: - Rasterizer fill mode was POINT (2) instead of FILL (0) — all triangles rendered as invisible 1-pixel dots - SET_VERTEX_BUFFERS had spurious start_slot DWORD making length%3!=0, causing silent EINVAL from host (vertex buffers never bound) - SHADER_FRAGMENT constant was 4 (TESS_EVAL) instead of 1 - Shader compilation never triggered (bit 31 not set in offset field) Also adds VirGL command encoder module (virgl.rs), Linux reference implementations for Parallels VirGL benchmarking, and minor cleanups. Co-Authored-By: Ryan Breen <rbreen@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code