Skip to content

fix(x86): mask CPUID_USER_DIS in SEV-SNP CPUID leaf 0x8000_0021 - #582

Merged
Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-mtnxonwtonlp
Dec 4, 2026
Merged

Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-mtnxonwtonlp

Conversation

@Lencerf

@Lencerf Lencerf commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Linux 6.18 KVM_GET_SUPPORTED_CPUID sets bit 17 (CPUID_USER_DIS / X86_FEATURE_GP_ON_USER_CPUID) in CPUID leaf 0x8000_0021 EAX, which AMD SEV-SNP firmware rejects during SNP_LAUNCH_UPDATE for the CPUID page.

Define CpuidExt21EAx::CPUID_USER_DIS (1 << 17) and clear it alongside NO_SMM_CTL_MSR in snp_adjust_cpuids().

Linux 6.18 KVM_GET_SUPPORTED_CPUID sets bit 17 (CPUID_USER_DIS /
X86_FEATURE_GP_ON_USER_CPUID) in CPUID leaf 0x8000_0021 EAX, which
AMD SEV-SNP firmware rejects during SNP_LAUNCH_UPDATE for the CPUID
page.

Define CpuidExt21EAx::CPUID_USER_DIS (1 << 17) and clear it alongside
NO_SMM_CTL_MSR in snp_adjust_cpuids().

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 47406306370

Coverage remained the same at 48.219%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 uncovered change across 1 file (0 of 1 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
alioth/src/board/board_amd64/sev.rs 1 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 17096
Covered Lines: 8024
Line Coverage: 46.93%
Relevant Branches: 1992
Covered Branches: 1180
Branch Coverage: 59.24%
Branches in Coverage %: Yes
Coverage Strength: 964.55 hits per line

💛 - Coveralls

@Lencerf
Lencerf added this pull request to the merge queue Dec 4, 2026
Merged via the queue into google:main with commit 27f944d Dec 4, 2026
20 checks passed
@Lencerf
Lencerf deleted the push-mtnxonwtonlp branch December 4, 2026 20:12
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