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

virt_mshv_vtl: Scope startvp handling to CVMs #726

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

sluck-msft
Copy link
Contributor

@sluck-msft sluck-msft commented Jan 25, 2025

Refactoring work so that the startvp hypercall is not handled by OpenHCL for non-CVMs. Will help to keep future CVM-only work isolated to the CVM backings.

Tested:

  • SNP VMs boot
  • x86 and aarch64 TVMs boot
  • TDX VMs boot

@sluck-msft sluck-msft requested a review from a team as a code owner January 25, 2025 01:00
@@ -247,6 +247,13 @@ mod private {
dev: &impl CpuIo,
) -> Result<bool, UhRunVpError>;

fn handle_vp_start_enable_vtl_wake(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ended up with this instead of a generic extended wake handler because WakeReason is currently at pub(crate) scope. If we prefer this to be a generic thing instead, happy to make some changes.

@@ -42,10 +42,8 @@ pub fn hv_cpuid_leaves(
.with_access_apic_msrs(true)
.with_access_vp_runtime_msr(true)
.with_access_partition_reference_tsc(true)
.with_start_virtual_processor(true)
.with_start_virtual_processor(hardware_isolated)
Copy link
Member

Choose a reason for hiding this comment

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

This will disable StartVp support for WHP partitions using this emulator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah oops

@jstarks jstarks changed the title Scope startvp handling to CVMs virt_mshv_vtl: Scope startvp handling to CVMs Jan 31, 2025
@sluck-msft sluck-msft merged commit 88225af into microsoft:main Jan 31, 2025
25 checks passed
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.

3 participants