From af4a14fa70d0f21e6386f0d7db81757bbd65cc3e Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Sat, 7 Mar 2026 15:56:23 -0800 Subject: [PATCH] tests: Add direct kernel boot test for confidential VMs Add test_direct_kernel_boot to the common_cvm integration test module to verify that boot, CPU, memory, and MSI interrupt functionality work correctly in confidential guest environments. The test creates an Ubuntu Jammy-based confidential VM using GuestFactory and delegates to the existing _test_direct_kernel_boot helper. Signed-off-by: Muminul Islam --- cloud-hypervisor/tests/integration.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 2fc61ef51..fed59fbe7 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -15018,4 +15018,12 @@ mod common_cvm { GuestFactory::new_confidential_guest_factory().create_guest(Box::new(disk_config)); _test_pci_multiple_segments(&guest, num_pci_segments, 5); } + + #[test] + fn test_direct_kernel_boot() { + let disk_config = UbuntuDiskConfig::new(JAMMY_IMAGE_NAME.to_string()); + let guest = + GuestFactory::new_confidential_guest_factory().create_guest(Box::new(disk_config)); + _test_direct_kernel_boot(&guest); + } }