SNP fixes - #158
Open
Brian Perkins (Brian-Perkins) wants to merge 2 commits into
Open
Conversation
added 2 commits
August 14, 2026 21:15
Signed-off-by: Brian Perkins <brian.perkins@microsoft.com>
Signed-off-by: Brian Perkins <brian.perkins@microsoft.com>
Copilot started reviewing on behalf of
Brian Perkins (Brian-Perkins)
August 14, 2026 21:18
View session
There was a problem hiding this comment.
Pull request overview
This PR fixes two x86 Secure AVIC (SEV-SNP) issues in the x2APIC SAVIC implementation: correct guest-physical address (GPA) derivation for the per-CPU APIC backing page and correct IPI destination handling by translating APIC ID → CPU ID before indexing per-CPU data.
Changes:
- Compute SAVIC backing page GPA using
per_cpu_ptr_to_phys()instead of__pa()to correctly handle per-CPU pointers. - Fix IPI delivery by converting an ICR destination APIC ID into a CPU index before calling
send_ipi_dest(). - Refactor ICR/IPI helpers to avoid repeated APICID↔CPU confusion and to handle shorthand vs. explicit destinations cleanly.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
x86/apic/savic: get GPA for SAVIC page using per_cpu_ptr_to_phys
x86/apic/savic: ipi needs to convert apicid to cpuid