Skip to content

drivers: hv: SNP perf fixes - #156

Open
Brian Perkins (Brian-Perkins) wants to merge 1 commit into
microsoft:product/hcl-main/6.18from
Brian-Perkins:more_snp_perf
Open

drivers: hv: SNP perf fixes#156
Brian Perkins (Brian-Perkins) wants to merge 1 commit into
microsoft:product/hcl-main/6.18from
Brian-Perkins:more_snp_perf

Conversation

@Brian-Perkins

Copy link
Copy Markdown
Contributor

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.

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 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 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_run page, 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_COUNT writes (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.

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