Skip to content
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

cvm guest vsm: move vtl1_enabled from UhVpInner to a new UhCvmVpInner #842

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sluck-msft
Copy link
Contributor

Moves some CVM-specific state off of UhVpInner into a cvm-specific struct.

Tested by booting a non-isolated VM and an SNP VM.

@sluck-msft sluck-msft requested a review from a team as a code owner February 11, 2025 23:04
#[cfg(guest_arch = "x86_64")]
impl UhCvmPartitionState {
fn vp_inner(&self, vp_index: u32) -> &UhCvmVpInner {
self.vps.get(vp_index as usize).unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

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

get.unwrap is just [], so just use that

@@ -510,6 +510,10 @@ impl BackingPrivate for SnpBacked {
) -> Result<(), UhRunVpError> {
this.hcvm_handle_vp_start_enable_vtl(vtl)
}

fn vtl1_inspectable(this: &UhProcessor<'_, Self>) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need both vtl1_inspectable and inspect_extra? Can/should they be combined somehow? Fine for that to be a follow up, doesn't have to be here.

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