diff --git a/src/config.rs b/src/config.rs index ef6cb046a..dc03676fe 100644 --- a/src/config.rs +++ b/src/config.rs @@ -60,7 +60,7 @@ impl<'a> SvsmConfig<'a> { pub fn should_launch_fw(&self) -> bool { match self { SvsmConfig::FirmwareConfig(_) => true, - SvsmConfig::IgvmConfig(_) => false, + SvsmConfig::IgvmConfig(igvm_params) => igvm_params.should_launch_fw(), } } } diff --git a/src/igvm_params.rs b/src/igvm_params.rs index fe49f9606..758386ae1 100644 --- a/src/igvm_params.rs +++ b/src/igvm_params.rs @@ -125,4 +125,8 @@ impl IgvmParams<'_> { } Ok(cpus) } + + pub fn should_launch_fw(&self) -> bool { + self.igvm_param_block.launch_fw != 0 + } }