Skip to content

SNP fixes - #158

Open
Brian Perkins (Brian-Perkins) wants to merge 2 commits into
microsoft:product/hcl-main/6.18from
Brian-Perkins:snp_fixes
Open

SNP fixes#158
Brian Perkins (Brian-Perkins) wants to merge 2 commits into
microsoft:product/hcl-main/6.18from
Brian-Perkins:snp_fixes

Conversation

@Brian-Perkins

Copy link
Copy Markdown
Contributor

x86/apic/savic: get GPA for SAVIC page using per_cpu_ptr_to_phys

x86/apic/savic: ipi needs to convert apicid to cpuid

Brian Perkins 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 AI lite review requested due to automatic review settings August 14, 2026 21:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants