drivers: hv: SNP perf fixes - #156
Open
Brian Perkins (Brian-Perkins) wants to merge 1 commit into
Open
Conversation
Decode register values with vmsa key. Don't send ipi to cpu that is already pending an interrupt scan. Check for interrupts handled entirely in the kernel. Add kernel fast-path for some stimer0 operations.
Copilot started reviewing on behalf of
Brian Perkins (Brian-Perkins)
August 3, 2026 19:20
View session
There was a problem hiding this comment.
Pull request overview
This PR improves Hyper-V VTL (VTL2) performance for SEV-SNP guests by reducing avoidable user/kernel transitions and unnecessary IPIs, and by adding a kernel fast-path for select synthetic timer operations.
Changes:
- Add an SNP per-vCPU context block to the shared
mshv_vtl_runpage, including a VMSA tweak bitmap and synthetic timer (stimer0) state. - Coalesce proxy-IRR scan wakeups so CPUs aren’t sent reschedule IPIs when a scan is already pending.
- Add SNP kernel handling for interrupt-entry and for
HV_X64_MSR_STIMER0_COUNTwrites (including an hrtimer-backed wakeup path).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| drivers/hv/mshv_vtl.h | Introduces snp_vp_context in the run-page union and defines stimer0 flag bits used by the SNP fast-path. |
| drivers/hv/mshv_vtl_main.c | Implements IPI coalescing for proxy IRR scans, adds VMSA register decode helpers, and adds an hrtimer-backed kernel fast-path for stimer0 count writes and interrupt-entry handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Decode register values with vmsa key.
Don't send ipi to cpu that is already pending an interrupt scan.
Check for interrupts handled entirely in the kernel.
Add kernel fast-path for some stimer0 operations.