Skip to content

Conversation

@jennagoddard
Copy link
Contributor

Remove a couple SNP TODO comments that are out of date.

@jennagoddard jennagoddard requested a review from a team as a code owner January 27, 2026 05:54
Copilot AI review requested due to automatic review settings January 27, 2026 05:54
@github-actions github-actions bot added the unsafe Related to unsafe code label Jan 27, 2026
@github-actions
Copy link

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes outdated SNP-related TODOs and updates SNP RMP-adjust documentation around VMSA handling.

Changes:

  • Removes a stale TODO comment in SNP CPUID extended max function logic.
  • Updates rmpadjust_pages rustdoc with notes about how VMSA pages are converted.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
openhcl/virt_mshv_vtl/src/cvm_cpuid/snp.rs Removes an outdated SNP TODO comment in CPUID max-leaf selection.
openhcl/hcl/src/ioctl/snp.rs Updates rmpadjust_pages documentation and modifies behavior around VMSA-related RMPADJUST handling.

Comment on lines 102 to 108
pub fn rmpadjust_pages(
&self,
range: MemoryRange,
value: SevRmpAdjust,
terminate_on_failure: bool,
) -> Result<(), SnpPageError> {
if value.vmsa() {
// TODO SNP: VMSA conversion does not work.
return Ok(());
}

// SAFETY: TODO SNP FUTURE: For defense in depth it could be useful to prevent
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The PR description says this only removes stale TODO comments, but this hunk also removes the if value.vmsa() { return Ok(()); } early-return in rmpadjust_pages, which is a functional behavior change (VMSA adjustments will now be sent to the ioctl). Either restore the previous behavior or update the PR description (and rationale) to reflect the intentional behavior change.

Copilot uses AI. Check for mistakes.
/// Execute the rmpadjust instruction on the specified memory range.
///
/// The range must not be mapped in the kernel as RAM.
///
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The blank rustdoc line uses /// (with a trailing space). Please remove the trailing whitespace (use /// for a blank doc line) to avoid formatting/lint noise and keep diffs clean.

Suggested change
///
///

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant