Skip to content

drivers: hv: clear halt when injecting SNP interrupts#150

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

drivers: hv: clear halt when injecting SNP interrupts#150
Brian-Perkins wants to merge 1 commit into
microsoft:product/hcl-main/6.18from
Brian-Perkins:snp_clear_hlt_on_interrupt

Conversation

@Brian-Perkins

@Brian-Perkins Brian-Perkins commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

drivers: hv: better management of the VLT0 HLT/IDLE state. Need to track this properly in order to choose the proper behavior for VTL2 idle behavior (e.g. should we transition to VTL0 or is VTL0 in a halt state).

Signed-off-by: Brian Perkins bperkins@microsoft.com

Copilot AI review requested due to automatic review settings June 26, 2026 01:11

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 SEV-SNP interrupt wakeup behavior by ensuring a vCPU previously marked as halted is un-halted when pending interrupts are observed in the Secure AVIC (vAPIC) IRR, allowing VTL0 to resume execution instead of remaining in native_safe_halt().

Changes:

  • Add an SNP-specific helper to clear HALT_* offload flags (and MSHV_VTL_RUN_FLAG_HALTED when applicable) when IRR indicates a pending interrupt.
  • Invoke that helper after pulling proxy_irr into the SNP Secure AVIC page in the interrupt-injection fast path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings July 13, 2026 20:22

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.

Copilot AI review requested due to automatic review settings July 13, 2026 23:19

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 1 comment.

Comment thread drivers/hv/mshv_vtl_main.c
Copilot AI review requested due to automatic review settings July 13, 2026 23:35

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.

@namancse

Copy link
Copy Markdown
Contributor

Hi @Brian-Perkins, could you please elaborate the commit messages of the commits, and reorganize them if required. With ever increasing OOT changes in the kernel, the goal is now to do strict scrutiny for any patches that go in and merge them only when they are absolutely clear on what they are doing, are bug free and are as close to upstream kernel guidelines as possible. It is also going to help track the OOT changes for upstreaming later.

Addressing copilot comments from UI seems to be creating new commits, which we can avoid. I have also noticed that copilot sometimes does not give all the comments at once, so we may have to go through multiple iterations.

Tracking of current VTL0 state via offload_flags need to be kept up to
date in order to properly handle VTL2 idle behavior.
@Brian-Perkins

Copy link
Copy Markdown
Contributor Author

Hi @Brian-Perkins, could you please elaborate the commit messages of the commits, and reorganize them if required. With ever increasing OOT changes in the kernel, the goal is now to do strict scrutiny for any patches that go in and merge them only when they are absolutely clear on what they are doing, are bug free and are as close to upstream kernel guidelines as possible. It is also going to help track the OOT changes for upstreaming later.

Addressing copilot comments from UI seems to be creating new commits, which we can avoid. I have also noticed that copilot sometimes does not give all the comments at once, so we may have to go through multiple iterations.

Done. Note in other projects we do this by using squash merge so the description is what appears in the PR and the commits are just temporary while the PR is in progress.

@Brian-Perkins Brian-Perkins force-pushed the snp_clear_hlt_on_interrupt branch from a7f2bf7 to 84d79f5 Compare July 14, 2026 15:38
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.

3 participants