Skip to content

virt_mshv_vtl, snp: Provide control data for SEV errors #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions openhcl/virt_mshv_vtl/src/processor/snp/mod.rs
Original file line number Diff line number Diff line change
@@ -1537,15 +1537,26 @@ impl UhProcessor<'_, SnpBacked> {
}

_ => {
// Don't print too much of the register state, might have guest secrets
// parts thereof.
tracing::error!(
"SEV exit code {sev_error_code:x?}, rip {:x?}, next rip {:x?}, sev features {:x?}, v_intr_control {:x?}, event inject {:x?}",
vmsa.rip(),
vmsa.next_rip(),
"SEV exit code {sev_error_code:x?} sev features {:x?} v_intr_control {:x?} event inject {:x?} \
vmpl {:x?} cpl {:x?} exit_info1 {:x?} exit_info2 {:x?} exit_int_info {:x?} virtual_tom {:x?} \
efer {:x?} cr4 {:x?} cr3 {:x?} cr0 {:x?} rflag {:x?} rip {:x?} next rip {:x?}",
vmsa.sev_features(),
vmsa.v_intr_cntrl(),
vmsa.event_inject(),
vmsa.vmpl(),
vmsa.cpl(),
vmsa.exit_info1(),
vmsa.exit_info2(),
vmsa.exit_int_info(),
vmsa.virtual_tom(),
vmsa.efer(),
vmsa.cr4(),
vmsa.cr3(),
vmsa.cr0(),
vmsa.rflags(),
vmsa.rip(),
vmsa.next_rip(),
);
panic!("Received unexpected SEV exit code {sev_error_code:x?}");
}