Skip to content

Remove the CVM Guest VSM configuration env var #1238

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion openhcl/underhill_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ async fn launch_workers(
nvme_vfio: opt.nvme_vfio,
mcr: opt.mcr,
enable_shared_visibility_pool: opt.enable_shared_visibility_pool,
cvm_guest_vsm: opt.cvm_guest_vsm,
halt_on_guest_halt: opt.halt_on_guest_halt,
no_sidecar_hotplug: opt.no_sidecar_hotplug,
gdbstub: opt.gdbstub,
Expand Down
6 changes: 0 additions & 6 deletions openhcl/underhill_core/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ pub struct Options {
/// hardware isolated platforms, but can be enabled for testing.
pub enable_shared_visibility_pool: bool,

/// (OPENHCL_CVM_GUEST_VSM=1)
/// Enable support for guest vsm in CVMs. This is disabled by default.
pub cvm_guest_vsm: bool,

/// (OPENHCL_HIDE_ISOLATION=1)
/// Hide the isolation mode from the guest.
pub hide_isolation: bool,
Expand Down Expand Up @@ -231,7 +227,6 @@ impl Options {
let mcr = parse_legacy_env_bool("OPENHCL_MCR_DEVICE");
let enable_shared_visibility_pool =
parse_legacy_env_bool("OPENHCL_ENABLE_SHARED_VISIBILITY_POOL");
let cvm_guest_vsm = parse_legacy_env_bool("OPENHCL_CVM_GUEST_VSM");
let hide_isolation = parse_env_bool("OPENHCL_HIDE_ISOLATION");
let halt_on_guest_halt = parse_legacy_env_bool("OPENHCL_HALT_ON_GUEST_HALT");
let no_sidecar_hotplug = parse_legacy_env_bool("OPENHCL_NO_SIDECAR_HOTPLUG");
Expand Down Expand Up @@ -300,7 +295,6 @@ impl Options {
nvme_vfio,
mcr,
enable_shared_visibility_pool,
cvm_guest_vsm,
hide_isolation,
halt_on_guest_halt,
no_sidecar_hotplug,
Expand Down
7 changes: 0 additions & 7 deletions openhcl/underhill_core/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,11 @@ pub struct UnderhillEnvCfg {
pub force_load_vtl0_image: Option<String>,
/// Use the user-mode NVMe driver.
pub nvme_vfio: bool,

// TODO MCR: support closed-source configuration logic for MCR device
pub mcr: bool,

/// Enable the shared visibility pool. This is enabled by default on
/// hardware isolated platforms, but can be enabled for testing.
pub enable_shared_visibility_pool: bool,
/// Enable support for guest vsm in CVMs. This is disabled by default.
pub cvm_guest_vsm: bool,
/// Halt on a guest halt request instead of forwarding to the host.
pub halt_on_guest_halt: bool,
/// Leave sidecar VPs remote even if they hit exits.
Expand All @@ -282,10 +278,8 @@ pub struct UnderhillEnvCfg {
pub hide_isolation: bool,
/// Enable nvme keep alive.
pub nvme_keep_alive: bool,

/// test configuration
pub test_configuration: Option<TestScenarioConfig>,

/// Disable the UEFI front page.
pub disable_uefi_frontpage: bool,
}
Expand Down Expand Up @@ -1442,7 +1436,6 @@ async fn new_underhill_vm(
topology: &processor_topology,
cvm_cpuid_info: runtime_params.cvm_cpuid_info(),
snp_secrets: runtime_params.snp_secrets(),
env_cvm_guest_vsm: env_cfg.cvm_guest_vsm,
vtom,
handle_synic: with_vmbus,
no_sidecar_hotplug: env_cfg.no_sidecar_hotplug,
Expand Down
15 changes: 1 addition & 14 deletions openhcl/virt_mshv_vtl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,6 @@ pub struct UhPartitionNewParams<'a> {
pub cvm_cpuid_info: Option<&'a [u8]>,
/// The unparsed CVM secrets page.
pub snp_secrets: Option<&'a [u8]>,
/// Whether underhill was configured to support guest vsm for CVMs
pub env_cvm_guest_vsm: bool,
/// The virtual top of memory for hardware-isolated VMs.
///
/// Must be a power of two.
Expand Down Expand Up @@ -1840,15 +1838,10 @@ impl UhProtoPartition<'_> {
IsolationType::None | IsolationType::Vbs => {}
#[cfg(guest_arch = "x86_64")]
IsolationType::Tdx => {
if !params.env_cvm_guest_vsm {
return Ok(false);
}
// No additional checks needed
}
#[cfg(guest_arch = "x86_64")]
IsolationType::Snp => {
if !params.env_cvm_guest_vsm {
return Ok(false);
}
// Require RMP Query
let rmp_query = x86defs::cpuid::ExtendedSevFeaturesEax::from(
safe_intrinsics::cpuid(x86defs::cpuid::CpuidFunction::ExtendedSevFeatures.0, 0)
Expand Down Expand Up @@ -1935,12 +1928,6 @@ impl UhProtoPartition<'_> {
guest_memory,
});

if guest_vsm_available {
tracing::warn!(
"Advertising guest vsm as being supported to the guest. This feature is in development, so the guest might crash."
);
}

Ok(UhCvmPartitionState {
vps_per_socket: params.topology.reserved_vps_per_socket(),
tlb_locked_vps,
Expand Down
1 change: 0 additions & 1 deletion tmk/tmk_vmm/src/paravisor_vmm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl RunContext<'_> {
topology: &self.state.processor_topology,
cvm_cpuid_info: None,
snp_secrets: None,
env_cvm_guest_vsm: false,
vtom: None,
handle_synic: true,
no_sidecar_hotplug: false,
Expand Down