main: Support igvm as a payload

Currently kernel and firmware are checked as a payload.
IGVM should be checked as well. Otherwise, it hangs indefinitely.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2024-02-01 17:44:17 -08:00 committed by Bo Chen
parent 66f8841ba1
commit 56dbb8f0db

View File

@ -697,6 +697,11 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
.map_err(Error::StartVmmThread)?;
let r: Result<(), Error> = (|| {
#[cfg(feature = "igvm")]
let payload_present = cmd_arguments.contains_id("kernel")
|| cmd_arguments.contains_id("firmware")
|| cmd_arguments.contains_id("igvm");
#[cfg(not(feature = "igvm"))]
let payload_present =
cmd_arguments.contains_id("kernel") || cmd_arguments.contains_id("firmware");