Skip to content

igvm: add sidecar to all non-CVM x64 recipes #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/openvmm-ci.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .github/workflows/openvmm-pr.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub const NODEJS: &str = "18.x";
// comparable. They originate from separate branches, and the fourth digit
// increases with each release from the respective branch.
pub const OPENHCL_KERNEL_DEV_VERSION: &str = "6.12.9.2";
pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.12.9.2";
pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.12.9.3";
pub const OPENVMM_DEPS: &str = "0.1.0-20250403.3";
pub const PROTOC: &str = "27.1";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl OpenhclIgvmRecipe {
vtl0_kernel_type: None,
with_uefi: true,
with_interactive,
with_sidecar: false,
with_sidecar: true,
},
Self::X64Devkern => OpenhclIgvmRecipeDetails {
local_only: None,
Expand Down Expand Up @@ -168,7 +168,7 @@ impl OpenhclIgvmRecipe {
vtl0_kernel_type: Some(Vtl0KernelType::Example),
with_uefi: false,
with_interactive,
with_sidecar: false,
with_sidecar: true,
},
Self::X64TestLinuxDirectDevkern => OpenhclIgvmRecipeDetails {
local_only: None,
Expand All @@ -182,7 +182,7 @@ impl OpenhclIgvmRecipe {
vtl0_kernel_type: Some(Vtl0KernelType::Example),
with_uefi: false,
with_interactive,
with_sidecar: false,
with_sidecar: true,
},
Self::X64Cvm => OpenhclIgvmRecipeDetails {
local_only: None,
Expand Down
51 changes: 19 additions & 32 deletions vmm_tests/vmm_tests/tests/tests/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ use anyhow::Context;
use petri::ApicMode;
use petri::PetriVmConfig;
use petri::ProcessorTopology;
use petri::ResolvedArtifact;
use petri::ShutdownKind;
use petri::openvmm::PetriVmConfigOpenVmm;
use petri::pipette::cmd;
use petri_artifacts_common::tags::OsFlavor;
use petri_artifacts_vmm_test::artifacts::openhcl_igvm::LATEST_STANDARD_DEV_KERNEL_X64;
use vmm_core_defs::HaltReason;
use vmm_test_macros::openvmm_test;
use vmm_test_macros::vmm_test;
Expand Down Expand Up @@ -305,40 +303,32 @@ async fn battery_capacity(config: PetriVmConfigOpenVmm) -> Result<(), anyhow::Er

fn configure_for_sidecar(
config: Box<dyn PetriVmConfig>,
igvm: ResolvedArtifact<LATEST_STANDARD_DEV_KERNEL_X64>,
proc_count: u32,
) -> Box<dyn PetriVmConfig> {
config
.with_custom_openhcl(igvm.erase())
.with_processor_topology({
ProcessorTopology {
vp_count: proc_count,
// Sidecar will start one VP per socket. For this test, use just one
// socket.
vps_per_socket: Some(proc_count),
enable_smt: Some(false),
// Sidecar currently requires x2APIC.
apic_mode: Some(ApicMode::X2apicSupported),
}
})
config.with_processor_topology({
ProcessorTopology {
vp_count: proc_count,
// Sidecar will start one VP per socket. For this test, use just one
// socket.
vps_per_socket: Some(proc_count),
enable_smt: Some(false),
// Sidecar currently requires x2APIC.
apic_mode: Some(ApicMode::X2apicSupported),
}
})
}

// Sidecar currently requires the dev kernel build.
//
// Use UEFI so that the guest doesn't access the other APs, causing hot adds
// into VTL2 Linux.
//
// Sidecar isn't supported on aarch64 yet.
#[vmm_test(
openvmm_openhcl_uefi_x64(none) [LATEST_STANDARD_DEV_KERNEL_X64],
// TODO: debug why boot is failing hyperv_openhcl_uefi_x64(none) [LATEST_STANDARD_DEV_KERNEL_X64],
openvmm_openhcl_uefi_x64(none),
// TODO: debug why boot is failing hyperv_openhcl_uefi_x64(none),
)]
async fn sidecar_aps_unused(
config: Box<dyn PetriVmConfig>,
(igvm,): (ResolvedArtifact<LATEST_STANDARD_DEV_KERNEL_X64>,),
) -> Result<(), anyhow::Error> {
async fn sidecar_aps_unused(config: Box<dyn PetriVmConfig>) -> Result<(), anyhow::Error> {
let proc_count = 4;
let mut vm = configure_for_sidecar(config, igvm, proc_count)
let mut vm = configure_for_sidecar(config, proc_count)
.with_uefi_frontpage(true)
.run_without_agent()
.await?;
Expand Down Expand Up @@ -367,14 +357,11 @@ async fn sidecar_aps_unused(
}

#[vmm_test(
openvmm_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)) [LATEST_STANDARD_DEV_KERNEL_X64],
// TODO: debug why boot is failing hyperv_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)) [LATEST_STANDARD_DEV_KERNEL_X64],
openvmm_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)),
// TODO: debug why boot is failing hyperv_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)),
)]
async fn sidecar_boot(
config: Box<dyn PetriVmConfig>,
(igvm,): (ResolvedArtifact<LATEST_STANDARD_DEV_KERNEL_X64>,),
) -> Result<(), anyhow::Error> {
let (vm, agent) = configure_for_sidecar(config, igvm, 4).run().await?;
async fn sidecar_boot(config: Box<dyn PetriVmConfig>) -> Result<(), anyhow::Error> {
let (vm, agent) = configure_for_sidecar(config, 4).run().await?;
agent.power_off().await?;
assert_eq!(vm.wait_for_teardown().await?, HaltReason::PowerOff);
Ok(())
Expand Down