tdx: Permit starting Cloud Hypervisor without --kernel

This is not required if TDX is present.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-02-12 16:45:02 +00:00
parent 62abc117ab
commit 57c8c250fd
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1531,6 +1531,7 @@ pub struct VmConfig {
impl VmConfig {
pub fn validate(&self) -> ValidationResult<()> {
#[cfg(not(feature = "tdx"))]
self.kernel.as_ref().ok_or(ValidationError::KernelMissing)?;
if self.console.mode == ConsoleOutputMode::Tty && self.serial.mode == ConsoleOutputMode::Tty