Skip to content

Commit

Permalink
Optionally launch FW when configured by IGVM parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Lange <jlange@microsoft.com>
  • Loading branch information
msft-jlange committed Dec 4, 2023
1 parent 2f45581 commit 0b2420f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
}
4 changes: 4 additions & 0 deletions src/igvm_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,8 @@ impl IgvmParams<'_> {
}
Ok(cpus)
}

pub fn should_launch_fw(&self) -> bool {
self.igvm_param_block.launch_fw != 0
}
}

0 comments on commit 0b2420f

Please sign in to comment.