drivers: hv: clear halt when injecting SNP interrupts#150
Conversation
There was a problem hiding this comment.
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 (andMSHV_VTL_RUN_FLAG_HALTEDwhen applicable) when IRR indicates a pending interrupt. - Invoke that helper after pulling
proxy_irrinto 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.
|
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.
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. |
a7f2bf7 to
84d79f5
Compare
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