From 7b93a8dd786eb05da57390d64c4a3a3c57e4d15c Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Wed, 15 Dec 2021 14:10:13 +0100 Subject: [PATCH] vmm: config: Allow --kernel to be used with TDX The TDVF specification has been updated with the ability to provide a specific payload, which means we will be able to achieve direct kernel boot. For that reason, let's not prevent the user from using --kernel parameter when running with TDX. Signed-off-by: Sebastien Boeuf --- vmm/src/config.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 1162fc2b1..d7224ed7e 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -145,9 +145,6 @@ pub enum ValidationError { /// CPU Hotplug is not permitted with TDX #[cfg(feature = "tdx")] TdxNoCpuHotplug, - /// Specifying kernel is not permitted with TDX - #[cfg(feature = "tdx")] - TdxKernelSpecified, /// Insuffient vCPUs for queues TooManyQueues, /// Need shared memory for vfio-user @@ -198,10 +195,6 @@ impl fmt::Display for ValidationError { TdxNoCpuHotplug => { write!(f, "CPU hotplug is not permitted with TDX") } - #[cfg(feature = "tdx")] - TdxKernelSpecified => { - write!(f, "Direct kernel boot is not permitted with TDX") - } TooManyQueues => { write!(f, "Number of vCPUs is insufficient for number of queues") } @@ -2080,9 +2073,6 @@ impl VmConfig { if tdx_enabled && (self.cpus.max_vcpus != self.cpus.boot_vcpus) { return Err(ValidationError::TdxNoCpuHotplug); } - if tdx_enabled && self.kernel.is_some() { - return Err(ValidationError::TdxKernelSpecified); - } } if self.console.mode == ConsoleOutputMode::Tty && self.serial.mode == ConsoleOutputMode::Tty