Skip to content

SNP fixes - #158

Merged
Brian Perkins (Brian-Perkins) merged 2 commits into
microsoft:product/hcl-main/6.18from
Brian-Perkins:snp_fixes
Aug 20, 2026
Merged

SNP fixes#158
Brian Perkins (Brian-Perkins) merged 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

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.

Comment thread arch/x86/kernel/apic/x2apic_savic.c Outdated
Comment thread arch/x86/kernel/apic/x2apic_savic.c Outdated
Comment thread arch/x86/kernel/apic/x2apic_savic.c Outdated
Brian Perkins added 2 commits August 19, 2026 17:02
Signed-off-by: Brian Perkins <brian.perkins@microsoft.com>
Signed-off-by: Brian Perkins <brian.perkins@microsoft.com>

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@Brian-Perkins
Brian Perkins (Brian-Perkins) merged commit 5b3c33d into microsoft:product/hcl-main/6.18 Aug 20, 2026
11 checks passed
Brian Perkins (Brian-Perkins) added a commit to microsoft/openvmm that referenced this pull request Aug 21, 2026
microsoft/OHCL-Linux-Kernel#158

Co-authored-by: Brian Perkins <brian.perkins@microsoft.com>
Brian Perkins (Brian-Perkins) added a commit to microsoft/openvmm that referenced this pull request Aug 21, 2026
microsoft/OHCL-Linux-Kernel#158

Clean CP of #4302

Co-authored-by: Brian Perkins <brian.perkins@microsoft.com>
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.

4 participants