From ba68188251e597c283442b3bdd6fbe9457b3dbce Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 10 Sep 2025 22:28:20 +0000 Subject: [PATCH 01/57] vmm_tests: implementing underhill memory usage test and logging --- Cargo.lock | 1 + petri/src/lib.rs | 2 + petri/src/memstat.rs | 133 ++++++++++++++++ vmm_tests/vmm_tests/Cargo.toml | 3 + vmm_tests/vmm_tests/tests/tests/multiarch.rs | 151 +++++++++++++++++++ 5 files changed, 290 insertions(+) create mode 100644 petri/src/memstat.rs diff --git a/Cargo.lock b/Cargo.lock index cd499492ac..3f8c49b45e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9304,6 +9304,7 @@ dependencies = [ "petri_artifacts_vmm_test", "safe_intrinsics", "scsidisk_resources", + "serde_json", "storvsp_resources", "tempfile", "tmk_tests", diff --git a/petri/src/lib.rs b/petri/src/lib.rs index 7188c024ef..d74e37dd60 100644 --- a/petri/src/lib.rs +++ b/petri/src/lib.rs @@ -13,6 +13,8 @@ mod linux_direct_serial_agent; // TODO: Add docs and maybe a trait interface for this, or maybe this can // remain crate-local somehow without violating interface privacy. #[expect(missing_docs)] +pub mod memstat; +#[expect(missing_docs)] pub mod openhcl_diag; mod test; mod tracing; diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs new file mode 100644 index 0000000000..7e4e9a776c --- /dev/null +++ b/petri/src/memstat.rs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +//! Memory Validation Data Collection for Petri Tests + +use pipette_client::PipetteClient; +use pipette_client::cmd; +use serde::Serialize; +use std::collections::HashMap; + +#[expect(missing_docs)] +#[derive(Serialize)] +pub struct PerProcessMemstat { + pub smaps_rollup: HashMap, + pub statm: HashMap, +} + +#[expect(missing_docs)] +#[derive(Serialize)] +pub struct MemStat { + pub meminfo: HashMap, + pub total_free_memory_per_zone: u64, + pub underhill_init: PerProcessMemstat, + pub openvmm_hcl: PerProcessMemstat, + pub underhill_vm: PerProcessMemstat, +} + +#[expect(missing_docs)] +impl PerProcessMemstat { + pub fn clone(&self) -> PerProcessMemstat { + PerProcessMemstat { + smaps_rollup: self.smaps_rollup.clone(), + statm: self.statm.clone(), + } + } +} + +#[expect(missing_docs)] +impl MemStat { + pub async fn new(vtl2_agent: &PipetteClient) -> Self { + let sh = vtl2_agent.unix_shell(); + let meminfo = Self::parse_memfile(sh.read_file("/proc/meminfo").await.unwrap(), 0, 0, 1); + let total_free_memory_per_zone = sh + .read_file("/proc/zoneinfo") + .await + .unwrap() + .lines() + .filter(|&line| line.contains("nr_free_pages") || line.contains("count:")) + .map(|line| { + line.split_whitespace() + .nth(1) + .unwrap() + .parse::() + .unwrap() + }) + .sum::() + * 4; + let mut per_process_data: HashMap = HashMap::new(); + for (key, value) in Self::parse_memfile(cmd!(sh, "ps").read().await.unwrap(), 1, 3, 0) + .iter() + .filter(|(key, _)| key.contains("underhill") || key.contains("openvmm")) + { + let process_name = key + .split('/') + .last() + .unwrap() + .trim_matches(|c| c == '{' || c == '}') + .replace("-", "_"); + println!("{}", process_name); + per_process_data.insert( + process_name.clone(), + PerProcessMemstat { + smaps_rollup: Self::parse_memfile( + sh.read_file(&format!("/proc/{}/smaps_rollup", value)) + .await + .unwrap(), + 1, + 0, + 1, + ), + statm: Self::parse_statm( + sh.read_file(&format!("/proc/{}/statm", value)) + .await + .unwrap(), + ), + }, + ); + } + + Self { + meminfo, + total_free_memory_per_zone, + underhill_init: per_process_data["underhill_init"].clone(), + openvmm_hcl: per_process_data["openvmm_hcl"].clone(), + underhill_vm: per_process_data["underhill_vm"].clone(), + } + } + + fn parse_memfile( + input: String, + start_row: usize, + field_col: usize, + value_col: usize, + ) -> HashMap { + let mut parsed_data: HashMap = HashMap::new(); + for line in input.lines().skip(start_row) { + let split_line = line.split_whitespace().collect::>(); + let field = split_line[field_col].trim_matches(':').to_string(); + let value: u64 = split_line[value_col].parse().unwrap(); + parsed_data.insert(field, value); + } + parsed_data + } + + fn parse_statm(raw: String) -> HashMap { + let mut statm: HashMap = HashMap::new(); + let split_arr = raw.split_whitespace().collect::>(); + statm.insert("vm_size".to_string(), split_arr[0].parse::().unwrap()); + statm.insert("vm_rss".to_string(), split_arr[1].parse::().unwrap()); + statm.insert( + "vm_shared".to_string(), + split_arr[2].parse::().unwrap(), + ); + statm.insert("text".to_string(), split_arr[3].parse::().unwrap()); + statm.insert("lib".to_string(), split_arr[4].parse::().unwrap()); + statm.insert("data".to_string(), split_arr[5].parse::().unwrap()); + statm.insert( + "dirty_pages".to_string(), + split_arr[6].parse::().unwrap(), + ); + statm + } +} diff --git a/vmm_tests/vmm_tests/Cargo.toml b/vmm_tests/vmm_tests/Cargo.toml index cf91bea609..ca0193631b 100644 --- a/vmm_tests/vmm_tests/Cargo.toml +++ b/vmm_tests/vmm_tests/Cargo.toml @@ -62,3 +62,6 @@ tempfile.workspace = true [lints] workspace = true + +[dependencies] +serde_json.workspace = true diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 8a425e7b26..daaaeac7eb 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -17,12 +17,14 @@ use petri::ProcessorTopology; use petri::ResolvedArtifact; use petri::SIZE_1_GB; use petri::ShutdownKind; +use petri::memstat::MemStat; use petri::openvmm::NIC_MAC_ADDRESS; use petri::openvmm::OpenVmmPetriBackend; use petri::pipette::cmd; use petri_artifacts_common::tags::MachineArch; use petri_artifacts_common::tags::OsFlavor; use petri_artifacts_vmm_test::artifacts::test_vmgs::VMGS_WITH_BOOT_ENTRY; +use serde_json::to_string_pretty; use std::str::FromStr; use std::time::Duration; use vmm_test_macros::openvmm_test; @@ -830,3 +832,152 @@ async fn validate_mnf_usage_in_guest( vm.wait_for_clean_teardown().await?; Ok(()) } + +#[vmm_test_no_agent( + hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2022_x64)), +)] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_2_proc_no_agent( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let mut vm = config + .with_processor_topology(ProcessorTopology { + vp_count: 2, + ..Default::default() + }) + .with_memory(MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + }) + .run_without_agent() + .await?; + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + + vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; + vm.wait_for_clean_teardown().await?; + assert!(true); + Ok(()) +} + +#[vmm_test_no_agent( + hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2022_x64)), +)] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_64_proc_no_agent( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let mut vm = config + .with_processor_topology(ProcessorTopology { + vp_count: 64, + ..Default::default() + }) + .with_memory(MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + }) + .run_without_agent() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + + vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; + vm.wait_for_clean_teardown().await?; + assert!(true); + Ok(()) +} + +#[vmm_test( + openvmm_openhcl_linux_direct_x64, + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) +)] +async fn meminfo_status_2_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + //let (mut vm, agent) = config.run().await?; + // openvmm_uefi_x64(vhd(ubuntu_2204_server_x64)) == openvmm_uefi_x64_ubuntu_2204_server_x64_meminfo_status + // openvmm_openhcl_linux_direct_x64_meminfo_status + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 2, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + + agent.power_off().await?; + vm.wait_for_teardown().await?; + assert!(true); + Ok(()) +} + +#[vmm_test( + openvmm_openhcl_linux_direct_x64, + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) +)] +async fn meminfo_status_64_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 64, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + + agent.power_off().await?; + vm.wait_for_teardown().await?; + assert!(true); + Ok(()) +} From a01d180ef0294b060e650cd44d57076d73bb0c7e Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 11 Sep 2025 21:04:43 +0000 Subject: [PATCH 02/57] Resolving vmm_test build warnings --- petri/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/petri/src/lib.rs b/petri/src/lib.rs index d74e37dd60..8358f9cf9d 100644 --- a/petri/src/lib.rs +++ b/petri/src/lib.rs @@ -12,7 +12,6 @@ pub mod disk_image; mod linux_direct_serial_agent; // TODO: Add docs and maybe a trait interface for this, or maybe this can // remain crate-local somehow without violating interface privacy. -#[expect(missing_docs)] pub mod memstat; #[expect(missing_docs)] pub mod openhcl_diag; From 81e0c9ae25cc9425b8309013380a6ac26eb87cd7 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 11 Sep 2025 21:54:09 +0000 Subject: [PATCH 03/57] Adjusting test logs to show memory usage statistics --- petri/src/memstat.rs | 1 - vmm_tests/vmm_tests/tests/tests/multiarch.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 7e4e9a776c..296403ca8a 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -66,7 +66,6 @@ impl MemStat { .unwrap() .trim_matches(|c| c == '{' || c == '}') .replace("-", "_"); - println!("{}", process_name); per_process_data.insert( process_name.clone(), PerProcessMemstat { diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index daaaeac7eb..e80f929f2b 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -858,7 +858,7 @@ async fn meminfo_status_2_proc_no_agent( assert!(now.elapsed() >= wait_time); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -893,7 +893,7 @@ async fn meminfo_status_64_proc_no_agent( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -935,7 +935,7 @@ async fn meminfo_status_2_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); agent.power_off().await?; vm.wait_for_teardown().await?; @@ -974,7 +974,7 @@ async fn meminfo_status_64_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - println!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); agent.power_off().await?; vm.wait_for_teardown().await?; From b2f875e680009051c98e887c4fd7a56c702af185 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 00:11:48 +0000 Subject: [PATCH 04/57] fixed SNP and GP x64 tests to use proper OS and adjusted derived traits --- petri/src/memstat.rs | 20 +++++--------------- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 15 ++++++--------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 296403ca8a..c554c6c1a6 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -9,14 +9,14 @@ use serde::Serialize; use std::collections::HashMap; #[expect(missing_docs)] -#[derive(Serialize)] +#[derive(Serialize, Clone, Default)] pub struct PerProcessMemstat { pub smaps_rollup: HashMap, pub statm: HashMap, } #[expect(missing_docs)] -#[derive(Serialize)] +#[derive(Serialize, Clone, Default)] pub struct MemStat { pub meminfo: HashMap, pub total_free_memory_per_zone: u64, @@ -25,16 +25,6 @@ pub struct MemStat { pub underhill_vm: PerProcessMemstat, } -#[expect(missing_docs)] -impl PerProcessMemstat { - pub fn clone(&self) -> PerProcessMemstat { - PerProcessMemstat { - smaps_rollup: self.smaps_rollup.clone(), - statm: self.statm.clone(), - } - } -} - #[expect(missing_docs)] impl MemStat { pub async fn new(vtl2_agent: &PipetteClient) -> Self { @@ -89,9 +79,9 @@ impl MemStat { Self { meminfo, total_free_memory_per_zone, - underhill_init: per_process_data["underhill_init"].clone(), - openvmm_hcl: per_process_data["openvmm_hcl"].clone(), - underhill_vm: per_process_data["underhill_vm"].clone(), + underhill_init: per_process_data.get("underhill_init").unwrap().clone(), + openvmm_hcl: per_process_data.get("openvmm_hcl").unwrap().clone(), + underhill_vm: per_process_data.get("underhill_vm").unwrap().clone(), } } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index e80f929f2b..ae11087e21 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -835,7 +835,7 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] async fn meminfo_status_2_proc_no_agent( @@ -868,7 +868,7 @@ async fn meminfo_status_2_proc_no_agent( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] async fn meminfo_status_64_proc_no_agent( @@ -902,16 +902,13 @@ async fn meminfo_status_64_proc_no_agent( } #[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] +#[expect(dead_code)] async fn meminfo_status_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { - //let (mut vm, agent) = config.run().await?; - // openvmm_uefi_x64(vhd(ubuntu_2204_server_x64)) == openvmm_uefi_x64_ubuntu_2204_server_x64_meminfo_status - // openvmm_openhcl_linux_direct_x64_meminfo_status let (mut vm, agent) = config .with_processor_topology({ ProcessorTopology { @@ -944,10 +941,10 @@ async fn meminfo_status_2_proc( } #[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] +#[expect(dead_code)] async fn meminfo_status_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { From 30c1e200853cfc031646594f31a366a819d2d478 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 01:36:16 +0000 Subject: [PATCH 05/57] adjusting macros for agent test --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index ae11087e21..d4697ec64a 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -905,7 +905,6 @@ async fn meminfo_status_64_proc_no_agent( hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -#[expect(dead_code)] async fn meminfo_status_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { @@ -944,7 +943,6 @@ async fn meminfo_status_2_proc( hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -#[expect(dead_code)] async fn meminfo_status_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { From 1dd5d0ea8a52da1b65448a772466ce8e856fdee4 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 02:06:41 +0000 Subject: [PATCH 06/57] restoring linux direct x64 test --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index d4697ec64a..87d1bd5392 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -902,6 +902,7 @@ async fn meminfo_status_64_proc_no_agent( } #[vmm_test( + openvmm_openhcl_linux_direct_x64, hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] @@ -940,6 +941,7 @@ async fn meminfo_status_2_proc( } #[vmm_test( + openvmm_openhcl_linux_direct_x64, hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] From 0c5f353ba4214e4369e3571381b70d0f619aec56 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 02:52:29 +0000 Subject: [PATCH 07/57] reducing VP count for GP test to investigate failed 64VP tests on GP intel and AMD --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 87d1bd5392..185d946daa 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -862,7 +862,6 @@ async fn meminfo_status_2_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(true); Ok(()) } @@ -897,7 +896,6 @@ async fn meminfo_status_64_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(true); Ok(()) } @@ -936,7 +934,6 @@ async fn meminfo_status_2_proc( agent.power_off().await?; vm.wait_for_teardown().await?; - assert!(true); Ok(()) } @@ -945,13 +942,13 @@ async fn meminfo_status_2_proc( hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_64_proc( +async fn meminfo_status_32_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config .with_processor_topology({ ProcessorTopology { - vp_count: 64, + vp_count: 32, ..Default::default() } }) @@ -975,6 +972,5 @@ async fn meminfo_status_64_proc( agent.power_off().await?; vm.wait_for_teardown().await?; - assert!(true); Ok(()) } From 9428734cccdf3cac238b5a55b2df40520bd9c448 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 03:30:13 +0000 Subject: [PATCH 08/57] added 48VP test for GP VMs --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 46 ++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 185d946daa..12008abb4f 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -858,7 +858,7 @@ async fn meminfo_status_2_proc_no_agent( assert!(now.elapsed() >= wait_time); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -892,7 +892,7 @@ async fn meminfo_status_64_proc_no_agent( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -930,7 +930,7 @@ async fn meminfo_status_2_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); agent.power_off().await?; vm.wait_for_teardown().await?; @@ -968,7 +968,45 @@ async fn meminfo_status_32_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT:\n{}\n", to_string_pretty(&memstat).unwrap()); + tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); + + agent.power_off().await?; + vm.wait_for_teardown().await?; + Ok(()) +} + +#[vmm_test( + openvmm_openhcl_linux_direct_x64, + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) +)] +async fn meminfo_status_48_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 48, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); agent.power_off().await?; vm.wait_for_teardown().await?; From 8c490aff024c9ec5147b18902f47fdbbe54448c6 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 17:06:22 +0000 Subject: [PATCH 09/57] changing GP x64 tests to use OpenVMM to avoid insufficient LP error on 64VP tests --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 68 ++++++-------------- 1 file changed, 20 insertions(+), 48 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 12008abb4f..02ed2a4f07 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -858,7 +858,10 @@ async fn meminfo_status_2_proc_no_agent( assert!(now.elapsed() >= wait_time); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -892,7 +895,10 @@ async fn meminfo_status_64_proc_no_agent( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; @@ -900,8 +906,7 @@ async fn meminfo_status_64_proc_no_agent( } #[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] async fn meminfo_status_2_proc( @@ -930,45 +935,10 @@ async fn meminfo_status_2_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); - - agent.power_off().await?; - vm.wait_for_teardown().await?; - Ok(()) -} - -#[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) -)] -async fn meminfo_status_32_proc( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 32, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); agent.power_off().await?; vm.wait_for_teardown().await?; @@ -976,17 +946,16 @@ async fn meminfo_status_32_proc( } #[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_48_proc( +async fn meminfo_status_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config .with_processor_topology({ ProcessorTopology { - vp_count: 48, + vp_count: 64, ..Default::default() } }) @@ -1006,7 +975,10 @@ async fn meminfo_status_48_proc( let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!("MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap()); + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); agent.power_off().await?; vm.wait_for_teardown().await?; From b61e664269a3890d4af4682d7b5579d8de169513 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 18:01:05 +0000 Subject: [PATCH 10/57] Combining idle tests to run with no agent --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 90 ++------------------ 1 file changed, 6 insertions(+), 84 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 02ed2a4f07..5fd3ad0ab6 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -836,9 +836,10 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -#[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc_no_agent( +async fn meminfo_status_idle_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -871,9 +872,10 @@ async fn meminfo_status_2_proc_no_agent( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -#[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_64_proc_no_agent( +async fn meminfo_status_idle_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -904,83 +906,3 @@ async fn meminfo_status_64_proc_no_agent( vm.wait_for_clean_teardown().await?; Ok(()) } - -#[vmm_test( - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) -)] -async fn meminfo_status_2_proc( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 2, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - agent.power_off().await?; - vm.wait_for_teardown().await?; - Ok(()) -} - -#[vmm_test( - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) -)] -async fn meminfo_status_64_proc( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 64, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - agent.power_off().await?; - vm.wait_for_teardown().await?; - Ok(()) -} From b247927747e9dadf86e7212aedb924b3b3a0fd47 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 18:45:55 +0000 Subject: [PATCH 11/57] resolving clippy errors and switching to linux direct for GP tests --- petri/src/memstat.rs | 28 ++++-- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 90 ++++++++++++++++++-- 2 files changed, 106 insertions(+), 12 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index c554c6c1a6..b4ae56fcf0 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -8,25 +8,37 @@ use pipette_client::cmd; use serde::Serialize; use std::collections::HashMap; -#[expect(missing_docs)] +/// PerProcessMemstat struct collects statistics from a single process relevant to memory validation #[derive(Serialize, Clone, Default)] pub struct PerProcessMemstat { + /// HashMap generated from the contents of the /proc/{process ID}/smaps_rollup file for an OpenHCL process pub smaps_rollup: HashMap, + + /// HashMap generated from the contents of the /proc/{process ID}/statm file for an OpenHCL process pub statm: HashMap, } -#[expect(missing_docs)] +/// MemStat struct collects all relevant memory usage data from VTL2 in a VM #[derive(Serialize, Clone, Default)] pub struct MemStat { + /// meminfo is a HashMap generated from the contents of the /proc/meminfo file pub meminfo: HashMap, + + /// total_free_memory_per_zone is an integer calculated by aggregating the free memory from each CPU zone in the /proc/zoneinfo file pub total_free_memory_per_zone: u64, + + /// underhill_init corresponds to the memory usage statistics for the underhill-init process pub underhill_init: PerProcessMemstat, + + /// openvmm_hcl corresponds to the memory usage statistics for the openvmm_hcl process pub openvmm_hcl: PerProcessMemstat, + + /// underhill_vm corresponds to the memory usage statistics for the underhill-vm process pub underhill_vm: PerProcessMemstat, } -#[expect(missing_docs)] impl MemStat { + /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes pub async fn new(vtl2_agent: &PipetteClient) -> Self { let sh = vtl2_agent.unix_shell(); let meminfo = Self::parse_memfile(sh.read_file("/proc/meminfo").await.unwrap(), 0, 0, 1); @@ -52,7 +64,7 @@ impl MemStat { { let process_name = key .split('/') - .last() + .next_back() .unwrap() .trim_matches(|c| c == '{' || c == '}') .replace("-", "_"); @@ -94,8 +106,12 @@ impl MemStat { let mut parsed_data: HashMap = HashMap::new(); for line in input.lines().skip(start_row) { let split_line = line.split_whitespace().collect::>(); - let field = split_line[field_col].trim_matches(':').to_string(); - let value: u64 = split_line[value_col].parse().unwrap(); + let field = split_line + .get(field_col) + .unwrap() + .trim_matches(':') + .to_string(); + let value: u64 = split_line.get(value_col).unwrap_or(&"0").parse().unwrap(); parsed_data.insert(field, value); } parsed_data diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 5fd3ad0ab6..b7094d919a 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -836,10 +836,9 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_idle_2_proc_no_agent( +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -872,10 +871,9 @@ async fn meminfo_status_idle_2_proc_no_agent( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_idle_64_proc_no_agent( +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -906,3 +904,83 @@ async fn meminfo_status_idle_64_proc_no_agent( vm.wait_for_clean_teardown().await?; Ok(()) } + +#[vmm_test( + openvmm_openhcl_linux_direct_x64, + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) +)] +async fn meminfo_status_2_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 2, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); + + agent.power_off().await?; + vm.wait_for_teardown().await?; + Ok(()) +} + +#[vmm_test( + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) +)] +async fn meminfo_status_48_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 48, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + + let now = std::time::Instant::now(); + let wait_time = Duration::from_secs(60); + std::thread::sleep(wait_time); + assert!(now.elapsed() >= wait_time); + + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); + + agent.power_off().await?; + vm.wait_for_teardown().await?; + Ok(()) +} From 5f865e3e1ce753fc309d41768704134743adb031 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 18:47:40 +0000 Subject: [PATCH 12/57] restoring 64VP GP test --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index b7094d919a..8acd873464 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -946,16 +946,16 @@ async fn meminfo_status_2_proc( } #[vmm_test( - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + openvmm_openhcl_linux_direct_x64, hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_48_proc( +async fn meminfo_status_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config .with_processor_topology({ ProcessorTopology { - vp_count: 48, + vp_count: 64, ..Default::default() } }) From 7da0c7c4967101fb779b336804a3f85c3849fef7 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 19:58:52 +0000 Subject: [PATCH 13/57] trying extended timeout period for GP tests --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 30 ++++---------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 8acd873464..a26a005cd8 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -852,10 +852,7 @@ async fn meminfo_status_2_proc_no_agent( }) .run_without_agent() .await?; - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); + std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; tracing::info!( @@ -887,12 +884,7 @@ async fn meminfo_status_64_proc_no_agent( }) .run_without_agent() .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - + std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; tracing::info!( @@ -909,7 +901,7 @@ async fn meminfo_status_64_proc_no_agent( openvmm_openhcl_linux_direct_x64, hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_2_proc( +async fn meminfo_status_2_proc_reboot( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -927,12 +919,7 @@ async fn meminfo_status_2_proc( }) .run() .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - + std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; tracing::info!( @@ -949,7 +936,7 @@ async fn meminfo_status_2_proc( openvmm_openhcl_linux_direct_x64, hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_64_proc( +async fn meminfo_status_64_proc_reboot( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -967,12 +954,7 @@ async fn meminfo_status_64_proc( }) .run() .await?; - - let now = std::time::Instant::now(); - let wait_time = Duration::from_secs(60); - std::thread::sleep(wait_time); - assert!(now.elapsed() >= wait_time); - + std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; let memstat = MemStat::new(&vtl2_agent).await; tracing::info!( From 48e6a035f97fa742e03c12c083922fe6f56b7f88 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 20:46:20 +0000 Subject: [PATCH 14/57] adding windows datacenter 2022 test on GP VMs with extended timeout --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index a26a005cd8..9278a9299f 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -780,7 +780,7 @@ async fn boot_expect_fail( openvmm_openhcl_linux_direct_x64, openvmm_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)) )] -async fn validate_mnf_usage_in_guest( +async fn validate_mnf_usage_in_guest_reboot( config: PetriVmBuilder, ) -> anyhow::Result<()> { // So far, NetVSC uses MNF, StorVSC doesn't hence attach a nic to the vm. @@ -899,6 +899,7 @@ async fn meminfo_status_64_proc_no_agent( #[vmm_test( openvmm_openhcl_linux_direct_x64, + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] async fn meminfo_status_2_proc_reboot( @@ -934,6 +935,7 @@ async fn meminfo_status_2_proc_reboot( #[vmm_test( openvmm_openhcl_linux_direct_x64, + openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] async fn meminfo_status_64_proc_reboot( From 573caf8b40d36923d1f42d962455c6426406e5a4 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 12 Sep 2025 21:55:54 +0000 Subject: [PATCH 15/57] removing datacenter configuration from GP tests --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 9278a9299f..f95692eefe 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -899,7 +899,6 @@ async fn meminfo_status_64_proc_no_agent( #[vmm_test( openvmm_openhcl_linux_direct_x64, - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] async fn meminfo_status_2_proc_reboot( @@ -935,7 +934,6 @@ async fn meminfo_status_2_proc_reboot( #[vmm_test( openvmm_openhcl_linux_direct_x64, - openvmm_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] async fn meminfo_status_64_proc_reboot( From 532f17dd5916f2ecfdf368077b3c3a1abf1b99da Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 15 Sep 2025 15:06:19 +0000 Subject: [PATCH 16/57] extending timeout on CVM tests --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index f95692eefe..4bab05d691 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -838,7 +838,7 @@ async fn validate_mnf_usage_in_guest_reboot( hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc_no_agent( +async fn meminfo_status_2_proc_no_agent_reboot( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -870,7 +870,7 @@ async fn meminfo_status_2_proc_no_agent( hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_64_proc_no_agent( +async fn meminfo_status_64_proc_no_agent_reboot( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config From a748585da1a05a496491fa530952b598c77ba243 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 15 Sep 2025 22:08:37 +0000 Subject: [PATCH 17/57] reverting to previous commit --- .config/nextest.toml | 5 + petri/src/memstat.rs | 4 + .../vmm_tests/test_data/meminfo_baseline.json | 412 ++++++++++++++++++ vmm_tests/vmm_tests/tests/tests/multiarch.rs | 53 ++- 4 files changed, 465 insertions(+), 9 deletions(-) create mode 100644 vmm_tests/vmm_tests/test_data/meminfo_baseline.json diff --git a/.config/nextest.toml b/.config/nextest.toml index 57578a5558..1d86f8b4e2 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -45,6 +45,11 @@ slow-timeout = { period = "30s", terminate-after = 2 } filter = 'package(~vmm_tests) & test(reboot)' slow-timeout = { period = "5m", terminate-after = 2 } +# Memory validation tests may need extended timeout +[[profile.ci.overrides]] +filter = 'package(~vmm_tests) & test(meminfo)' +slow-timeout = { period = "5m", terminate-after = 2 } + [[profile.ci.overrides]] # use fuzzy-matching for the package() to allow out-of-tree tests to use the # same profile diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index b4ae56fcf0..2ba92a5fec 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -40,6 +40,10 @@ pub struct MemStat { impl MemStat { /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes pub async fn new(vtl2_agent: &PipetteClient) -> Self { + tracing::info!( + "PATH IN MEMSTAT: {}", + std::env::current_dir().unwrap().to_str().unwrap() + ); let sh = vtl2_agent.unix_shell(); let meminfo = Self::parse_memfile(sh.read_file("/proc/meminfo").await.unwrap(), 0, 0, 1); let total_free_memory_per_zone = sh diff --git a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json new file mode 100644 index 0000000000..5b4e00474f --- /dev/null +++ b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json @@ -0,0 +1,412 @@ +{ + "aarch64": { + "2vp": { + "usage": { + "baseline": 59922, + "threshold": 200 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 1053, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 288.8, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 10866, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 1392, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 21977, + "threshold": 150 + }, + "Pss_Anon": { + "baseline": 4810, + "threshold": 100 + } + } + }, + "64vp": { + "usage": { + "baseline": 120074, + "threshold": 1000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 1052, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 288, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 10814, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 1364, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 37327, + "threshold": 500 + }, + "Pss_Anon": { + "baseline": 18150, + "threshold": 500 + } + } + } + }, + "intel-x64": { + "2vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + }, + "64vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + } + }, + "amd-x64": { + "2vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + }, + "64vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + } + }, + "intel-tdx": { + "2vp": { + "usage": { + "baseline": 232228, + "threshold": 200 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4521, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 3747, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14849, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 4780, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 30566, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 9822, + "threshold": 250 + } + } + }, + "64vp": { + "usage": { + "baseline": 307431, + "threshold": 1000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4487, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 3752, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14788, + "threshold": 350 + }, + "Pss_Anon": { + "baseline": 4787, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 58377, + "threshold": 550 + }, + "Pss_Anon": { + "baseline": 35445, + "threshold": 500 + } + } + } + }, + "amd-snp": { + "2vp": { + "usage": { + "baseline": 234379, + "threshold": 150 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4519, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 3749, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14697, + "threshold": 250 + }, + "Pss_Anon": { + "baseline": 4776, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 32625, + "threshold": 300 + }, + "Pss_Anon": { + "baseline": 11756, + "threshold": 150 + } + } + }, + "64vp": { + "usage": { + "baseline": 310228, + "threshold": 2000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4514, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 3752, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14874, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 4774, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 56666, + "threshold": 1500 + }, + "Pss_Anon": { + "baseline": 33360, + "threshold": 1500 + } + } + } + } +} \ No newline at end of file diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 4bab05d691..19d0efabbe 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -838,7 +838,7 @@ async fn validate_mnf_usage_in_guest_reboot( hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc_no_agent_reboot( +async fn meminfo_status_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -870,7 +870,7 @@ async fn meminfo_status_2_proc_no_agent_reboot( hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), )] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_64_proc_no_agent_reboot( +async fn meminfo_status_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -898,10 +898,11 @@ async fn meminfo_status_64_proc_no_agent_reboot( } #[vmm_test( - openvmm_openhcl_linux_direct_x64, + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) )] -async fn meminfo_status_2_proc_reboot( +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -926,17 +927,51 @@ async fn meminfo_status_2_proc_reboot( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() ); + tracing::info!( + "PATH IN MULTIARCH:{}", + std::env::current_dir().unwrap().to_str().unwrap() + ); + agent.power_off().await?; + vm.wait_for_teardown().await?; + Ok(()) +} + +#[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_32_proc( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 32, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + std::thread::sleep(Duration::from_secs(60)); + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); agent.power_off().await?; vm.wait_for_teardown().await?; Ok(()) } -#[vmm_test( - openvmm_openhcl_linux_direct_x64, - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) -)] -async fn meminfo_status_64_proc_reboot( +#[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_64_proc_arm( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config From 68746229df6ba1424b7191ff541656f726b23067 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 15 Sep 2025 22:17:03 +0000 Subject: [PATCH 18/57] reset to previous commit --- .../vmm_tests/test_data/meminfo_baseline.json | 412 ++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 vmm_tests/vmm_tests/test_data/meminfo_baseline.json diff --git a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json new file mode 100644 index 0000000000..5b4e00474f --- /dev/null +++ b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json @@ -0,0 +1,412 @@ +{ + "aarch64": { + "2vp": { + "usage": { + "baseline": 59922, + "threshold": 200 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 1053, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 288.8, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 10866, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 1392, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 21977, + "threshold": 150 + }, + "Pss_Anon": { + "baseline": 4810, + "threshold": 100 + } + } + }, + "64vp": { + "usage": { + "baseline": 120074, + "threshold": 1000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 1052, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 288, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 10814, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 1364, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 37327, + "threshold": 500 + }, + "Pss_Anon": { + "baseline": 18150, + "threshold": 500 + } + } + } + }, + "intel-x64": { + "2vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + }, + "64vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + } + }, + "amd-x64": { + "2vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + }, + "64vp": { + "usage": { + "baseline": 0, + "threshold": 0 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 0, + "threshold": 0 + }, + "Pss_Anon": { + "baseline": 0, + "threshold": 0 + } + } + } + }, + "intel-tdx": { + "2vp": { + "usage": { + "baseline": 232228, + "threshold": 200 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4521, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 3747, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14849, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 4780, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 30566, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 9822, + "threshold": 250 + } + } + }, + "64vp": { + "usage": { + "baseline": 307431, + "threshold": 1000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4487, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 3752, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14788, + "threshold": 350 + }, + "Pss_Anon": { + "baseline": 4787, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 58377, + "threshold": 550 + }, + "Pss_Anon": { + "baseline": 35445, + "threshold": 500 + } + } + } + }, + "amd-snp": { + "2vp": { + "usage": { + "baseline": 234379, + "threshold": 150 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4519, + "threshold": 100 + }, + "Pss_Anon": { + "baseline": 3749, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14697, + "threshold": 250 + }, + "Pss_Anon": { + "baseline": 4776, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 32625, + "threshold": 300 + }, + "Pss_Anon": { + "baseline": 11756, + "threshold": 150 + } + } + }, + "64vp": { + "usage": { + "baseline": 310228, + "threshold": 2000 + }, + "reservation": { + "baseline": 0, + "threshold": 0 + }, + "underhill_init": { + "Pss": { + "baseline": 4514, + "threshold": 50 + }, + "Pss_Anon": { + "baseline": 3752, + "threshold": 50 + } + }, + "openvmm_hcl": { + "Pss": { + "baseline": 14874, + "threshold": 200 + }, + "Pss_Anon": { + "baseline": 4774, + "threshold": 50 + } + }, + "underhill_vm": { + "Pss": { + "baseline": 56666, + "threshold": 1500 + }, + "Pss_Anon": { + "baseline": 33360, + "threshold": 1500 + } + } + } + } +} \ No newline at end of file From 437cddf7304162247013dc3bcde50ddf393906f6 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 16 Sep 2025 17:38:55 +0000 Subject: [PATCH 19/57] comparing arm and CVM tests against baseline --- petri/src/memstat.rs | 72 ++++++++++- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 121 ++++++++++++++++--- 2 files changed, 175 insertions(+), 18 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 2ba92a5fec..bb9ee731d8 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -6,7 +6,14 @@ use pipette_client::PipetteClient; use pipette_client::cmd; use serde::Serialize; +use serde_json::Value; +use serde_json::from_reader; use std::collections::HashMap; +use std::env::current_dir; +use std::fs::File; +use std::ops::Index; +use std::ops::IndexMut; +use std::path::Path; /// PerProcessMemstat struct collects statistics from a single process relevant to memory validation #[derive(Serialize, Clone, Default)] @@ -40,10 +47,6 @@ pub struct MemStat { impl MemStat { /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes pub async fn new(vtl2_agent: &PipetteClient) -> Self { - tracing::info!( - "PATH IN MEMSTAT: {}", - std::env::current_dir().unwrap().to_str().unwrap() - ); let sh = vtl2_agent.unix_shell(); let meminfo = Self::parse_memfile(sh.read_file("/proc/meminfo").await.unwrap(), 0, 0, 1); let total_free_memory_per_zone = sh @@ -101,6 +104,44 @@ impl MemStat { } } + /// Compares current statistics against baseline + pub fn compare_to_baseline(self, arch: &String, vps: &String) -> bool { + let path_str = format!( + "{}/test_data/meminfo_baseline.json", + current_dir().unwrap().to_str().unwrap() + ); + let baseline_json = + from_reader::(File::open(Path::new(&path_str)).expect("file not found")) + .unwrap(); + let baseline_usage = baseline_json[arch][vps]["usage"]["baseline"] + .as_u64() + .unwrap() + + baseline_json[arch][vps]["usage"]["threshold"] + .as_u64() + .unwrap(); + assert!(baseline_usage >= (self.meminfo["MemTotal"] - self.total_free_memory_per_zone)); + + for prs in vec!["underhill_init", "openvmm_hcl", "underhill_vm"] { + let baseline_pss = baseline_json[arch][vps][prs]["Pss"]["baseline"] + .as_u64() + .unwrap() + + baseline_json[arch][vps][prs]["Pss"]["threshold"] + .as_u64() + .unwrap(); + let baseline_pss_anon = baseline_json[arch][vps][prs]["Pss_Anon"]["baseline"] + .as_u64() + .unwrap() + + baseline_json[arch][vps][prs]["Pss_Anon"]["threshold"] + .as_u64() + .unwrap(); + + assert!(baseline_pss >= self[prs].smaps_rollup["Pss"]); + assert!(baseline_pss_anon >= self[prs].smaps_rollup["Pss_Anon"]); + } + + return true; + } + fn parse_memfile( input: String, start_row: usize, @@ -140,3 +181,26 @@ impl MemStat { statm } } + +impl Index<&'_ str> for MemStat { + type Output = PerProcessMemstat; + fn index(&self, s: &str) -> &PerProcessMemstat { + match s { + "underhill_init" => &self.underhill_init, + "openvmm_hcl" => &self.openvmm_hcl, + "underhill_vm" => &self.underhill_vm, + _ => panic!("unknown field: {}", s), + } + } +} + +impl IndexMut<&'_ str> for MemStat { + fn index_mut(&mut self, s: &str) -> &mut PerProcessMemstat { + match s { + "underhill_init" => &mut self.underhill_init, + "openvmm_hcl" => &mut self.openvmm_hcl, + "underhill_vm" => &mut self.underhill_vm, + _ => panic!("unknown field: {}", s), + } + } +} diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 19d0efabbe..b29e4c0f0d 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -833,12 +833,9 @@ async fn validate_mnf_usage_in_guest_reboot( Ok(()) } -#[vmm_test_no_agent( - hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), -)] +#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc_no_agent( +async fn meminfo_status_tdx_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -862,15 +859,76 @@ async fn meminfo_status_2_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; + assert!(memstat.compare_to_baseline(&"intel-tdx".to_string(), &"2vp".to_string())); + Ok(()) } -#[vmm_test_no_agent( - hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), -)] +#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_tdx_64_proc_no_agent( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let mut vm = config + .with_processor_topology(ProcessorTopology { + vp_count: 64, + ..Default::default() + }) + .with_memory(MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + }) + .run_without_agent() + .await?; + std::thread::sleep(Duration::from_secs(60)); + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); + + vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; + vm.wait_for_clean_teardown().await?; + assert!(memstat.compare_to_baseline(&"intel-tdx".to_string(), &"64vp".to_string())); + + Ok(()) +} + +#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_snp_2_proc_no_agent( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let mut vm = config + .with_processor_topology(ProcessorTopology { + vp_count: 2, + ..Default::default() + }) + .with_memory(MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + }) + .run_without_agent() + .await?; + std::thread::sleep(Duration::from_secs(60)); + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); + + vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; + vm.wait_for_clean_teardown().await?; + assert!(memstat.compare_to_baseline(&"amd-snp".to_string(), &"2vp".to_string())); + + Ok(()) +} + +#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_64_proc_no_agent( +async fn meminfo_status_snp_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -894,6 +952,8 @@ async fn meminfo_status_64_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; + assert!(memstat.compare_to_baseline(&"amd-snp".to_string(), &"64vp".to_string())); + Ok(()) } @@ -927,10 +987,6 @@ async fn meminfo_status_2_proc( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() ); - tracing::info!( - "PATH IN MULTIARCH:{}", - std::env::current_dir().unwrap().to_str().unwrap() - ); agent.power_off().await?; vm.wait_for_teardown().await?; Ok(()) @@ -969,6 +1025,41 @@ async fn meminfo_status_32_proc( Ok(()) } +#[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] +#[cfg_attr(not(windows), expect(dead_code))] +async fn meminfo_status_2_proc_arm( + config: PetriVmBuilder, +) -> anyhow::Result<()> { + let (mut vm, agent) = config + .with_processor_topology({ + ProcessorTopology { + vp_count: 2, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: 16 * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run() + .await?; + std::thread::sleep(Duration::from_secs(60)); + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!( + "MEMSTAT_START:\n{}\n:MEMSTAT_END", + to_string_pretty(&memstat).unwrap() + ); + agent.power_off().await?; + vm.wait_for_teardown().await?; + + assert!(memstat.compare_to_baseline(&"aarch64".to_string(), &"2vp".to_string())); + + Ok(()) +} + #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] async fn meminfo_status_64_proc_arm( @@ -999,5 +1090,7 @@ async fn meminfo_status_64_proc_arm( agent.power_off().await?; vm.wait_for_teardown().await?; + assert!(memstat.compare_to_baseline(&"aarch64".to_string(), &"64vp".to_string())); + Ok(()) } From 4801b1ffb66503f5224e7c85487bbc491447bd07 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 16 Sep 2025 17:47:58 +0000 Subject: [PATCH 20/57] removing redundancies --- petri/src/memstat.rs | 4 ++-- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index bb9ee731d8..cbbc91e7cd 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -105,7 +105,7 @@ impl MemStat { } /// Compares current statistics against baseline - pub fn compare_to_baseline(self, arch: &String, vps: &String) -> bool { + pub fn compare_to_baseline(self, arch: &str, vps: &str) -> bool { let path_str = format!( "{}/test_data/meminfo_baseline.json", current_dir().unwrap().to_str().unwrap() @@ -121,7 +121,7 @@ impl MemStat { .unwrap(); assert!(baseline_usage >= (self.meminfo["MemTotal"] - self.total_free_memory_per_zone)); - for prs in vec!["underhill_init", "openvmm_hcl", "underhill_vm"] { + for prs in ["underhill_init", "openvmm_hcl", "underhill_vm"] { let baseline_pss = baseline_json[arch][vps][prs]["Pss"]["baseline"] .as_u64() .unwrap() diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index b29e4c0f0d..facd981a7b 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -859,7 +859,7 @@ async fn meminfo_status_tdx_2_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline(&"intel-tdx".to_string(), &"2vp".to_string())); + assert!(memstat.compare_to_baseline("intel-tdx", "2vp")); Ok(()) } @@ -890,7 +890,7 @@ async fn meminfo_status_tdx_64_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline(&"intel-tdx".to_string(), &"64vp".to_string())); + assert!(memstat.compare_to_baseline("intel-tdx", "64vp")); Ok(()) } @@ -921,7 +921,7 @@ async fn meminfo_status_snp_2_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline(&"amd-snp".to_string(), &"2vp".to_string())); + assert!(memstat.compare_to_baseline("amd-snp", "2vp")); Ok(()) } @@ -952,7 +952,7 @@ async fn meminfo_status_snp_64_proc_no_agent( vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline(&"amd-snp".to_string(), &"64vp".to_string())); + assert!(memstat.compare_to_baseline("amd-snp", "64vp")); Ok(()) } @@ -1055,7 +1055,7 @@ async fn meminfo_status_2_proc_arm( agent.power_off().await?; vm.wait_for_teardown().await?; - assert!(memstat.compare_to_baseline(&"aarch64".to_string(), &"2vp".to_string())); + assert!(memstat.compare_to_baseline("aarch64", "2vp")); Ok(()) } @@ -1090,7 +1090,7 @@ async fn meminfo_status_64_proc_arm( agent.power_off().await?; vm.wait_for_teardown().await?; - assert!(memstat.compare_to_baseline(&"aarch64".to_string(), &"64vp".to_string())); + assert!(memstat.compare_to_baseline("aarch64", "64vp")); Ok(()) } From 7570aabe427fb321627abf736993fd2c73ff0c16 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 16 Sep 2025 17:55:13 +0000 Subject: [PATCH 21/57] resolving clippy errors --- petri/src/memstat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index cbbc91e7cd..1cb81072e3 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -139,7 +139,7 @@ impl MemStat { assert!(baseline_pss_anon >= self[prs].smaps_rollup["Pss_Anon"]); } - return true; + true } fn parse_memfile( From e7ce8c1d7dcfb06c6e07c8a1a202e935778d469b Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 16 Sep 2025 23:22:46 +0000 Subject: [PATCH 22/57] asserting reservation and GP x64 tests --- petri/src/memstat.rs | 12 ++++ .../vmm_tests/test_data/meminfo_baseline.json | 57 ++++++++++--------- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 19 ++++--- 3 files changed, 53 insertions(+), 35 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 1cb81072e3..039ef6b021 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -121,6 +121,18 @@ impl MemStat { .unwrap(); assert!(baseline_usage >= (self.meminfo["MemTotal"] - self.total_free_memory_per_zone)); + let baseline_reservation = baseline_json[arch][vps]["reservation"]["baseline"] + .as_u64() + .unwrap() + + baseline_json[arch][vps]["reservation"]["threshold"] + .as_u64() + .unwrap(); + + assert!( + baseline_reservation + >= (baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]) + ); + for prs in ["underhill_init", "openvmm_hcl", "underhill_vm"] { let baseline_pss = baseline_json[arch][vps][prs]["Pss"]["baseline"] .as_u64() diff --git a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json index 5b4e00474f..540984894c 100644 --- a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json +++ b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json @@ -1,12 +1,13 @@ { "aarch64": { + "vtl2_total": 524288, "2vp": { "usage": { "baseline": 59922, "threshold": 200 }, "reservation": { - "baseline": 0, + "baseline": 18348, "threshold": 0 }, "underhill_init": { @@ -46,7 +47,7 @@ "threshold": 1000 }, "reservation": { - "baseline": 0, + "baseline": 23872, "threshold": 0 }, "underhill_init": { @@ -82,13 +83,14 @@ } }, "intel-x64": { + "vtl2_total": 524288, "2vp": { "usage": { "baseline": 0, "threshold": 0 }, "reservation": { - "baseline": 0, + "baseline": 17648, "threshold": 0 }, "underhill_init": { @@ -122,55 +124,56 @@ } } }, - "64vp": { + "32vp": { "usage": { - "baseline": 0, - "threshold": 0 + "baseline": 260505, + "threshold": 1500 }, "reservation": { - "baseline": 0, + "baseline": 24648, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 4535, + "threshold": 50 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 3762, + "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 14886, + "threshold": 300 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 4833, + "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 41627, + "threshold": 400 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 19711, + "threshold": 350 } } } }, "amd-x64": { + "vtl2_total": 524288, "2vp": { "usage": { "baseline": 0, "threshold": 0 }, "reservation": { - "baseline": 0, + "baseline": 17648, "threshold": 0 }, "underhill_init": { @@ -204,13 +207,13 @@ } } }, - "64vp": { + "32vp": { "usage": { "baseline": 0, "threshold": 0 }, "reservation": { - "baseline": 0, + "baseline": 24648, "threshold": 0 }, "underhill_init": { @@ -246,13 +249,14 @@ } }, "intel-tdx": { + "vtl2_total": 655360, "2vp": { "usage": { "baseline": 232228, "threshold": 200 }, "reservation": { - "baseline": 0, + "baseline": 28936, "threshold": 0 }, "underhill_init": { @@ -292,7 +296,7 @@ "threshold": 1000 }, "reservation": { - "baseline": 0, + "baseline": 41660, "threshold": 0 }, "underhill_init": { @@ -328,13 +332,14 @@ } }, "amd-snp": { + "vtl2_total": 655360, "2vp": { "usage": { "baseline": 234379, "threshold": 150 }, "reservation": { - "baseline": 0, + "baseline": 28872, "threshold": 0 }, "underhill_init": { @@ -374,7 +379,7 @@ "threshold": 2000 }, "reservation": { - "baseline": 0, + "baseline": 42340, "threshold": 0 }, "underhill_init": { diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index facd981a7b..b44bdc4b00 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -780,7 +780,7 @@ async fn boot_expect_fail( openvmm_openhcl_linux_direct_x64, openvmm_openhcl_uefi_x64(vhd(ubuntu_2204_server_x64)) )] -async fn validate_mnf_usage_in_guest_reboot( +async fn validate_mnf_usage_in_guest( config: PetriVmBuilder, ) -> anyhow::Result<()> { // So far, NetVSC uses MNF, StorVSC doesn't hence attach a nic to the vm. @@ -957,12 +957,9 @@ async fn meminfo_status_snp_64_proc_no_agent( Ok(()) } -#[vmm_test( - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), - hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)) -)] +#[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc( +async fn meminfo_status_x64_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -989,12 +986,14 @@ async fn meminfo_status_2_proc( ); agent.power_off().await?; vm.wait_for_teardown().await?; + memstat.compare_to_baseline("intel-x64", "2vp"); + Ok(()) } #[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_32_proc( +async fn meminfo_status_x64_32_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -1022,12 +1021,14 @@ async fn meminfo_status_32_proc( agent.power_off().await?; vm.wait_for_teardown().await?; + memstat.compare_to_baseline("intel-x64", "32vp"); + Ok(()) } #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_2_proc_arm( +async fn meminfo_status_arm_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -1062,7 +1063,7 @@ async fn meminfo_status_2_proc_arm( #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_64_proc_arm( +async fn meminfo_status_arm_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config From 1ae7d6aa0578348474c915096230f9a3dd998b3d Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 17 Sep 2025 23:07:52 +0000 Subject: [PATCH 23/57] adding error messages and modifying baseline threshold --- petri/src/memstat.rs | 130 +++++++++++++----- .../vmm_tests/test_data/meminfo_baseline.json | 60 ++++---- 2 files changed, 125 insertions(+), 65 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 039ef6b021..1a6e9132fa 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -48,31 +48,46 @@ impl MemStat { /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes pub async fn new(vtl2_agent: &PipetteClient) -> Self { let sh = vtl2_agent.unix_shell(); - let meminfo = Self::parse_memfile(sh.read_file("/proc/meminfo").await.unwrap(), 0, 0, 1); + let meminfo = Self::parse_memfile( + sh.read_file("/proc/meminfo") + .await + .expect("VTL2 should have meminfo file"), + 0, + 0, + 1, + ); let total_free_memory_per_zone = sh .read_file("/proc/zoneinfo") .await - .unwrap() + .expect("VTL2 should have zoneinfo file") .lines() .filter(|&line| line.contains("nr_free_pages") || line.contains("count:")) .map(|line| { line.split_whitespace() .nth(1) - .unwrap() + .expect("'nr_free_pages' and 'count:' lines are expected to have at least 2 words split by whitespace") .parse::() - .unwrap() + .expect("The word at position 1 on the filtered lines is expected to contain a numbre value") }) .sum::() * 4; let mut per_process_data: HashMap = HashMap::new(); - for (key, value) in Self::parse_memfile(cmd!(sh, "ps").read().await.unwrap(), 1, 3, 0) - .iter() - .filter(|(key, _)| key.contains("underhill") || key.contains("openvmm")) + for (key, value) in Self::parse_memfile( + cmd!(sh, "ps") + .read() + .await + .expect("'ps' command is expected to succeed and produce output"), + 1, + 3, + 0, + ) + .iter() + .filter(|(key, _)| key.contains("underhill") || key.contains("openvmm")) { let process_name = key .split('/') .next_back() - .unwrap() + .expect("process names are expected to be non-empty") .trim_matches(|c| c == '{' || c == '}') .replace("-", "_"); per_process_data.insert( @@ -81,7 +96,10 @@ impl MemStat { smaps_rollup: Self::parse_memfile( sh.read_file(&format!("/proc/{}/smaps_rollup", value)) .await - .unwrap(), + .expect(&format!( + "process {} is expected to have a 'smaps_rollup' file", + process_name + )), 1, 0, 1, @@ -89,7 +107,10 @@ impl MemStat { statm: Self::parse_statm( sh.read_file(&format!("/proc/{}/statm", value)) .await - .unwrap(), + .expect(&format!( + "process {} is expected to have a 'statm' file", + process_name + )), ), }, ); @@ -98,9 +119,18 @@ impl MemStat { Self { meminfo, total_free_memory_per_zone, - underhill_init: per_process_data.get("underhill_init").unwrap().clone(), - openvmm_hcl: per_process_data.get("openvmm_hcl").unwrap().clone(), - underhill_vm: per_process_data.get("underhill_vm").unwrap().clone(), + underhill_init: per_process_data + .get("underhill_init") + .expect("per_process_data should have underhill_init data if the process exists") + .clone(), + openvmm_hcl: per_process_data + .get("openvmm_hcl") + .expect("per_process_data should have openvmm_hcl data if the process exists") + .clone(), + underhill_vm: per_process_data + .get("underhill_vm") + .expect("per_process_data should have underhill_vm data if the process exists") + .clone(), } } @@ -108,11 +138,18 @@ impl MemStat { pub fn compare_to_baseline(self, arch: &str, vps: &str) -> bool { let path_str = format!( "{}/test_data/meminfo_baseline.json", - current_dir().unwrap().to_str().unwrap() + current_dir() + .expect("current_dir is expected to return a path string") + .to_str() + .unwrap() ); - let baseline_json = - from_reader::(File::open(Path::new(&path_str)).expect("file not found")) - .unwrap(); + let baseline_json = from_reader::( + File::open(Path::new(&path_str)).expect(&format!("{} file not found", path_str)), + ) + .expect(&format!( + "memstat json is expected to exist within the file {}", + path_str + )); let baseline_usage = baseline_json[arch][vps]["usage"]["baseline"] .as_u64() .unwrap() @@ -165,32 +202,55 @@ impl MemStat { let split_line = line.split_whitespace().collect::>(); let field = split_line .get(field_col) - .unwrap() + .expect(&format!( + "in line {} column {} does not exist", + line, field_col + )) .trim_matches(':') .to_string(); - let value: u64 = split_line.get(value_col).unwrap_or(&"0").parse().unwrap(); + let value: u64 = split_line + .get(value_col) + .expect(&format!( + "in line {} column {} does not exist", + line, value_col + )) + .parse::() + .expect(&format!( + "value column {} in line {} is expected to be a parsable u64", + value_col, line + )); parsed_data.insert(field, value); } parsed_data } fn parse_statm(raw: String) -> HashMap { - let mut statm: HashMap = HashMap::new(); - let split_arr = raw.split_whitespace().collect::>(); - statm.insert("vm_size".to_string(), split_arr[0].parse::().unwrap()); - statm.insert("vm_rss".to_string(), split_arr[1].parse::().unwrap()); - statm.insert( - "vm_shared".to_string(), - split_arr[2].parse::().unwrap(), - ); - statm.insert("text".to_string(), split_arr[3].parse::().unwrap()); - statm.insert("lib".to_string(), split_arr[4].parse::().unwrap()); - statm.insert("data".to_string(), split_arr[5].parse::().unwrap()); - statm.insert( - "dirty_pages".to_string(), - split_arr[6].parse::().unwrap(), - ); - statm + let statm_fields = vec![ + "vm_size", + "vm_rss", + "vm_shared", + "text", + "lib", + "data", + "dirty_pages", + ]; + raw.split_whitespace() + .enumerate() + .map(|(index, value)| { + ( + statm_fields + .get(index) + .expect(&format!( + "statm file is expected to contain at most {} items", + statm_fields.len() + )) + .to_string(), + value + .parse::() + .expect("all items in statm file are expected to be parsable u64 numbers"), + ) + }) + .collect::>() } } diff --git a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json index 540984894c..dfe66a6172 100644 --- a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json +++ b/vmm_tests/vmm_tests/test_data/meminfo_baseline.json @@ -86,8 +86,8 @@ "vtl2_total": 524288, "2vp": { "usage": { - "baseline": 0, - "threshold": 0 + "baseline": 232464, + "threshold": 100 }, "reservation": { "baseline": 17648, @@ -169,8 +169,8 @@ "vtl2_total": 524288, "2vp": { "usage": { - "baseline": 0, - "threshold": 0 + "baseline": 232497, + "threshold": 100 }, "reservation": { "baseline": 17648, @@ -178,39 +178,39 @@ }, "underhill_init": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 4512, + "threshold": 50 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 3757, + "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 14819, + "threshold": 400 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 4805, + "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 30294, + "threshold": 750 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 9353, + "threshold": 100 } } }, "32vp": { "usage": { - "baseline": 0, - "threshold": 0 + "baseline": 256143, + "threshold": 1750 }, "reservation": { "baseline": 24648, @@ -218,32 +218,32 @@ }, "underhill_init": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 4523, + "threshold": 50 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 3755, + "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 14870, + "threshold": 350 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 4812, + "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 39306, + "threshold": 800 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 17508, + "threshold": 600 } } } From 464a84f1ec34b64a2cf5068cdaa9d58bc72a7669 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 18 Sep 2025 00:07:16 +0000 Subject: [PATCH 24/57] adding assertion logging --- petri/src/memstat.rs | 100 +++++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 36 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 1a6e9132fa..8722c61f23 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -96,10 +96,12 @@ impl MemStat { smaps_rollup: Self::parse_memfile( sh.read_file(&format!("/proc/{}/smaps_rollup", value)) .await - .expect(&format!( - "process {} is expected to have a 'smaps_rollup' file", - process_name - )), + .unwrap_or_else(|_| { + panic!( + "process {} is expected to have a 'smaps_rollup' file", + process_name + ) + }), 1, 0, 1, @@ -107,10 +109,12 @@ impl MemStat { statm: Self::parse_statm( sh.read_file(&format!("/proc/{}/statm", value)) .await - .expect(&format!( - "process {} is expected to have a 'statm' file", - process_name - )), + .unwrap_or_else(|_| { + panic!( + "process {} is expected to have a 'statm' file", + process_name + ) + }), ), }, ); @@ -144,19 +148,28 @@ impl MemStat { .unwrap() ); let baseline_json = from_reader::( - File::open(Path::new(&path_str)).expect(&format!("{} file not found", path_str)), + File::open(Path::new(&path_str)) + .unwrap_or_else(|_| panic!("{} file not found", path_str)), ) - .expect(&format!( - "memstat json is expected to exist within the file {}", - path_str - )); + .unwrap_or_else(|_| { + panic!( + "memstat json is expected to exist within the file {}", + path_str + ) + }); let baseline_usage = baseline_json[arch][vps]["usage"]["baseline"] .as_u64() .unwrap() + baseline_json[arch][vps]["usage"]["threshold"] .as_u64() .unwrap(); - assert!(baseline_usage >= (self.meminfo["MemTotal"] - self.total_free_memory_per_zone)); + let cur_usage = self.meminfo["MemTotal"] - self.total_free_memory_per_zone; + assert!( + baseline_usage >= cur_usage, + "baseline usage is less than current usage: {} < {}", + baseline_usage, + cur_usage + ); let baseline_reservation = baseline_json[arch][vps]["reservation"]["baseline"] .as_u64() @@ -164,10 +177,13 @@ impl MemStat { + baseline_json[arch][vps]["reservation"]["threshold"] .as_u64() .unwrap(); - + let cur_reservation = + baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; assert!( - baseline_reservation - >= (baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]) + baseline_reservation >= cur_reservation, + "baseline reservation is less than current reservation: {} < {}", + baseline_reservation, + cur_reservation ); for prs in ["underhill_init", "openvmm_hcl", "underhill_vm"] { @@ -177,15 +193,29 @@ impl MemStat { + baseline_json[arch][vps][prs]["Pss"]["threshold"] .as_u64() .unwrap(); + let cur_pss = self[prs].smaps_rollup["Pss"]; let baseline_pss_anon = baseline_json[arch][vps][prs]["Pss_Anon"]["baseline"] .as_u64() .unwrap() + baseline_json[arch][vps][prs]["Pss_Anon"]["threshold"] .as_u64() .unwrap(); + let cur_pss_anon = self[prs].smaps_rollup["Pss_Anon"]; - assert!(baseline_pss >= self[prs].smaps_rollup["Pss"]); - assert!(baseline_pss_anon >= self[prs].smaps_rollup["Pss_Anon"]); + assert!( + baseline_pss >= cur_pss, + "process {}: baseline PSS is less than current PSS: {} < {}", + prs, + baseline_pss, + cur_pss + ); + assert!( + baseline_pss_anon >= cur_pss_anon, + "process {}: baseline PSS Anon is less than current PSS Anon: {} < {}", + prs, + baseline_pss_anon, + cur_pss_anon + ); } true @@ -202,30 +232,26 @@ impl MemStat { let split_line = line.split_whitespace().collect::>(); let field = split_line .get(field_col) - .expect(&format!( - "in line {} column {} does not exist", - line, field_col - )) + .unwrap_or_else(|| panic!("in line {} column {} does not exist", line, field_col)) .trim_matches(':') .to_string(); let value: u64 = split_line .get(value_col) - .expect(&format!( - "in line {} column {} does not exist", - line, value_col - )) + .unwrap_or_else(|| panic!("in line {} column {} does not exist", line, value_col)) .parse::() - .expect(&format!( - "value column {} in line {} is expected to be a parsable u64", - value_col, line - )); + .unwrap_or_else(|_| { + panic!( + "value column {} in line {} is expected to be a parsable u64", + value_col, line + ) + }); parsed_data.insert(field, value); } parsed_data } fn parse_statm(raw: String) -> HashMap { - let statm_fields = vec![ + let statm_fields = [ "vm_size", "vm_rss", "vm_shared", @@ -240,10 +266,12 @@ impl MemStat { ( statm_fields .get(index) - .expect(&format!( - "statm file is expected to contain at most {} items", - statm_fields.len() - )) + .unwrap_or_else(|| { + panic!( + "statm file is expected to contain at most {} items", + statm_fields.len() + ) + }) .to_string(), value .parse::() From b4f0f8bdf4475f94d56ab36f5255684fdee32c97 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 18 Sep 2025 01:44:24 +0000 Subject: [PATCH 25/57] adjusted baseline constants --- petri/src/memstat.rs | 3 ++- ...fo_baseline.json => memstat_baseline.json} | 24 +++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) rename vmm_tests/vmm_tests/test_data/{meminfo_baseline.json => memstat_baseline.json} (96%) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 8722c61f23..6eb8a52128 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -141,7 +141,7 @@ impl MemStat { /// Compares current statistics against baseline pub fn compare_to_baseline(self, arch: &str, vps: &str) -> bool { let path_str = format!( - "{}/test_data/meminfo_baseline.json", + "{}/test_data/memstat_baseline.json", current_dir() .expect("current_dir is expected to return a path string") .to_str() @@ -272,6 +272,7 @@ impl MemStat { statm_fields.len() ) }) + .to_owned() .to_string(), value .parse::() diff --git a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json similarity index 96% rename from vmm_tests/vmm_tests/test_data/meminfo_baseline.json rename to vmm_tests/vmm_tests/test_data/memstat_baseline.json index dfe66a6172..09a5b131d4 100644 --- a/vmm_tests/vmm_tests/test_data/meminfo_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -95,32 +95,32 @@ }, "underhill_init": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 4511, + "threshold": 100 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 3754, + "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 14859, + "threshold": 250 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 4805, + "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 0, - "threshold": 0 + "baseline": 30196, + "threshold": 400 }, "Pss_Anon": { - "baseline": 0, - "threshold": 0 + "baseline": 9364, + "threshold": 50 } } }, From 2170467a269e05b26f8762e92a0aa151fb355d2a Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 18 Sep 2025 14:58:50 +0000 Subject: [PATCH 26/57] adjusting baseline values --- .../vmm_tests/test_data/memstat_baseline.json | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 09a5b131d4..c02eef3b04 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -37,7 +37,7 @@ }, "Pss_Anon": { "baseline": 4810, - "threshold": 100 + "threshold": 150 } } }, @@ -87,7 +87,7 @@ "2vp": { "usage": { "baseline": 232464, - "threshold": 100 + "threshold": 150 }, "reservation": { "baseline": 17648, @@ -116,7 +116,7 @@ "underhill_vm": { "Pss": { "baseline": 30196, - "threshold": 400 + "threshold": 750 }, "Pss_Anon": { "baseline": 9364, @@ -156,11 +156,11 @@ "underhill_vm": { "Pss": { "baseline": 41627, - "threshold": 400 + "threshold": 500 }, "Pss_Anon": { "baseline": 19711, - "threshold": 350 + "threshold": 500 } } } @@ -170,7 +170,7 @@ "2vp": { "usage": { "baseline": 232497, - "threshold": 100 + "threshold": 150 }, "reservation": { "baseline": 17648, @@ -179,7 +179,7 @@ "underhill_init": { "Pss": { "baseline": 4512, - "threshold": 50 + "threshold": 100 }, "Pss_Anon": { "baseline": 3757, @@ -199,7 +199,7 @@ "underhill_vm": { "Pss": { "baseline": 30294, - "threshold": 750 + "threshold": 1000 }, "Pss_Anon": { "baseline": 9353, @@ -219,7 +219,7 @@ "underhill_init": { "Pss": { "baseline": 4523, - "threshold": 50 + "threshold": 100 }, "Pss_Anon": { "baseline": 3755, @@ -239,11 +239,11 @@ "underhill_vm": { "Pss": { "baseline": 39306, - "threshold": 800 + "threshold": 1000 }, "Pss_Anon": { "baseline": 17508, - "threshold": 600 + "threshold": 750 } } } @@ -282,7 +282,7 @@ "underhill_vm": { "Pss": { "baseline": 30566, - "threshold": 200 + "threshold": 250 }, "Pss_Anon": { "baseline": 9822, @@ -302,7 +302,7 @@ "underhill_init": { "Pss": { "baseline": 4487, - "threshold": 50 + "threshold": 100 }, "Pss_Anon": { "baseline": 3752, @@ -322,11 +322,11 @@ "underhill_vm": { "Pss": { "baseline": 58377, - "threshold": 550 + "threshold": 600 }, "Pss_Anon": { "baseline": 35445, - "threshold": 500 + "threshold": 600 } } } @@ -336,7 +336,7 @@ "2vp": { "usage": { "baseline": 234379, - "threshold": 150 + "threshold": 200 }, "reservation": { "baseline": 28872, @@ -376,7 +376,7 @@ "64vp": { "usage": { "baseline": 310228, - "threshold": 2000 + "threshold": 1750 }, "reservation": { "baseline": 42340, @@ -405,11 +405,11 @@ "underhill_vm": { "Pss": { "baseline": 56666, - "threshold": 1500 + "threshold": 1750 }, "Pss_Anon": { "baseline": 33360, - "threshold": 1500 + "threshold": 1750 } } } From eeccd179a5c36503cce9e427a66cba5e164d56b7 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 18 Sep 2025 18:43:19 +0000 Subject: [PATCH 27/57] refactoring memstat data collection --- petri/src/lib.rs | 2 +- petri/src/memstat.rs | 87 ++++++++++++++++------------------ vmm_tests/vmm_tests/Cargo.toml | 4 +- 3 files changed, 44 insertions(+), 49 deletions(-) diff --git a/petri/src/lib.rs b/petri/src/lib.rs index 8358f9cf9d..0afc5e65f2 100644 --- a/petri/src/lib.rs +++ b/petri/src/lib.rs @@ -10,9 +10,9 @@ pub mod disk_image; mod linux_direct_serial_agent; +pub mod memstat; // TODO: Add docs and maybe a trait interface for this, or maybe this can // remain crate-local somehow without violating interface privacy. -pub mod memstat; #[expect(missing_docs)] pub mod openhcl_diag; mod test; diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 6eb8a52128..3f2ae398df 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -42,6 +42,9 @@ pub struct MemStat { /// underhill_vm corresponds to the memory usage statistics for the underhill-vm process pub underhill_vm: PerProcessMemstat, + + /// json object to hold baseline values that test results are compared against + baseline_json: Value, } impl MemStat { @@ -67,7 +70,7 @@ impl MemStat { .nth(1) .expect("'nr_free_pages' and 'count:' lines are expected to have at least 2 words split by whitespace") .parse::() - .expect("The word at position 1 on the filtered lines is expected to contain a numbre value") + .expect("The word at position 1 on the filtered lines is expected to contain a number value") }) .sum::() * 4; @@ -120,6 +123,24 @@ impl MemStat { ); } + let path_str = format!( + "{}/test_data/memstat_baseline.json", + current_dir() + .expect("current_dir is expected to return a path string") + .to_str() + .unwrap() + ); + let baseline_json = from_reader::( + File::open(Path::new(&path_str)) + .unwrap_or_else(|_| panic!("{} file not found", path_str)), + ) + .unwrap_or_else(|_| { + panic!( + "memstat json is expected to exist within the file {}", + path_str + ) + }); + Self { meminfo, total_free_memory_per_zone, @@ -135,34 +156,13 @@ impl MemStat { .get("underhill_vm") .expect("per_process_data should have underhill_vm data if the process exists") .clone(), + baseline_json, } } /// Compares current statistics against baseline pub fn compare_to_baseline(self, arch: &str, vps: &str) -> bool { - let path_str = format!( - "{}/test_data/memstat_baseline.json", - current_dir() - .expect("current_dir is expected to return a path string") - .to_str() - .unwrap() - ); - let baseline_json = from_reader::( - File::open(Path::new(&path_str)) - .unwrap_or_else(|_| panic!("{} file not found", path_str)), - ) - .unwrap_or_else(|_| { - panic!( - "memstat json is expected to exist within the file {}", - path_str - ) - }); - let baseline_usage = baseline_json[arch][vps]["usage"]["baseline"] - .as_u64() - .unwrap() - + baseline_json[arch][vps]["usage"]["threshold"] - .as_u64() - .unwrap(); + let baseline_usage = Self::get_baseline_value(&self.baseline_json[arch][vps]["usage"]); let cur_usage = self.meminfo["MemTotal"] - self.total_free_memory_per_zone; assert!( baseline_usage >= cur_usage, @@ -171,14 +171,10 @@ impl MemStat { cur_usage ); - let baseline_reservation = baseline_json[arch][vps]["reservation"]["baseline"] - .as_u64() - .unwrap() - + baseline_json[arch][vps]["reservation"]["threshold"] - .as_u64() - .unwrap(); + let baseline_reservation = + Self::get_baseline_value(&self.baseline_json[arch][vps]["reservation"]); let cur_reservation = - baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; + self.baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; assert!( baseline_reservation >= cur_reservation, "baseline reservation is less than current reservation: {} < {}", @@ -187,31 +183,23 @@ impl MemStat { ); for prs in ["underhill_init", "openvmm_hcl", "underhill_vm"] { - let baseline_pss = baseline_json[arch][vps][prs]["Pss"]["baseline"] - .as_u64() - .unwrap() - + baseline_json[arch][vps][prs]["Pss"]["threshold"] - .as_u64() - .unwrap(); + let baseline_pss = Self::get_baseline_value(&self.baseline_json[arch][vps][prs]["Pss"]); let cur_pss = self[prs].smaps_rollup["Pss"]; - let baseline_pss_anon = baseline_json[arch][vps][prs]["Pss_Anon"]["baseline"] - .as_u64() - .unwrap() - + baseline_json[arch][vps][prs]["Pss_Anon"]["threshold"] - .as_u64() - .unwrap(); + + let baseline_pss_anon = + Self::get_baseline_value(&self.baseline_json[arch][vps][prs]["Pss_Anon"]); let cur_pss_anon = self[prs].smaps_rollup["Pss_Anon"]; assert!( baseline_pss >= cur_pss, - "process {}: baseline PSS is less than current PSS: {} < {}", + "[process {}]: baseline PSS is less than current PSS: {} < {}", prs, baseline_pss, cur_pss ); assert!( baseline_pss_anon >= cur_pss_anon, - "process {}: baseline PSS Anon is less than current PSS Anon: {} < {}", + "[process {}]: baseline PSS Anon is less than current PSS Anon: {} < {}", prs, baseline_pss_anon, cur_pss_anon @@ -281,6 +269,15 @@ impl MemStat { }) .collect::>() } + + fn get_baseline_value(baseline_json: &Value) -> u64 { + return baseline_json["baseline"].as_u64().unwrap_or_else(|| { + panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") + }) + + baseline_json["threshold"].as_u64().unwrap_or_else(|| { + panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") + }); + } } impl Index<&'_ str> for MemStat { diff --git a/vmm_tests/vmm_tests/Cargo.toml b/vmm_tests/vmm_tests/Cargo.toml index ca0193631b..865d6e9b8c 100644 --- a/vmm_tests/vmm_tests/Cargo.toml +++ b/vmm_tests/vmm_tests/Cargo.toml @@ -59,9 +59,7 @@ hvlite_ttrpc_vmservice.workspace = true mesh_rpc.workspace = true tempfile.workspace = true +serde_json.workspace = true [lints] workspace = true - -[dependencies] -serde_json.workspace = true From a8381143a6d9312f9e9ce493806d297a3518498c Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 18 Sep 2025 19:25:31 +0000 Subject: [PATCH 28/57] addressing clippy errors --- petri/src/memstat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/petri/src/memstat.rs b/petri/src/memstat.rs index 3f2ae398df..05b1665dfd 100644 --- a/petri/src/memstat.rs +++ b/petri/src/memstat.rs @@ -271,12 +271,12 @@ impl MemStat { } fn get_baseline_value(baseline_json: &Value) -> u64 { - return baseline_json["baseline"].as_u64().unwrap_or_else(|| { + baseline_json["baseline"].as_u64().unwrap_or_else(|| { panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") }) + baseline_json["threshold"].as_u64().unwrap_or_else(|| { panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") - }); + }) } } From 0ea0f8c5e5706c35cdfaf3aadf2d1580d7090d6d Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 22 Sep 2025 15:13:56 +0000 Subject: [PATCH 29/57] tuning values --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index c02eef3b04..969016ebc2 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -106,7 +106,7 @@ "openvmm_hcl": { "Pss": { "baseline": 14859, - "threshold": 250 + "threshold": 300 }, "Pss_Anon": { "baseline": 4805, From 33d91872e3df716069ca5385a485d5f376749545 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 23 Sep 2025 15:25:08 +0000 Subject: [PATCH 30/57] moving memstat.rs to vmm_tests --- Cargo.lock | 2 ++ petri/src/lib.rs | 1 - vmm_tests/vmm_tests/Cargo.toml | 4 ++++ vmm_tests/vmm_tests/tests/tests/multiarch.rs | 19 ++++++++++--------- .../tests/tests/multiarch}/memstat.rs | 0 5 files changed, 16 insertions(+), 10 deletions(-) rename {petri/src => vmm_tests/vmm_tests/tests/tests/multiarch}/memstat.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 72e4807366..1478378200 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9318,8 +9318,10 @@ dependencies = [ "petri_artifact_resolver_openvmm_known_paths", "petri_artifacts_common", "petri_artifacts_vmm_test", + "pipette_client", "safe_intrinsics", "scsidisk_resources", + "serde", "serde_json", "storvsp_resources", "tempfile", diff --git a/petri/src/lib.rs b/petri/src/lib.rs index 0afc5e65f2..7188c024ef 100644 --- a/petri/src/lib.rs +++ b/petri/src/lib.rs @@ -10,7 +10,6 @@ pub mod disk_image; mod linux_direct_serial_agent; -pub mod memstat; // TODO: Add docs and maybe a trait interface for this, or maybe this can // remain crate-local somehow without violating interface privacy. #[expect(missing_docs)] diff --git a/vmm_tests/vmm_tests/Cargo.toml b/vmm_tests/vmm_tests/Cargo.toml index 865d6e9b8c..32cdea93da 100644 --- a/vmm_tests/vmm_tests/Cargo.toml +++ b/vmm_tests/vmm_tests/Cargo.toml @@ -63,3 +63,7 @@ serde_json.workspace = true [lints] workspace = true + +[dependencies] +pipette_client.workspace = true +serde.workspace = true diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index b44bdc4b00..eac80a05a5 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -17,7 +17,6 @@ use petri::ProcessorTopology; use petri::ResolvedArtifact; use petri::SIZE_1_GB; use petri::ShutdownKind; -use petri::memstat::MemStat; use petri::openvmm::NIC_MAC_ADDRESS; use petri::openvmm::OpenVmmPetriBackend; use petri::pipette::cmd; @@ -35,6 +34,8 @@ use vmm_test_macros::vmm_test_no_agent; // Servicing tests. pub(crate) mod openhcl_servicing; +pub mod memstat; + /// Boot through the UEFI firmware, it will shut itself down after booting. #[vmm_test_no_agent( openvmm_uefi_x64(none), @@ -851,7 +852,7 @@ async fn meminfo_status_tdx_2_proc_no_agent( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -882,7 +883,7 @@ async fn meminfo_status_tdx_64_proc_no_agent( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -913,7 +914,7 @@ async fn meminfo_status_snp_2_proc_no_agent( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -944,7 +945,7 @@ async fn meminfo_status_snp_64_proc_no_agent( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -979,7 +980,7 @@ async fn meminfo_status_x64_2_proc( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -1013,7 +1014,7 @@ async fn meminfo_status_x64_32_proc( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -1048,7 +1049,7 @@ async fn meminfo_status_arm_2_proc( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() @@ -1083,7 +1084,7 @@ async fn meminfo_status_arm_64_proc( .await?; std::thread::sleep(Duration::from_secs(60)); let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = MemStat::new(&vtl2_agent).await; + let memstat = memstat::MemStat::new(&vtl2_agent).await; tracing::info!( "MEMSTAT_START:\n{}\n:MEMSTAT_END", to_string_pretty(&memstat).unwrap() diff --git a/petri/src/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs similarity index 100% rename from petri/src/memstat.rs rename to vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs From 7341a6fb47bb38adf1d7c39e72df99f25e9d18c4 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 23 Sep 2025 23:59:42 +0000 Subject: [PATCH 31/57] adjusting baseline values and names --- vmm_tests/vmm_tests/Cargo.toml | 6 +- .../vmm_tests/test_data/memstat_baseline.json | 196 +++++++++--------- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 16 +- .../tests/tests/multiarch/memstat.rs | 45 ++-- 4 files changed, 132 insertions(+), 131 deletions(-) diff --git a/vmm_tests/vmm_tests/Cargo.toml b/vmm_tests/vmm_tests/Cargo.toml index 32cdea93da..4a32f3f4b1 100644 --- a/vmm_tests/vmm_tests/Cargo.toml +++ b/vmm_tests/vmm_tests/Cargo.toml @@ -60,10 +60,8 @@ mesh_rpc.workspace = true tempfile.workspace = true serde_json.workspace = true +pipette_client.workspace = true +serde.workspace = true [lints] workspace = true - -[dependencies] -pipette_client.workspace = true -serde.workspace = true diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 969016ebc2..bec108799e 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -3,80 +3,80 @@ "vtl2_total": 524288, "2vp": { "usage": { - "baseline": 59922, - "threshold": 200 + "base": 59509, + "threshold": 150 }, "reservation": { - "baseline": 18348, + "base": 18360, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 1053, + "base": 1176, "threshold": 50 }, "Pss_Anon": { - "baseline": 288.8, + "base": 295, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 10866, - "threshold": 100 + "base": 10711, + "threshold": 50 }, "Pss_Anon": { - "baseline": 1392, + "base": 1356, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 21977, - "threshold": 150 + "base": 21573, + "threshold": 100 }, "Pss_Anon": { - "baseline": 4810, - "threshold": 150 + "base": 4772, + "threshold": 100 } } }, "64vp": { "usage": { - "baseline": 120074, + "base": 119582, "threshold": 1000 }, "reservation": { - "baseline": 23872, + "base": 23884, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 1052, + "base": 1172, "threshold": 50 }, "Pss_Anon": { - "baseline": 288, + "base": 291, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 10814, + "base": 10723, "threshold": 50 }, "Pss_Anon": { - "baseline": 1364, + "base": 1368, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 37327, + "base": 36770, "threshold": 500 }, "Pss_Anon": { - "baseline": 18150, + "base": 18150, "threshold": 500 } } @@ -86,80 +86,80 @@ "vtl2_total": 524288, "2vp": { "usage": { - "baseline": 232464, + "base": 231586, "threshold": 150 }, "reservation": { - "baseline": 17648, + "base": 17660, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4511, + "base": 4551, "threshold": 100 }, "Pss_Anon": { - "baseline": 3754, + "base": 3760, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14859, - "threshold": 300 + "base": 14888, + "threshold": 250 }, "Pss_Anon": { - "baseline": 4805, - "threshold": 50 + "base": 4812, + "threshold": 100 } }, "underhill_vm": { "Pss": { - "baseline": 30196, - "threshold": 750 + "base": 29613, + "threshold": 150 }, "Pss_Anon": { - "baseline": 9364, - "threshold": 50 + "base": 9341, + "threshold": 150 } } }, "32vp": { "usage": { - "baseline": 260505, + "base": 258715, "threshold": 1500 }, "reservation": { - "baseline": 24648, + "base": 24664, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4535, + "base": 4519, "threshold": 50 }, "Pss_Anon": { - "baseline": 3762, + "base": 3761, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14886, - "threshold": 300 + "base": 14819, + "threshold": 100 }, "Pss_Anon": { - "baseline": 4833, - "threshold": 50 + "base": 4810, + "threshold": 100 } }, "underhill_vm": { "Pss": { - "baseline": 41627, + "base": 40373, "threshold": 500 }, "Pss_Anon": { - "baseline": 19711, + "base": 19026, "threshold": 500 } } @@ -169,80 +169,80 @@ "vtl2_total": 524288, "2vp": { "usage": { - "baseline": 232497, + "base": 232497, "threshold": 150 }, "reservation": { - "baseline": 17648, + "base": 17648, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4512, + "base": 4512, "threshold": 100 }, "Pss_Anon": { - "baseline": 3757, + "base": 3757, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14819, + "base": 14819, "threshold": 400 }, "Pss_Anon": { - "baseline": 4805, + "base": 4805, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 30294, + "base": 30294, "threshold": 1000 }, "Pss_Anon": { - "baseline": 9353, + "base": 9353, "threshold": 100 } } }, "32vp": { "usage": { - "baseline": 256143, + "base": 256143, "threshold": 1750 }, "reservation": { - "baseline": 24648, + "base": 24648, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4523, + "base": 4523, "threshold": 100 }, "Pss_Anon": { - "baseline": 3755, + "base": 3755, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14870, + "base": 14870, "threshold": 350 }, "Pss_Anon": { - "baseline": 4812, + "base": 4812, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 39306, + "base": 39306, "threshold": 1000 }, "Pss_Anon": { - "baseline": 17508, + "base": 17508, "threshold": 750 } } @@ -252,80 +252,80 @@ "vtl2_total": 655360, "2vp": { "usage": { - "baseline": 232228, + "base": 231051, "threshold": 200 }, "reservation": { - "baseline": 28936, + "base": 28952, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4521, + "base": 4539, "threshold": 100 }, "Pss_Anon": { - "baseline": 3747, + "base": 3756, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14849, - "threshold": 200 + "base": 14834, + "threshold": 250 }, "Pss_Anon": { - "baseline": 4780, + "base": 4786, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 30566, + "base": 29377, "threshold": 250 }, "Pss_Anon": { - "baseline": 9822, + "base": 9259, "threshold": 250 } } }, "64vp": { "usage": { - "baseline": 307431, + "base": 306378, "threshold": 1000 }, "reservation": { - "baseline": 41660, + "base": 41676, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4487, + "base": 4516, "threshold": 100 }, "Pss_Anon": { - "baseline": 3752, + "base": 3753, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14788, - "threshold": 350 + "base": 14763, + "threshold": 150 }, "Pss_Anon": { - "baseline": 4787, + "base": 4788, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 58377, + "base": 57559, "threshold": 600 }, "Pss_Anon": { - "baseline": 35445, + "base": 34949, "threshold": 600 } } @@ -335,81 +335,81 @@ "vtl2_total": 655360, "2vp": { "usage": { - "baseline": 234379, + "base": 233383, "threshold": 200 }, "reservation": { - "baseline": 28872, + "base": 28884, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4519, + "base": 4527, "threshold": 100 }, "Pss_Anon": { - "baseline": 3749, + "base": 3759, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14697, - "threshold": 250 + "base": 14720, + "threshold": 200 }, "Pss_Anon": { - "baseline": 4776, + "base": 4781, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 32625, - "threshold": 300 + "base": 31589, + "threshold": 250 }, "Pss_Anon": { - "baseline": 11756, + "base": 11424, "threshold": 150 } } }, "64vp": { "usage": { - "baseline": 310228, - "threshold": 1750 + "base": 306304, + "threshold": 2000 }, "reservation": { - "baseline": 42340, + "base": 42356, "threshold": 0 }, "underhill_init": { "Pss": { - "baseline": 4514, - "threshold": 50 + "base": 4525, + "threshold": 100 }, "Pss_Anon": { - "baseline": 3752, + "base": 3752, "threshold": 50 } }, "openvmm_hcl": { "Pss": { - "baseline": 14874, + "base": 14641, "threshold": 200 }, "Pss_Anon": { - "baseline": 4774, + "base": 4785, "threshold": 50 } }, "underhill_vm": { "Pss": { - "baseline": 56666, - "threshold": 1750 + "base": 54411, + "threshold": 1500 }, "Pss_Anon": { - "baseline": 33360, - "threshold": 1750 + "base": 31486, + "threshold": 1000 } } } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index eac80a05a5..48c5d7e16d 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -836,7 +836,7 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_tdx_2_proc_no_agent( +async fn memory_validation_tdx_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -867,7 +867,7 @@ async fn meminfo_status_tdx_2_proc_no_agent( #[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_tdx_64_proc_no_agent( +async fn memory_validation_tdx_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -898,7 +898,7 @@ async fn meminfo_status_tdx_64_proc_no_agent( #[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_snp_2_proc_no_agent( +async fn memory_validation_snp_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -929,7 +929,7 @@ async fn meminfo_status_snp_2_proc_no_agent( #[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_snp_64_proc_no_agent( +async fn memory_validation_snp_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { let mut vm = config @@ -960,7 +960,7 @@ async fn meminfo_status_snp_64_proc_no_agent( #[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_x64_2_proc( +async fn memory_validation_x64_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -994,7 +994,7 @@ async fn meminfo_status_x64_2_proc( #[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_x64_32_proc( +async fn memory_validation_x64_32_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -1029,7 +1029,7 @@ async fn meminfo_status_x64_32_proc( #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_arm_2_proc( +async fn memory_validation_arm_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config @@ -1064,7 +1064,7 @@ async fn meminfo_status_arm_2_proc( #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn meminfo_status_arm_64_proc( +async fn memory_validation_arm_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { let (mut vm, agent) = config diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 05b1665dfd..7350cde02c 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -//! Memory Validation Data Collection for Petri Tests +//! Memory Validation Data Collection for VMM Tests use pipette_client::PipetteClient; use pipette_client::cmd; @@ -49,6 +49,7 @@ pub struct MemStat { impl MemStat { /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes + /// This also caches the baseline data into the struct for later comparison pub async fn new(vtl2_agent: &PipetteClient) -> Self { let sh = vtl2_agent.unix_shell(); let meminfo = Self::parse_memfile( @@ -171,41 +172,43 @@ impl MemStat { cur_usage ); - let baseline_reservation = - Self::get_baseline_value(&self.baseline_json[arch][vps]["reservation"]); - let cur_reservation = - self.baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; - assert!( - baseline_reservation >= cur_reservation, - "baseline reservation is less than current reservation: {} < {}", - baseline_reservation, - cur_reservation - ); - - for prs in ["underhill_init", "openvmm_hcl", "underhill_vm"] { - let baseline_pss = Self::get_baseline_value(&self.baseline_json[arch][vps][prs]["Pss"]); - let cur_pss = self[prs].smaps_rollup["Pss"]; + for underhill_process in ["underhill_init", "openvmm_hcl", "underhill_vm"] { + let baseline_pss = + Self::get_baseline_value(&self.baseline_json[arch][vps][underhill_process]["Pss"]); + let cur_pss = self[underhill_process].smaps_rollup["Pss"]; - let baseline_pss_anon = - Self::get_baseline_value(&self.baseline_json[arch][vps][prs]["Pss_Anon"]); - let cur_pss_anon = self[prs].smaps_rollup["Pss_Anon"]; + let baseline_pss_anon = Self::get_baseline_value( + &self.baseline_json[arch][vps][underhill_process]["Pss_Anon"], + ); + let cur_pss_anon = self[underhill_process].smaps_rollup["Pss_Anon"]; assert!( baseline_pss >= cur_pss, "[process {}]: baseline PSS is less than current PSS: {} < {}", - prs, + underhill_process, baseline_pss, cur_pss ); assert!( baseline_pss_anon >= cur_pss_anon, "[process {}]: baseline PSS Anon is less than current PSS Anon: {} < {}", - prs, + underhill_process, baseline_pss_anon, cur_pss_anon ); } + let baseline_reservation = + Self::get_baseline_value(&self.baseline_json[arch][vps]["reservation"]); + let cur_reservation = + self.baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; + assert!( + baseline_reservation >= cur_reservation, + "baseline reservation is less than current reservation: {} < {}", + baseline_reservation, + cur_reservation + ); + true } @@ -271,7 +274,7 @@ impl MemStat { } fn get_baseline_value(baseline_json: &Value) -> u64 { - baseline_json["baseline"].as_u64().unwrap_or_else(|| { + baseline_json["base"].as_u64().unwrap_or_else(|| { panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") }) + baseline_json["threshold"].as_u64().unwrap_or_else(|| { From cb0dc2e507fbc91ff3eebd22c41cdb2e88a93696 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 24 Sep 2025 15:07:04 +0000 Subject: [PATCH 32/57] tuning baseline values --- .../vmm_tests/test_data/memstat_baseline.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index bec108799e..8cf9ee1053 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -63,11 +63,11 @@ "openvmm_hcl": { "Pss": { "base": 10723, - "threshold": 50 + "threshold": 100 }, "Pss_Anon": { "base": 1368, - "threshold": 50 + "threshold": 100 } }, "underhill_vm": { @@ -106,11 +106,11 @@ "openvmm_hcl": { "Pss": { "base": 14888, - "threshold": 250 + "threshold": 300 }, "Pss_Anon": { "base": 4812, - "threshold": 100 + "threshold": 150 } }, "underhill_vm": { @@ -302,21 +302,21 @@ "underhill_init": { "Pss": { "base": 4516, - "threshold": 100 + "threshold": 200 }, "Pss_Anon": { "base": 3753, - "threshold": 50 + "threshold": 100 } }, "openvmm_hcl": { "Pss": { "base": 14763, - "threshold": 150 + "threshold": 250 }, "Pss_Anon": { "base": 4788, - "threshold": 50 + "threshold": 100 } }, "underhill_vm": { @@ -355,11 +355,11 @@ "openvmm_hcl": { "Pss": { "base": 14720, - "threshold": 200 + "threshold": 350 }, "Pss_Anon": { "base": 4781, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { From 23d8977d3837d93f341d97521bcab1e170c5b9ed Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 24 Sep 2025 15:36:21 +0000 Subject: [PATCH 33/57] tuning baseline values --- .../vmm_tests/test_data/memstat_baseline.json | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 8cf9ee1053..21d6d907af 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -13,31 +13,31 @@ "underhill_init": { "Pss": { "base": 1176, - "threshold": 50 + "threshold": 150 }, "Pss_Anon": { "base": 295, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { "Pss": { "base": 10711, - "threshold": 50 + "threshold": 150 }, "Pss_Anon": { "base": 1356, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { "Pss": { "base": 21573, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 4772, - "threshold": 100 + "threshold": 150 } } }, @@ -53,31 +53,31 @@ "underhill_init": { "Pss": { "base": 1172, - "threshold": 50 + "threshold": 150 }, "Pss_Anon": { "base": 291, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { "Pss": { "base": 10723, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 1368, - "threshold": 100 + "threshold": 150 } }, "underhill_vm": { "Pss": { "base": 36770, - "threshold": 500 + "threshold": 1500 }, "Pss_Anon": { "base": 18150, - "threshold": 500 + "threshold": 1500 } } } @@ -96,11 +96,11 @@ "underhill_init": { "Pss": { "base": 4551, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3760, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -136,31 +136,31 @@ "underhill_init": { "Pss": { "base": 4519, - "threshold": 50 + "threshold": 150 }, "Pss_Anon": { "base": 3761, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { "Pss": { "base": 14819, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 4810, - "threshold": 100 + "threshold": 150 } }, "underhill_vm": { "Pss": { "base": 40373, - "threshold": 500 + "threshold": 1500 }, "Pss_Anon": { "base": 19026, - "threshold": 500 + "threshold": 1500 } } } @@ -179,11 +179,11 @@ "underhill_init": { "Pss": { "base": 4512, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3757, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -193,7 +193,7 @@ }, "Pss_Anon": { "base": 4805, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { @@ -203,7 +203,7 @@ }, "Pss_Anon": { "base": 9353, - "threshold": 100 + "threshold": 150 } } }, @@ -219,11 +219,11 @@ "underhill_init": { "Pss": { "base": 4523, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3755, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -233,7 +233,7 @@ }, "Pss_Anon": { "base": 4812, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { @@ -262,11 +262,11 @@ "underhill_init": { "Pss": { "base": 4539, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3756, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -276,7 +276,7 @@ }, "Pss_Anon": { "base": 4786, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { @@ -306,7 +306,7 @@ }, "Pss_Anon": { "base": 3753, - "threshold": 100 + "threshold": 150 } }, "openvmm_hcl": { @@ -316,7 +316,7 @@ }, "Pss_Anon": { "base": 4788, - "threshold": 100 + "threshold": 150 } }, "underhill_vm": { @@ -345,11 +345,11 @@ "underhill_init": { "Pss": { "base": 4527, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3759, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -385,11 +385,11 @@ "underhill_init": { "Pss": { "base": 4525, - "threshold": 100 + "threshold": 150 }, "Pss_Anon": { "base": 3752, - "threshold": 50 + "threshold": 150 } }, "openvmm_hcl": { @@ -399,7 +399,7 @@ }, "Pss_Anon": { "base": 4785, - "threshold": 50 + "threshold": 150 } }, "underhill_vm": { From fca7b6f5de83071aac3eed6234db12f21a4e44dd Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 25 Sep 2025 16:26:18 +0000 Subject: [PATCH 34/57] refactoring idle workload --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 200 +----------------- .../tests/tests/multiarch/memstat.rs | 42 ++++ 2 files changed, 50 insertions(+), 192 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 48c5d7e16d..2e12074021 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -23,7 +23,6 @@ use petri::pipette::cmd; use petri_artifacts_common::tags::MachineArch; use petri_artifacts_common::tags::OsFlavor; use petri_artifacts_vmm_test::artifacts::test_vmgs::VMGS_WITH_BOOT_ENTRY; -use serde_json::to_string_pretty; use std::str::FromStr; use std::time::Duration; use vmm_test_macros::openvmm_test; @@ -839,28 +838,7 @@ async fn validate_mnf_usage_in_guest( async fn memory_validation_tdx_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let mut vm = config - .with_processor_topology(ProcessorTopology { - vp_count: 2, - ..Default::default() - }) - .with_memory(MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - }) - .run_without_agent() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; - vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline("intel-tdx", "2vp")); + memstat::idle_test::(config, "intel-tdx", 2, 16, 10).await?; Ok(()) } @@ -870,28 +848,7 @@ async fn memory_validation_tdx_2_proc_no_agent( async fn memory_validation_tdx_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let mut vm = config - .with_processor_topology(ProcessorTopology { - vp_count: 64, - ..Default::default() - }) - .with_memory(MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - }) - .run_without_agent() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; - vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline("intel-tdx", "64vp")); + memstat::idle_test::(config, "intel-tdx", 64, 16, 15).await?; Ok(()) } @@ -901,28 +858,7 @@ async fn memory_validation_tdx_64_proc_no_agent( async fn memory_validation_snp_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let mut vm = config - .with_processor_topology(ProcessorTopology { - vp_count: 2, - ..Default::default() - }) - .with_memory(MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - }) - .run_without_agent() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; - vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline("amd-snp", "2vp")); + memstat::idle_test(config, "amd-snp", 2, 16, 10).await?; Ok(()) } @@ -932,28 +868,7 @@ async fn memory_validation_snp_2_proc_no_agent( async fn memory_validation_snp_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let mut vm = config - .with_processor_topology(ProcessorTopology { - vp_count: 64, - ..Default::default() - }) - .with_memory(MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - }) - .run_without_agent() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; - vm.wait_for_clean_teardown().await?; - assert!(memstat.compare_to_baseline("amd-snp", "64vp")); + memstat::idle_test(config, "amd-snp", 64, 16, 15).await?; Ok(()) } @@ -963,31 +878,7 @@ async fn memory_validation_snp_64_proc_no_agent( async fn memory_validation_x64_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 2, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - agent.power_off().await?; - vm.wait_for_teardown().await?; - memstat.compare_to_baseline("intel-x64", "2vp"); + memstat::idle_test(config, "intel-x64", 2, 16, 10).await?; Ok(()) } @@ -997,32 +888,7 @@ async fn memory_validation_x64_2_proc( async fn memory_validation_x64_32_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 32, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - agent.power_off().await?; - vm.wait_for_teardown().await?; - memstat.compare_to_baseline("intel-x64", "32vp"); + memstat::idle_test(config, "intel-x64", 32, 16, 10).await?; Ok(()) } @@ -1032,32 +898,7 @@ async fn memory_validation_x64_32_proc( async fn memory_validation_arm_2_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 2, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - agent.power_off().await?; - vm.wait_for_teardown().await?; - - assert!(memstat.compare_to_baseline("aarch64", "2vp")); + memstat::idle_test(config, "aarch64", 2, 16, 10).await?; Ok(()) } @@ -1067,32 +908,7 @@ async fn memory_validation_arm_2_proc( async fn memory_validation_arm_64_proc( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let (mut vm, agent) = config - .with_processor_topology({ - ProcessorTopology { - vp_count: 64, - ..Default::default() - } - }) - .with_memory({ - MemoryConfig { - startup_bytes: 16 * (1024 * 1024 * 1024), - dynamic_memory_range: None, - } - }) - .run() - .await?; - std::thread::sleep(Duration::from_secs(60)); - let vtl2_agent = vm.wait_for_vtl2_agent().await?; - let memstat = memstat::MemStat::new(&vtl2_agent).await; - tracing::info!( - "MEMSTAT_START:\n{}\n:MEMSTAT_END", - to_string_pretty(&memstat).unwrap() - ); - - agent.power_off().await?; - vm.wait_for_teardown().await?; - assert!(memstat.compare_to_baseline("aarch64", "64vp")); + memstat::idle_test(config, "aarch64", 64, 16, 15).await?; Ok(()) } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 7350cde02c..575110fcbd 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -3,17 +3,24 @@ //! Memory Validation Data Collection for VMM Tests +use petri::MemoryConfig; +use petri::PetriVmBuilder; +use petri::PetriVmmBackend; +use petri::ProcessorTopology; +use petri::ShutdownKind; use pipette_client::PipetteClient; use pipette_client::cmd; use serde::Serialize; use serde_json::Value; use serde_json::from_reader; +use serde_json::to_string; use std::collections::HashMap; use std::env::current_dir; use std::fs::File; use std::ops::Index; use std::ops::IndexMut; use std::path::Path; +use std::time::Duration; /// PerProcessMemstat struct collects statistics from a single process relevant to memory validation #[derive(Serialize, Clone, Default)] @@ -305,3 +312,38 @@ impl IndexMut<&'_ str> for MemStat { } } } + +pub async fn idle_test( + config: PetriVmBuilder, + arch: &str, + vps: u32, + vm_memory_gb: u64, + wait_time_sec: u64, +) -> anyhow::Result<()> { + let mut vm = config + .with_processor_topology({ + ProcessorTopology { + vp_count: vps, + ..Default::default() + } + }) + .with_memory({ + MemoryConfig { + startup_bytes: vm_memory_gb * (1024 * 1024 * 1024), + dynamic_memory_range: None, + } + }) + .run_without_agent() + .await?; + let vtl2_agent = vm.wait_for_vtl2_agent().await?; + + // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results + std::thread::sleep(Duration::from_secs(wait_time_sec)); + let memstat = MemStat::new(&vtl2_agent).await; + tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); + vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; + vm.wait_for_teardown().await?; + assert!(memstat.compare_to_baseline(arch, &format!("{}vp", vps))); + + Ok(()) +} From ceaece835a7663f6da4dedfd456b9b34edd1031a Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 25 Sep 2025 17:39:10 +0000 Subject: [PATCH 35/57] cleaning implementation and naming --- .config/nextest.toml | 2 +- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 9 ++- .../tests/tests/multiarch/memstat.rs | 75 +++++++++---------- 3 files changed, 41 insertions(+), 45 deletions(-) diff --git a/.config/nextest.toml b/.config/nextest.toml index 1d86f8b4e2..953e7b0cd8 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -47,7 +47,7 @@ slow-timeout = { period = "5m", terminate-after = 2 } # Memory validation tests may need extended timeout [[profile.ci.overrides]] -filter = 'package(~vmm_tests) & test(meminfo)' +filter = 'package(~vmm_tests) & test(memory_validation)' slow-timeout = { period = "5m", terminate-after = 2 } [[profile.ci.overrides]] diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 2e12074021..762e917efc 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -33,6 +33,7 @@ use vmm_test_macros::vmm_test_no_agent; // Servicing tests. pub(crate) mod openhcl_servicing; +// Memory Validation tests. pub mod memstat; /// Boot through the UEFI firmware, it will shut itself down after booting. @@ -875,7 +876,7 @@ async fn memory_validation_snp_64_proc_no_agent( #[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_x64_2_proc( +async fn memory_validation_x64_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { memstat::idle_test(config, "intel-x64", 2, 16, 10).await?; @@ -885,7 +886,7 @@ async fn memory_validation_x64_2_proc( #[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_x64_32_proc( +async fn memory_validation_x64_32_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { memstat::idle_test(config, "intel-x64", 32, 16, 10).await?; @@ -895,7 +896,7 @@ async fn memory_validation_x64_32_proc( #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_arm_2_proc( +async fn memory_validation_arm_2_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { memstat::idle_test(config, "aarch64", 2, 16, 10).await?; @@ -905,7 +906,7 @@ async fn memory_validation_arm_2_proc( #[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_arm_64_proc( +async fn memory_validation_arm_64_proc_no_agent( config: PetriVmBuilder, ) -> anyhow::Result<()> { memstat::idle_test(config, "aarch64", 64, 16, 15).await?; diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 575110fcbd..c29bb44570 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -//! Memory Validation Data Collection for VMM Tests +//! Memory Validation for VMM Tests use petri::MemoryConfig; use petri::PetriVmBuilder; @@ -49,14 +49,10 @@ pub struct MemStat { /// underhill_vm corresponds to the memory usage statistics for the underhill-vm process pub underhill_vm: PerProcessMemstat, - - /// json object to hold baseline values that test results are compared against - baseline_json: Value, } impl MemStat { /// Construction of a MemStat object takes the vtl2 Pipette agent to query OpenHCL for memory statistics for VTL2 as a whole and for VTL2's processes - /// This also caches the baseline data into the struct for later comparison pub async fn new(vtl2_agent: &PipetteClient) -> Self { let sh = vtl2_agent.unix_shell(); let meminfo = Self::parse_memfile( @@ -131,24 +127,6 @@ impl MemStat { ); } - let path_str = format!( - "{}/test_data/memstat_baseline.json", - current_dir() - .expect("current_dir is expected to return a path string") - .to_str() - .unwrap() - ); - let baseline_json = from_reader::( - File::open(Path::new(&path_str)) - .unwrap_or_else(|_| panic!("{} file not found", path_str)), - ) - .unwrap_or_else(|_| { - panic!( - "memstat json is expected to exist within the file {}", - path_str - ) - }); - Self { meminfo, total_free_memory_per_zone, @@ -164,13 +142,30 @@ impl MemStat { .get("underhill_vm") .expect("per_process_data should have underhill_vm data if the process exists") .clone(), - baseline_json, } } /// Compares current statistics against baseline - pub fn compare_to_baseline(self, arch: &str, vps: &str) -> bool { - let baseline_usage = Self::get_baseline_value(&self.baseline_json[arch][vps]["usage"]); + pub fn compare_to_baseline(self, arch: &str, vps: &str) -> anyhow::Result<()> { + let path_str = format!( + "{}/test_data/memstat_baseline.json", + current_dir() + .expect("current_dir is expected to return a path string") + .to_str() + .unwrap() + ); + let baseline_json = from_reader::( + File::open(Path::new(&path_str)) + .unwrap_or_else(|_| panic!("{} file not found", path_str)), + ) + .unwrap_or_else(|_| { + panic!( + "memstat json is expected to exist within the file {}", + path_str + ) + }); + + let baseline_usage = Self::get_baseline_value(&baseline_json[arch][vps]["usage"]); let cur_usage = self.meminfo["MemTotal"] - self.total_free_memory_per_zone; assert!( baseline_usage >= cur_usage, @@ -181,12 +176,11 @@ impl MemStat { for underhill_process in ["underhill_init", "openvmm_hcl", "underhill_vm"] { let baseline_pss = - Self::get_baseline_value(&self.baseline_json[arch][vps][underhill_process]["Pss"]); + Self::get_baseline_value(&baseline_json[arch][vps][underhill_process]["Pss"]); let cur_pss = self[underhill_process].smaps_rollup["Pss"]; - let baseline_pss_anon = Self::get_baseline_value( - &self.baseline_json[arch][vps][underhill_process]["Pss_Anon"], - ); + let baseline_pss_anon = + Self::get_baseline_value(&baseline_json[arch][vps][underhill_process]["Pss_Anon"]); let cur_pss_anon = self[underhill_process].smaps_rollup["Pss_Anon"]; assert!( @@ -206,9 +200,9 @@ impl MemStat { } let baseline_reservation = - Self::get_baseline_value(&self.baseline_json[arch][vps]["reservation"]); + Self::get_baseline_value(&baseline_json[arch][vps]["reservation"]); let cur_reservation = - self.baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; + baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; assert!( baseline_reservation >= cur_reservation, "baseline reservation is less than current reservation: {} < {}", @@ -216,7 +210,7 @@ impl MemStat { cur_reservation ); - true + Ok(()) } fn parse_memfile( @@ -239,7 +233,7 @@ impl MemStat { .parse::() .unwrap_or_else(|_| { panic!( - "value column {} in line {} is expected to be a parsable u64", + "value column {} in line {} is expected to be a parsable u64 integer", value_col, line ) }); @@ -248,7 +242,7 @@ impl MemStat { parsed_data } - fn parse_statm(raw: String) -> HashMap { + fn parse_statm(raw_statm_data: String) -> HashMap { let statm_fields = [ "vm_size", "vm_rss", @@ -258,7 +252,8 @@ impl MemStat { "data", "dirty_pages", ]; - raw.split_whitespace() + raw_statm_data + .split_whitespace() .enumerate() .map(|(index, value)| { ( @@ -274,7 +269,7 @@ impl MemStat { .to_string(), value .parse::() - .expect("all items in statm file are expected to be parsable u64 numbers"), + .expect("all items in statm file are expected to be parsable u64 integers"), ) }) .collect::>() @@ -282,10 +277,10 @@ impl MemStat { fn get_baseline_value(baseline_json: &Value) -> u64 { baseline_json["base"].as_u64().unwrap_or_else(|| { - panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") + panic!("all values in the memstat_baseline.json file are expected to be parsable u64 integers") }) + baseline_json["threshold"].as_u64().unwrap_or_else(|| { - panic!("all values in the memstat_baseline.json file are expected to be parsable u64 numbers") + panic!("all values in the memstat_baseline.json file are expected to be parsable u64 integers") }) } } @@ -343,7 +338,7 @@ pub async fn idle_test( tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_teardown().await?; - assert!(memstat.compare_to_baseline(arch, &format!("{}vp", vps))); + memstat.compare_to_baseline(arch, &format!("{}vp", vps))?; Ok(()) } From 6ce67eeae1b9a40b5d67967843d9684e078b6e52 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 25 Sep 2025 18:24:11 +0000 Subject: [PATCH 36/57] restricting memstat module to the current crate --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 762e917efc..2962146eec 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -34,7 +34,7 @@ use vmm_test_macros::vmm_test_no_agent; pub(crate) mod openhcl_servicing; // Memory Validation tests. -pub mod memstat; +pub(crate) mod memstat; /// Boot through the UEFI firmware, it will shut itself down after booting. #[vmm_test_no_agent( From 29f48dd611a1a0af0dc582c34d17e9beaaed7866 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 26 Sep 2025 18:23:03 +0000 Subject: [PATCH 37/57] addressing feedback --- .../tests/tests/multiarch/memstat.rs | 151 ++++++++++++------ 1 file changed, 100 insertions(+), 51 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index c29bb44570..9f8c7d5881 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -3,32 +3,53 @@ //! Memory Validation for VMM Tests +use petri::IsolationType; use petri::MemoryConfig; use petri::PetriVmBuilder; use petri::PetriVmmBackend; use petri::ProcessorTopology; use petri::ShutdownKind; +use petri_artifacts_common::tags::MachineArch; use pipette_client::PipetteClient; use pipette_client::cmd; use serde::Serialize; use serde_json::Value; -use serde_json::from_reader; +use serde_json::from_str; use serde_json::to_string; use std::collections::HashMap; -use std::env::current_dir; -use std::fs::File; use std::ops::Index; use std::ops::IndexMut; -use std::path::Path; use std::time::Duration; +#[repr(u32)] +pub enum TestVPCount { + SmallVPCount = 2, + LargeVPCountGP = 32, + LargeVPCount = 64, +} + +#[repr(u64)] +pub enum WaitPeriodSec { + ShortWait = 10, + LongWait = 15, +} + /// PerProcessMemstat struct collects statistics from a single process relevant to memory validation #[derive(Serialize, Clone, Default)] pub struct PerProcessMemstat { /// HashMap generated from the contents of the /proc/{process ID}/smaps_rollup file for an OpenHCL process + /// sample output from /proc/{process ID}/smaps_rollup: + /// + /// 55aa6c4b7000-7fffa7f9a000 ---p 00000000 00:00 0 [rollup] + /// Rss: 13300 kB + /// Pss: 5707 kB + /// Pss_Anon: 3608 kB pub smaps_rollup: HashMap, /// HashMap generated from the contents of the /proc/{process ID}/statm file for an OpenHCL process + /// sample output from /proc/{process ID}/statm: + /// + /// 5480 3325 2423 11 0 756 0 pub statm: HashMap, } @@ -36,9 +57,25 @@ pub struct PerProcessMemstat { #[derive(Serialize, Clone, Default)] pub struct MemStat { /// meminfo is a HashMap generated from the contents of the /proc/meminfo file + /// sample content of /proc/meminfo: + /// + /// MemTotal: 65820456 kB + /// MemFree: 43453176 kB + /// MemAvailable: 44322124 kB pub meminfo: HashMap, /// total_free_memory_per_zone is an integer calculated by aggregating the free memory from each CPU zone in the /proc/zoneinfo file + /// sample content of /proc/zoneinfo: + /// + /// Node 0, zone DMA + /// per-node stats + /// ... + /// nr_free_pages 5013074 + /// nr_zone_inactive_anon 0 + /// ... + /// cpu: 0 + /// count: 10 + /// high: 14 pub total_free_memory_per_zone: u64, /// underhill_init corresponds to the memory usage statistics for the underhill-init process @@ -49,6 +86,9 @@ pub struct MemStat { /// underhill_vm corresponds to the memory usage statistics for the underhill-vm process pub underhill_vm: PerProcessMemstat, + + /// baseline data to compare test results against + baseline_json: Value, } impl MemStat { @@ -59,10 +99,13 @@ impl MemStat { sh.read_file("/proc/meminfo") .await .expect("VTL2 should have meminfo file"), - 0, - 0, - 1, + 0, // meminfo data starts at the first line of the /proc/meminfo file + 0, // first column is the statistic (ie. MemFree) + 1, // second column is the value in kB ); + + // total_free_memory_per_zone collects the free memory pages for each numa node and the number of free pages for each + // CPU zone to get the total free memory pages. This value is multiplied by four to convert to kB let total_free_memory_per_zone = sh .read_file("/proc/zoneinfo") .await @@ -84,13 +127,15 @@ impl MemStat { .read() .await .expect("'ps' command is expected to succeed and produce output"), - 1, - 3, - 0, + 1, // Skipping the first row since it contains the ps output headers + 3, // process name is the fourth column (index 3) of ps output + 0, // process ID is teh first column (index 0) of ps output ) .iter() .filter(|(key, _)| key.contains("underhill") || key.contains("openvmm")) { + // process names may contain unecessary additional characters (ie. /bin/openvmm_hcl or {underhill-vm}) + // the following cleans these strings to be more consistent and readable let process_name = key .split('/') .next_back() @@ -109,9 +154,9 @@ impl MemStat { process_name ) }), - 1, - 0, - 1, + 1, // smaps data starts after the first line + 0, // the first column in smaps is the metric (ie. Pss_Anon) + 1, // the second column is the corresponding value in kB ), statm: Self::parse_statm( sh.read_file(&format!("/proc/{}/statm", value)) @@ -127,6 +172,8 @@ impl MemStat { ); } + let baseline_json = from_str(include_str!("../../../test_data/memstat_baseline.json")).expect("the contents of memstat_baseline.json are expected to be parsable into a json object"); + Self { meminfo, total_free_memory_per_zone, @@ -142,30 +189,13 @@ impl MemStat { .get("underhill_vm") .expect("per_process_data should have underhill_vm data if the process exists") .clone(), + baseline_json, } } /// Compares current statistics against baseline pub fn compare_to_baseline(self, arch: &str, vps: &str) -> anyhow::Result<()> { - let path_str = format!( - "{}/test_data/memstat_baseline.json", - current_dir() - .expect("current_dir is expected to return a path string") - .to_str() - .unwrap() - ); - let baseline_json = from_reader::( - File::open(Path::new(&path_str)) - .unwrap_or_else(|_| panic!("{} file not found", path_str)), - ) - .unwrap_or_else(|_| { - panic!( - "memstat json is expected to exist within the file {}", - path_str - ) - }); - - let baseline_usage = Self::get_baseline_value(&baseline_json[arch][vps]["usage"]); + let baseline_usage = Self::get_upper_limit_value(&self.baseline_json[arch][vps]["usage"]); let cur_usage = self.meminfo["MemTotal"] - self.total_free_memory_per_zone; assert!( baseline_usage >= cur_usage, @@ -175,12 +205,14 @@ impl MemStat { ); for underhill_process in ["underhill_init", "openvmm_hcl", "underhill_vm"] { - let baseline_pss = - Self::get_baseline_value(&baseline_json[arch][vps][underhill_process]["Pss"]); + let baseline_pss = Self::get_upper_limit_value( + &self.baseline_json[arch][vps][underhill_process]["Pss"], + ); let cur_pss = self[underhill_process].smaps_rollup["Pss"]; - let baseline_pss_anon = - Self::get_baseline_value(&baseline_json[arch][vps][underhill_process]["Pss_Anon"]); + let baseline_pss_anon = Self::get_upper_limit_value( + &self.baseline_json[arch][vps][underhill_process]["Pss_Anon"], + ); let cur_pss_anon = self[underhill_process].smaps_rollup["Pss_Anon"]; assert!( @@ -200,9 +232,9 @@ impl MemStat { } let baseline_reservation = - Self::get_baseline_value(&baseline_json[arch][vps]["reservation"]); + Self::get_upper_limit_value(&self.baseline_json[arch][vps]["reservation"]); let cur_reservation = - baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; + self.baseline_json[arch]["vtl2_total"].as_u64().unwrap() - self.meminfo["MemTotal"]; assert!( baseline_reservation >= cur_reservation, "baseline reservation is less than current reservation: {} < {}", @@ -243,6 +275,7 @@ impl MemStat { } fn parse_statm(raw_statm_data: String) -> HashMap { + // statm output consists of seven numbers split by spaces (ie. 5480 3325 ...) representing the following fields (in order): let statm_fields = [ "vm_size", "vm_rss", @@ -275,13 +308,16 @@ impl MemStat { .collect::>() } - fn get_baseline_value(baseline_json: &Value) -> u64 { - baseline_json["base"].as_u64().unwrap_or_else(|| { - panic!("all values in the memstat_baseline.json file are expected to be parsable u64 integers") - }) + - baseline_json["threshold"].as_u64().unwrap_or_else(|| { - panic!("all values in the memstat_baseline.json file are expected to be parsable u64 integers") - }) + fn get_upper_limit_value(baseline_metric_json: &Value) -> u64 { + const PANIC_MSG: &str = + "all values in the memstat_baseline.json file are expected to be parsable u64 integers"; + + baseline_metric_json["base"] + .as_u64() + .unwrap_or_else(|| panic!("{}", PANIC_MSG)) + + baseline_metric_json["threshold"] + .as_u64() + .unwrap_or_else(|| panic!("{}", PANIC_MSG)) } } @@ -292,7 +328,7 @@ impl Index<&'_ str> for MemStat { "underhill_init" => &self.underhill_init, "openvmm_hcl" => &self.openvmm_hcl, "underhill_vm" => &self.underhill_vm, - _ => panic!("unknown field: {}", s), + _ => panic!("memstat field {} does not exist or is not indexible", s), } } } @@ -303,16 +339,29 @@ impl IndexMut<&'_ str> for MemStat { "underhill_init" => &mut self.underhill_init, "openvmm_hcl" => &mut self.openvmm_hcl, "underhill_vm" => &mut self.underhill_vm, - _ => panic!("unknown field: {}", s), + _ => panic!("memstat field {} does not exist or is not indexible", s), } } } +pub fn get_arch_str(isolation_type: Option, machine_arch: MachineArch) -> String { + isolation_type + .map(|isolation_type| match isolation_type { + IsolationType::Vbs => "vbs-x64", + IsolationType::Snp => "amd-snp", + IsolationType::Tdx => "intel-tdx", + }) + .unwrap_or_else(|| match machine_arch { + MachineArch::Aarch64 => "aarch64", + MachineArch::X86_64 => "gp-x64", + }) + .to_string() +} + pub async fn idle_test( config: PetriVmBuilder, - arch: &str, + arch_config: &str, vps: u32, - vm_memory_gb: u64, wait_time_sec: u64, ) -> anyhow::Result<()> { let mut vm = config @@ -324,7 +373,7 @@ pub async fn idle_test( }) .with_memory({ MemoryConfig { - startup_bytes: vm_memory_gb * (1024 * 1024 * 1024), + startup_bytes: 16 * (1024 * 1024 * 1024), dynamic_memory_range: None, } }) @@ -338,7 +387,7 @@ pub async fn idle_test( tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_teardown().await?; - memstat.compare_to_baseline(arch, &format!("{}vp", vps))?; + memstat.compare_to_baseline(arch_config, &format!("{}vp", vps))?; Ok(()) } From d1fecbc375f73bf74c88e5ba3bf158b9d5e50706 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 26 Sep 2025 18:23:52 +0000 Subject: [PATCH 38/57] addressing feedback --- .config/nextest.toml | 5 - petri/src/vm/mod.rs | 10 ++ .../vmm_tests/test_data/memstat_baseline.json | 2 +- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 108 ++++++------------ 4 files changed, 49 insertions(+), 76 deletions(-) diff --git a/.config/nextest.toml b/.config/nextest.toml index 953e7b0cd8..57578a5558 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -45,11 +45,6 @@ slow-timeout = { period = "30s", terminate-after = 2 } filter = 'package(~vmm_tests) & test(reboot)' slow-timeout = { period = "5m", terminate-after = 2 } -# Memory validation tests may need extended timeout -[[profile.ci.overrides]] -filter = 'package(~vmm_tests) & test(memory_validation)' -slow-timeout = { period = "5m", terminate-after = 2 } - [[profile.ci.overrides]] # use fuzzy-matching for the package() to allow out-of-tree tests to use the # same profile diff --git a/petri/src/vm/mod.rs b/petri/src/vm/mod.rs index 25ff95163a..7a54cbbc64 100644 --- a/petri/src/vm/mod.rs +++ b/petri/src/vm/mod.rs @@ -643,6 +643,16 @@ impl PetriVmBuilder { self.config.firmware.is_openhcl() } + /// Get the isolation type of the VM + pub fn isolation(&self) -> Option { + self.config.firmware.isolation() + } + + /// Get the machine architecture + pub fn arch(&self) -> MachineArch { + self.config.arch + } + /// Get the backend-specific config builder pub fn modify_backend( mut self, diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 21d6d907af..5b213f13d8 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -82,7 +82,7 @@ } } }, - "intel-x64": { + "gp-x64": { "vtl2_total": 524288, "2vp": { "usage": { diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 2962146eec..6512e6c949 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -7,6 +7,10 @@ use anyhow::Context; use futures::StreamExt; use hyperv_ic_resources::kvp::KvpRpc; use jiff::SignedDuration; +use memstat::TestVPCount; +use memstat::WaitPeriodSec; +use memstat::get_arch_str; +use memstat::idle_test; use mesh::rpc::RpcSend; use petri::MemoryConfig; use petri::PetriGuestStateLifetime; @@ -834,82 +838,46 @@ async fn validate_mnf_usage_in_guest( Ok(()) } -#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_tdx_2_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test::(config, "intel-tdx", 2, 16, 10).await?; - - Ok(()) -} - -#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_tdx_64_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test::(config, "intel-tdx", 64, 16, 15).await?; - - Ok(()) -} - -#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_snp_2_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test(config, "amd-snp", 2, 16, 10).await?; - - Ok(()) -} - -#[vmm_test_no_agent(hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_snp_64_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test(config, "amd-snp", 64, 16, 15).await?; - - Ok(()) -} - -#[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_x64_2_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test(config, "intel-x64", 2, 16, 10).await?; - - Ok(()) -} - -#[vmm_test(hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)))] -#[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_x64_32_proc_no_agent( - config: PetriVmBuilder, -) -> anyhow::Result<()> { - memstat::idle_test(config, "intel-x64", 32, 16, 10).await?; - - Ok(()) -} - -#[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] +#[vmm_test_no_agent( + hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), +)] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_arm_2_proc_no_agent( +async fn memory_validation_small( config: PetriVmBuilder, ) -> anyhow::Result<()> { - memstat::idle_test(config, "aarch64", 2, 16, 10).await?; - - Ok(()) + let arch_str = get_arch_str(config.isolation(), config.arch()); + idle_test( + config, + &arch_str, + TestVPCount::SmallVPCount as u32, + WaitPeriodSec::ShortWait as u64, + ) + .await } -#[vmm_test(hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)))] +#[vmm_test_no_agent( + hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), +)] #[cfg_attr(not(windows), expect(dead_code))] -async fn memory_validation_arm_64_proc_no_agent( +async fn memory_validation_large( config: PetriVmBuilder, ) -> anyhow::Result<()> { - memstat::idle_test(config, "aarch64", 64, 16, 15).await?; - - Ok(()) + let arch_str = get_arch_str(config.isolation(), config.arch()); + idle_test( + config, + &arch_str, + if arch_str.contains("x64") { + TestVPCount::LargeVPCountGP as u32 + } else { + TestVPCount::LargeVPCount as u32 + }, + WaitPeriodSec::LongWait as u64, + ) + .await } From 7f44b0749822c1806577f06e6fd024c1ba2c0550 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 26 Sep 2025 23:09:49 +0000 Subject: [PATCH 39/57] using pal_async for test wait --- vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 9f8c7d5881..a69d421604 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -3,6 +3,8 @@ //! Memory Validation for VMM Tests +use pal_async::DefaultPool; +use pal_async::timer::PolledTimer; use petri::IsolationType; use petri::MemoryConfig; use petri::PetriVmBuilder; @@ -382,7 +384,12 @@ pub async fn idle_test( let vtl2_agent = vm.wait_for_vtl2_agent().await?; // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results - std::thread::sleep(Duration::from_secs(wait_time_sec)); + DefaultPool::run_with(async |driver| { + PolledTimer::new(&driver) + .sleep(Duration::from_secs(wait_time_sec)) + .await; + }); + let memstat = MemStat::new(&vtl2_agent).await; tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; From e82e31720c0d00c7a178d9a2aec674e44bc4d095 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 26 Sep 2025 23:36:51 +0000 Subject: [PATCH 40/57] refactoring idle test parameters --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 10 +++++----- vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 6512e6c949..c73c4674c9 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -852,8 +852,8 @@ async fn memory_validation_small( idle_test( config, &arch_str, - TestVPCount::SmallVPCount as u32, - WaitPeriodSec::ShortWait as u64, + TestVPCount::SmallVPCount, + WaitPeriodSec::ShortWait, ) .await } @@ -873,11 +873,11 @@ async fn memory_validation_large( config, &arch_str, if arch_str.contains("x64") { - TestVPCount::LargeVPCountGP as u32 + TestVPCount::LargeVPCountGP } else { - TestVPCount::LargeVPCount as u32 + TestVPCount::LargeVPCount }, - WaitPeriodSec::LongWait as u64, + WaitPeriodSec::LongWait, ) .await } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index a69d421604..543795d3de 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -363,13 +363,14 @@ pub fn get_arch_str(isolation_type: Option, machine_arch: Machine pub async fn idle_test( config: PetriVmBuilder, arch_config: &str, - vps: u32, - wait_time_sec: u64, + vps: TestVPCount, + wait_time_sec: WaitPeriodSec, ) -> anyhow::Result<()> { + let vp_count = vps as u32; let mut vm = config .with_processor_topology({ ProcessorTopology { - vp_count: vps, + vp_count, ..Default::default() } }) @@ -386,7 +387,7 @@ pub async fn idle_test( // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results DefaultPool::run_with(async |driver| { PolledTimer::new(&driver) - .sleep(Duration::from_secs(wait_time_sec)) + .sleep(Duration::from_secs(wait_time_sec as u64)) .await; }); @@ -394,7 +395,7 @@ pub async fn idle_test( tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_teardown().await?; - memstat.compare_to_baseline(arch_config, &format!("{}vp", vps))?; + memstat.compare_to_baseline(arch_config, &format!("{}vp", vp_count))?; Ok(()) } From d44b4d2c6694eef4ec65f9a6848fbe9245db3564 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 29 Sep 2025 21:24:16 +0000 Subject: [PATCH 41/57] addressing feedback --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 25 ++--------------- .../tests/tests/multiarch/memstat.rs | 28 +++++++++++++------ 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index c73c4674c9..481cece837 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -9,7 +9,6 @@ use hyperv_ic_resources::kvp::KvpRpc; use jiff::SignedDuration; use memstat::TestVPCount; use memstat::WaitPeriodSec; -use memstat::get_arch_str; use memstat::idle_test; use mesh::rpc::RpcSend; use petri::MemoryConfig; @@ -841,21 +840,14 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), )] #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let arch_str = get_arch_str(config.isolation(), config.arch()); - idle_test( - config, - &arch_str, - TestVPCount::SmallVPCount, - WaitPeriodSec::ShortWait, - ) - .await + idle_test(config, TestVPCount::SmallVPCount, WaitPeriodSec::ShortWait).await } #[vmm_test_no_agent( @@ -868,16 +860,5 @@ async fn memory_validation_small( async fn memory_validation_large( config: PetriVmBuilder, ) -> anyhow::Result<()> { - let arch_str = get_arch_str(config.isolation(), config.arch()); - idle_test( - config, - &arch_str, - if arch_str.contains("x64") { - TestVPCount::LargeVPCountGP - } else { - TestVPCount::LargeVPCount - }, - WaitPeriodSec::LongWait, - ) - .await + idle_test(config, TestVPCount::LargeVPCount, WaitPeriodSec::LongWait).await } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 543795d3de..a8d8d37622 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -25,9 +25,8 @@ use std::time::Duration; #[repr(u32)] pub enum TestVPCount { - SmallVPCount = 2, - LargeVPCountGP = 32, - LargeVPCount = 64, + SmallVPCount, + LargeVPCount, } #[repr(u64)] @@ -38,7 +37,7 @@ pub enum WaitPeriodSec { /// PerProcessMemstat struct collects statistics from a single process relevant to memory validation #[derive(Serialize, Clone, Default)] -pub struct PerProcessMemstat { +struct PerProcessMemstat { /// HashMap generated from the contents of the /proc/{process ID}/smaps_rollup file for an OpenHCL process /// sample output from /proc/{process ID}/smaps_rollup: /// @@ -57,7 +56,7 @@ pub struct PerProcessMemstat { /// MemStat struct collects all relevant memory usage data from VTL2 in a VM #[derive(Serialize, Clone, Default)] -pub struct MemStat { +struct MemStat { /// meminfo is a HashMap generated from the contents of the /proc/meminfo file /// sample content of /proc/meminfo: /// @@ -346,7 +345,7 @@ impl IndexMut<&'_ str> for MemStat { } } -pub fn get_arch_str(isolation_type: Option, machine_arch: MachineArch) -> String { +fn get_arch_str(isolation_type: Option, machine_arch: MachineArch) -> String { isolation_type .map(|isolation_type| match isolation_type { IsolationType::Vbs => "vbs-x64", @@ -362,11 +361,22 @@ pub fn get_arch_str(isolation_type: Option, machine_arch: Machine pub async fn idle_test( config: PetriVmBuilder, - arch_config: &str, vps: TestVPCount, wait_time_sec: WaitPeriodSec, ) -> anyhow::Result<()> { - let vp_count = vps as u32; + let isolation_type = config.isolation(); + let machine_arch = config.arch(); + let arch_str = get_arch_str(isolation_type, machine_arch); + let vp_count = match vps { + TestVPCount::SmallVPCount => 2, + TestVPCount::LargeVPCount => { + if arch_str.contains("x64") { + 32 + } else { + 64 + } + } + }; let mut vm = config .with_processor_topology({ ProcessorTopology { @@ -395,7 +405,7 @@ pub async fn idle_test( tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); vm.send_enlightened_shutdown(ShutdownKind::Shutdown).await?; vm.wait_for_teardown().await?; - memstat.compare_to_baseline(arch_config, &format!("{}vp", vp_count))?; + memstat.compare_to_baseline(&arch_str, &format!("{}vp", vp_count))?; Ok(()) } From 5b4cc859b87c491c9c5a27dfb1a99947c8662d25 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Mon, 29 Sep 2025 22:06:12 +0000 Subject: [PATCH 42/57] making module private and reverting GP test to 2022 --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 481cece837..d6a373bdb5 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -37,7 +37,7 @@ use vmm_test_macros::vmm_test_no_agent; pub(crate) mod openhcl_servicing; // Memory Validation tests. -pub(crate) mod memstat; +mod memstat; /// Boot through the UEFI firmware, it will shut itself down after booting. #[vmm_test_no_agent( @@ -840,7 +840,7 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), )] #[cfg_attr(not(windows), expect(dead_code))] From c770609815628560674cec23c28f59995c38cfc4 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Tue, 30 Sep 2025 14:55:31 +0000 Subject: [PATCH 43/57] adding datacenter 2025 test artifact to GP tests --- flowey/flowey_hvlite/src/pipelines/checkin_gates.rs | 1 + vmm_tests/vmm_tests/tests/tests/multiarch.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flowey/flowey_hvlite/src/pipelines/checkin_gates.rs b/flowey/flowey_hvlite/src/pipelines/checkin_gates.rs index 66391b2c07..08dcc6f23d 100644 --- a/flowey/flowey_hvlite/src/pipelines/checkin_gates.rs +++ b/flowey/flowey_hvlite/src/pipelines/checkin_gates.rs @@ -896,6 +896,7 @@ impl IntoPipeline for CheckinGatesCli { KnownTestArtifacts::FreeBsd13_2X64Iso, KnownTestArtifacts::Gen1WindowsDataCenterCore2022X64Vhd, KnownTestArtifacts::Gen2WindowsDataCenterCore2022X64Vhd, + KnownTestArtifacts::Gen2WindowsDataCenterCore2025X64Vhd, KnownTestArtifacts::Ubuntu2204ServerX64Vhd, KnownTestArtifacts::VmgsWithBootEntry, ]; diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index d6a373bdb5..4bb1d5b025 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -840,7 +840,7 @@ async fn validate_mnf_usage_in_guest( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), )] #[cfg_attr(not(windows), expect(dead_code))] @@ -853,7 +853,7 @@ async fn memory_validation_small( #[vmm_test_no_agent( hyperv_openhcl_uefi_x64[tdx](vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_x64[snp](vhd(windows_datacenter_core_2025_x64)), - hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2022_x64)), + hyperv_openhcl_uefi_x64(vhd(windows_datacenter_core_2025_x64)), hyperv_openhcl_uefi_aarch64(vhd(ubuntu_2404_server_aarch64)), )] #[cfg_attr(not(windows), expect(dead_code))] From 7a99686c4e6fe56409445d5fc003ccb578f938a6 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 15:33:29 +0000 Subject: [PATCH 44/57] updating baselines --- .../vmm_tests/test_data/memstat_baseline.json | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 5b213f13d8..a833b14b6b 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -3,7 +3,7 @@ "vtl2_total": 524288, "2vp": { "usage": { - "base": 59509, + "base": 59510, "threshold": 150 }, "reservation": { @@ -12,38 +12,38 @@ }, "underhill_init": { "Pss": { - "base": 1176, + "base": 1171, "threshold": 150 }, "Pss_Anon": { - "base": 295, + "base": 290, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 10711, + "base": 10775, "threshold": 150 }, "Pss_Anon": { - "base": 1356, + "base": 1388, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 21573, + "base": 21567, "threshold": 150 }, "Pss_Anon": { - "base": 4772, + "base": 4734, "threshold": 150 } } }, "64vp": { "usage": { - "base": 119582, + "base": 118732, "threshold": 1000 }, "reservation": { @@ -52,32 +52,32 @@ }, "underhill_init": { "Pss": { - "base": 1172, + "base": 1173, "threshold": 150 }, "Pss_Anon": { - "base": 291, + "base": 3760, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 10723, + "base": 10757, "threshold": 150 }, "Pss_Anon": { - "base": 1368, + "base": 1370, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 36770, - "threshold": 1500 + "base": 36105, + "threshold": 1000 }, "Pss_Anon": { - "base": 18150, - "threshold": 1500 + "base": 16976, + "threshold": 1000 } } } @@ -86,81 +86,81 @@ "vtl2_total": 524288, "2vp": { "usage": { - "base": 231586, + "base": 231334, "threshold": 150 }, "reservation": { - "base": 17660, + "base": 17664, "threshold": 0 }, "underhill_init": { "Pss": { - "base": 4551, + "base": 4553, "threshold": 150 }, "Pss_Anon": { - "base": 3760, + "base": 3767, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14888, - "threshold": 300 + "base": 15097, + "threshold": 150 }, "Pss_Anon": { - "base": 4812, + "base": 4824, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 29613, + "base": 29054, "threshold": 150 }, "Pss_Anon": { - "base": 9341, - "threshold": 150 + "base": 8951, + "threshold": 250 } } }, "32vp": { "usage": { - "base": 258715, - "threshold": 1500 + "base": 251791, + "threshold": 1000 }, "reservation": { - "base": 24664, + "base": 24660, "threshold": 0 }, "underhill_init": { "Pss": { - "base": 4519, + "base": 4543, "threshold": 150 }, "Pss_Anon": { - "base": 3761, + "base": 3767, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14819, + "base": 15170, "threshold": 150 }, "Pss_Anon": { - "base": 4810, + "base": 4811, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 40373, - "threshold": 1500 + "base": 37262, + "threshold": 1000 }, "Pss_Anon": { - "base": 19026, - "threshold": 1500 + "base": 16628, + "threshold": 150 } } } @@ -252,8 +252,8 @@ "vtl2_total": 655360, "2vp": { "usage": { - "base": 231051, - "threshold": 200 + "base": 231175, + "threshold": 150 }, "reservation": { "base": 28952, @@ -261,38 +261,38 @@ }, "underhill_init": { "Pss": { - "base": 4539, + "base": 4525, "threshold": 150 }, "Pss_Anon": { - "base": 3756, + "base": 3760, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14834, - "threshold": 250 + "base": 14940, + "threshold": 150 }, "Pss_Anon": { - "base": 4786, + "base": 4774, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 29377, - "threshold": 250 + "base": 29554, + "threshold": 150 }, "Pss_Anon": { - "base": 9259, - "threshold": 250 + "base": 9312, + "threshold": 150 } } }, "64vp": { "usage": { - "base": 306378, + "base": 307455, "threshold": 1000 }, "reservation": { @@ -301,32 +301,32 @@ }, "underhill_init": { "Pss": { - "base": 4516, + "base": 4530, "threshold": 200 }, "Pss_Anon": { - "base": 3753, + "base": 3755, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14763, + "base": 14933, "threshold": 250 }, "Pss_Anon": { - "base": 4788, + "base": 4798, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 57559, - "threshold": 600 + "base": 58375, + "threshold": 1000 }, "Pss_Anon": { - "base": 34949, - "threshold": 600 + "base": 35983, + "threshold": 1500 } } } @@ -335,8 +335,8 @@ "vtl2_total": 655360, "2vp": { "usage": { - "base": 233383, - "threshold": 200 + "base": 233704, + "threshold": 150 }, "reservation": { "base": 28884, @@ -344,39 +344,39 @@ }, "underhill_init": { "Pss": { - "base": 4527, + "base": 4516, "threshold": 150 }, "Pss_Anon": { - "base": 3759, + "base": 3760, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14720, - "threshold": 350 + "base": 15061, + "threshold": 150 }, "Pss_Anon": { - "base": 4781, + "base": 4799, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 31589, - "threshold": 250 + "base": 31812, + "threshold": 150 }, "Pss_Anon": { - "base": 11424, + "base": 11730, "threshold": 150 } } }, "64vp": { "usage": { - "base": 306304, - "threshold": 2000 + "base": 310880, + "threshold": 1000 }, "reservation": { "base": 42356, @@ -384,31 +384,31 @@ }, "underhill_init": { "Pss": { - "base": 4525, + "base": 4514, "threshold": 150 }, "Pss_Anon": { - "base": 3752, + "base": 3759, "threshold": 150 } }, "openvmm_hcl": { "Pss": { - "base": 14641, - "threshold": 200 + "base": 14992, + "threshold": 150 }, "Pss_Anon": { - "base": 4785, + "base": 4787, "threshold": 150 } }, "underhill_vm": { "Pss": { - "base": 54411, - "threshold": 1500 + "base": 57297, + "threshold": 1000 }, "Pss_Anon": { - "base": 31486, + "base": 34598, "threshold": 1000 } } From 3a587454d1964b1602c4b05843ee7f5492ec1ce2 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 17:25:19 +0000 Subject: [PATCH 45/57] updating baselines and removing unused data --- .../vmm_tests/test_data/memstat_baseline.json | 89 +------------------ 1 file changed, 3 insertions(+), 86 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index a833b14b6b..a233529b20 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -126,7 +126,7 @@ }, "32vp": { "usage": { - "base": 251791, + "base": 254748, "threshold": 1000 }, "reservation": { @@ -165,89 +165,6 @@ } } }, - "amd-x64": { - "vtl2_total": 524288, - "2vp": { - "usage": { - "base": 232497, - "threshold": 150 - }, - "reservation": { - "base": 17648, - "threshold": 0 - }, - "underhill_init": { - "Pss": { - "base": 4512, - "threshold": 150 - }, - "Pss_Anon": { - "base": 3757, - "threshold": 150 - } - }, - "openvmm_hcl": { - "Pss": { - "base": 14819, - "threshold": 400 - }, - "Pss_Anon": { - "base": 4805, - "threshold": 150 - } - }, - "underhill_vm": { - "Pss": { - "base": 30294, - "threshold": 1000 - }, - "Pss_Anon": { - "base": 9353, - "threshold": 150 - } - } - }, - "32vp": { - "usage": { - "base": 256143, - "threshold": 1750 - }, - "reservation": { - "base": 24648, - "threshold": 0 - }, - "underhill_init": { - "Pss": { - "base": 4523, - "threshold": 150 - }, - "Pss_Anon": { - "base": 3755, - "threshold": 150 - } - }, - "openvmm_hcl": { - "Pss": { - "base": 14870, - "threshold": 350 - }, - "Pss_Anon": { - "base": 4812, - "threshold": 150 - } - }, - "underhill_vm": { - "Pss": { - "base": 39306, - "threshold": 1000 - }, - "Pss_Anon": { - "base": 17508, - "threshold": 750 - } - } - } - }, "intel-tdx": { "vtl2_total": 655360, "2vp": { @@ -293,7 +210,7 @@ "64vp": { "usage": { "base": 307455, - "threshold": 1000 + "threshold": 1500 }, "reservation": { "base": 41676, @@ -322,7 +239,7 @@ "underhill_vm": { "Pss": { "base": 58375, - "threshold": 1000 + "threshold": 1500 }, "Pss_Anon": { "base": 35983, From 6c5cd9e86f9eeb2e1eadc38dba791ef1e6039a6d Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 20:07:11 +0000 Subject: [PATCH 46/57] updating baseline values --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index a233529b20..d6f149aba7 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -282,7 +282,7 @@ "underhill_vm": { "Pss": { "base": 31812, - "threshold": 150 + "threshold": 500 }, "Pss_Anon": { "base": 11730, From db40f961ced12a1990f3c98ee43fc13bd70d760c Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 22:37:18 +0000 Subject: [PATCH 47/57] updating baseline values --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index d6f149aba7..0ec4b6a643 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -87,7 +87,7 @@ "2vp": { "usage": { "base": 231334, - "threshold": 150 + "threshold": 500 }, "reservation": { "base": 17664, @@ -116,7 +116,7 @@ "underhill_vm": { "Pss": { "base": 29054, - "threshold": 150 + "threshold": 500 }, "Pss_Anon": { "base": 8951, From a772072e29a8bcdf30676e93ec1e83498ad3f93c Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 23:13:21 +0000 Subject: [PATCH 48/57] resolving clippy and unit test errors --- Cargo.lock | 1183 +++++++++++++++++++++++----------------------------- 1 file changed, 530 insertions(+), 653 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c385320d6a..c488701375 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.0.0" dependencies = [ "bitfield-struct 0.11.0", "open_enum", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -21,7 +21,7 @@ dependencies = [ "inspect", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] @@ -32,7 +32,7 @@ dependencies = [ "acpi_spec", "memory_range", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -42,15 +42,15 @@ dependencies = [ "bitfield-struct 0.11.0", "open_enum", "static_assertions", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] name = "addr2line" -version = "0.25.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -60,7 +60,7 @@ name = "address_filter" version = "0.0.0" dependencies = [ "inspect", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -78,6 +78,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anes" version = "0.1.6" @@ -101,9 +107,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" @@ -136,9 +142,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arbitrary" @@ -233,17 +239,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.76" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.7", "rustc-demangle", - "windows-link 0.2.0", + "windows-targets 0.52.6", ] [[package]] @@ -326,9 +332,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" [[package]] name = "bitvec" @@ -355,8 +361,8 @@ name = "block_crypto" version = "0.0.0" dependencies = [ "openssl", - "thiserror 2.0.17", - "windows 0.62.1", + "thiserror 2.0.16", + "windows 0.62.0", ] [[package]] @@ -447,8 +453,8 @@ name = "cache_topology" version = "0.0.0" dependencies = [ "fs-err", - "thiserror 2.0.17", - "windows-sys 0.61.1", + "thiserror 2.0.16", + "windows-sys 0.61.0", ] [[package]] @@ -479,11 +485,10 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.39" +version = "1.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" +checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" dependencies = [ - "find-msvc-tools", "jobserver", "libc", "shlex", @@ -520,7 +525,7 @@ dependencies = [ "pal_async", "power_resources", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "time", "tracelimit", "tracing", @@ -538,7 +543,7 @@ dependencies = [ "closeable_mutex", "parking_lot", "range_map_vec", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] @@ -561,7 +566,7 @@ dependencies = [ "parking_lot", "range_map_vec", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -593,7 +598,7 @@ dependencies = [ "pal_async", "pci_bus", "pci_core", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmcore", @@ -611,9 +616,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "num-traits", ] @@ -655,9 +660,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.48" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57" dependencies = [ "clap_builder", "clap_derive", @@ -665,9 +670,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.48" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41" dependencies = [ "anstream", "anstyle", @@ -678,9 +683,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.47" +version = "4.5.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" +checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -726,7 +731,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" dependencies = [ - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -770,9 +775,9 @@ dependencies = [ "resolv-conf", "smoltcp", "socket2", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -904,11 +909,11 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "crossterm_winapi", "document-features", "parking_lot", - "rustix 1.1.2", + "rustix 1.0.8", "winapi", ] @@ -939,13 +944,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.5.0" +version = "3.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3" +checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" dependencies = [ - "dispatch", "nix 0.30.1", - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -1016,9 +1020,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", ] @@ -1063,10 +1067,10 @@ dependencies = [ "mesh_rpc", "pal_async", "socket2", - "thiserror 2.0.17", + "thiserror 2.0.16", "unix_socket", "vmsocket", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -1147,7 +1151,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -1160,7 +1164,7 @@ dependencies = [ "inspect", "scsi_buffers", "stackfuture", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", "vmcore", ] @@ -1191,11 +1195,11 @@ dependencies = [ "inspect", "once_cell", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tokio", "vhd1_defs", "vm_resource", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1226,11 +1230,11 @@ dependencies = [ "pal_uring", "scsi_buffers", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "uevent", "vm_resource", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1246,7 +1250,7 @@ dependencies = [ "inspect", "pal_async", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", ] @@ -1284,7 +1288,7 @@ dependencies = [ "guestmem", "inspect", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", ] @@ -1299,7 +1303,7 @@ dependencies = [ "mesh", "pal_async", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "vmgs", "vmgs_broker", ] @@ -1318,7 +1322,7 @@ dependencies = [ "pal_async", "parking_lot", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "vm_resource", "vmcore", @@ -1348,7 +1352,7 @@ dependencies = [ "inspect", "parking_lot", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", ] @@ -1368,7 +1372,7 @@ dependencies = [ "inspect", "pal_async", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -1387,10 +1391,10 @@ dependencies = [ "pal_async", "scsi_buffers", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.16", "vhd1_defs", "vm_resource", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1408,7 +1412,7 @@ dependencies = [ "pal_async", "scsi_buffers", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", "winapi", ] @@ -1429,10 +1433,10 @@ dependencies = [ "parking_lot", "scsi_buffers", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1456,12 +1460,6 @@ dependencies = [ "vm_resource", ] -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - [[package]] name = "dissimilar" version = "1.0.10" @@ -1499,9 +1497,9 @@ dependencies = [ [[package]] name = "embed-resource" -version = "3.0.6" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a075fc573c64510038d7ee9abc7990635863992f83ebc52c8b433b8411a02e" +checksum = "4c6d81016d6c977deefb2ef8d8290da019e27cc26167e102185da528e6c0ab38" dependencies = [ "cc", "memchr", @@ -1604,12 +1602,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.14" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.60.2", ] [[package]] @@ -1700,7 +1698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix 1.1.2", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -1717,8 +1715,8 @@ dependencies = [ name = "fdt" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -1731,12 +1729,6 @@ dependencies = [ "windows 0.58.0", ] -[[package]] -name = "find-msvc-tools" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" - [[package]] name = "firmware_pcat" version = "0.0.0" @@ -1751,12 +1743,12 @@ dependencies = [ "mesh", "open_enum", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_topology", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1779,7 +1771,7 @@ dependencies = [ "openssl", "pal_async", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "time", "tracelimit", "tracing", @@ -1790,7 +1782,7 @@ dependencies = [ "vmcore", "watchdog_core", "wchar", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -1799,7 +1791,7 @@ version = "0.0.0" dependencies = [ "guid", "mesh_protobuf", - "thiserror 2.0.17", + "thiserror 2.0.16", "uefi_specs", ] @@ -1838,7 +1830,7 @@ dependencies = [ "mesh", "open_enum", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmcore", @@ -1889,7 +1881,7 @@ dependencies = [ "fs-err", "log", "parking_lot", - "petgraph 0.8.3", + "petgraph 0.8.2", "schema_ado_yaml", "serde", "serde_json", @@ -2013,9 +2005,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "3.1.2" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f150ffc8782f35521cec2b23727707cb4045706ba3c854e86bef66b3a8cdbd" +checksum = "88d7be93788013f265201256d58f04936a8079ad5dc898743aa20525f503b683" dependencies = [ "autocfg", ] @@ -2044,9 +2036,9 @@ dependencies = [ "parking_lot", "tempfile", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2207,7 +2199,7 @@ dependencies = [ "ucs2 0.0.0", "uefi_nvram_specvars", "xtask_fuzz", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2335,7 +2327,7 @@ dependencies = [ "vmbus_channel", "vmbus_ring", "xtask_fuzz", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2404,11 +2396,11 @@ dependencies = [ "pci_resources", "slab", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2419,7 +2411,7 @@ dependencies = [ "guestmem", "inspect", "open_enum", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2446,16 +2438,15 @@ dependencies = [ [[package]] name = "generator" -version = "0.8.7" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" +checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" dependencies = [ - "cc", "cfg-if", "libc", "log", "rustversion", - "windows 0.61.3", + "windows 0.58.0", ] [[package]] @@ -2474,7 +2465,7 @@ version = "0.0.0" dependencies = [ "get_protocol", "guid", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2488,7 +2479,7 @@ dependencies = [ "serde_helpers", "serde_json", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2497,7 +2488,7 @@ version = "0.0.0" dependencies = [ "inspect", "mesh", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", "vmgs_resources", ] @@ -2522,14 +2513,14 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.7+wasi-0.2.4", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] name = "gimli" -version = "0.32.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2560,7 +2551,7 @@ dependencies = [ "crc", "nix 0.30.1", "serde", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -2618,7 +2609,7 @@ dependencies = [ "vmbus_async", "vmbus_channel", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2646,7 +2637,7 @@ dependencies = [ "serde_json", "sha2", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "video_core", @@ -2656,7 +2647,7 @@ dependencies = [ "vmbus_ring", "vmcore", "vmgs_resources", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2671,14 +2662,14 @@ dependencies = [ "serde", "serde_json", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vmbus_async", "vmbus_channel", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2703,7 +2694,7 @@ dependencies = [ "power_resources", "serde_json", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing_helpers", "underhill_config", @@ -2714,7 +2705,7 @@ dependencies = [ "vmbus_ring", "vmbus_user_channel", "vpci", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2745,8 +2736,8 @@ dependencies = [ "minircu", "pal_event", "sparse_mmap", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -2756,11 +2747,11 @@ dependencies = [ "getrandom 0.3.3", "inspect", "mesh_protobuf", - "thiserror 2.0.17", + "thiserror 2.0.16", "winapi", - "windows 0.62.1", - "windows-sys 0.61.1", - "zerocopy 0.8.27", + "windows 0.62.0", + "windows-sys 0.61.0", + "zerocopy 0.8.25", ] [[package]] @@ -2798,22 +2789,18 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ + "allocator-api2", + "equivalent", "foldhash", ] -[[package]] -name = "hashbrown" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" - [[package]] name = "hashlink" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.15.5", + "hashbrown", ] [[package]] @@ -2840,12 +2827,12 @@ dependencies = [ "sidecar_client", "signal-hook", "tdcall", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "user_driver", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2860,13 +2847,13 @@ dependencies = [ "open_enum", "pal_async", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "ucs2 0.0.0", "uefi_nvram_storage", "vmcore", "wchar", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2984,7 +2971,7 @@ dependencies = [ "vm_topology", "vmcore", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -2997,10 +2984,10 @@ dependencies = [ "open_enum", "sparse_mmap", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3019,7 +3006,7 @@ dependencies = [ "bitfield-struct 0.11.0", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3079,7 +3066,7 @@ dependencies = [ "sparse_mmap", "state_unit", "storvsp", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing_helpers", "uefi_nvram_storage", @@ -3106,7 +3093,7 @@ dependencies = [ "vmswitch", "vpci", "watchdog_core", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3126,7 +3113,7 @@ dependencies = [ "mesh", "mesh_worker", "net_backend_resources", - "thiserror 2.0.17", + "thiserror 2.0.16", "unix_socket", "virt", "virt_whp", @@ -3159,7 +3146,7 @@ dependencies = [ "anyhow", "fs-err", "mesh", - "object", + "object 0.37.3", "tracing", ] @@ -3214,9 +3201,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "bytes", "futures-channel", @@ -3249,14 +3236,14 @@ dependencies = [ "mesh", "pal_async", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", "vmbus_async", "vmbus_channel", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3269,7 +3256,7 @@ dependencies = [ "inspect", "mesh", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmbus_async", @@ -3278,7 +3265,7 @@ dependencies = [ "vmbus_relay_intercept_device", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3289,7 +3276,7 @@ dependencies = [ "guid", "jiff", "open_enum", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3319,8 +3306,8 @@ dependencies = [ "serde", "serde_helpers", "serde_json", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -3377,12 +3364,12 @@ dependencies = [ "static_assertions", "tempfile", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "tracing_helpers", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3424,9 +3411,9 @@ dependencies = [ "open-enum", "range_map_vec", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3438,7 +3425,7 @@ dependencies = [ "bitfield-struct 0.10.1", "open-enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3460,12 +3447,12 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing-subscriber", "vbs_defs", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3478,25 +3465,24 @@ dependencies = [ [[package]] name = "image" -version = "0.25.8" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529feb3e6769d234375c4cf1ee2ce713682b8e76538cb13f9fc23e1400a591e7" +checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", - "moxcms", "num-traits", "png", ] [[package]] name = "indexmap" -version = "2.11.4" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown", ] [[package]] @@ -3522,7 +3508,7 @@ dependencies = [ "mesh", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3562,7 +3548,7 @@ dependencies = [ "cfg-if", "inspect", "libc", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3579,7 +3565,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "cfg-if", "libc", ] @@ -3669,7 +3655,7 @@ dependencies = [ name = "kmsg" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3686,7 +3672,7 @@ dependencies = [ "pal", "parking_lot", "signal-hook", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3697,13 +3683,13 @@ checksum = "4b3c06ff73c7ce03e780887ec2389d62d2a2a9ddf471ab05c2ff69207cd3f3b4" [[package]] name = "landlock" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affe8b77dce5b172f8e290bd801b12832a77cd1942d1ea98259916e89d5829d6" +checksum = "b3d2ef408b88e913bfc6594f5e693d57676f6463ded7d8bf994175364320c706" dependencies = [ "enumflags2", "libc", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3717,9 +3703,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.176" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libfuzzer-sys" @@ -3749,11 +3735,11 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "libc", ] @@ -3782,18 +3768,18 @@ dependencies = [ [[package]] name = "linkme" -version = "0.3.35" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3283ed2d0e50c06dd8602e0ab319bb048b6325d0bba739db64ed8205179898" +checksum = "a1b1703c00b2a6a70738920544aa51652532cacddfec2e162d2e29eae01e665c" dependencies = [ "linkme-impl", ] [[package]] name = "linkme-impl" -version = "0.3.35" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5cec0ec4228b4853bb129c84dbf093a27e6c7a20526da046defc334a1b017f7" +checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" dependencies = [ "proc-macro2", "quote", @@ -3808,9 +3794,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "linux_net_bindings" @@ -3839,14 +3825,14 @@ dependencies = [ "igvm", "loader_defs", "memory_range", - "object", + "object 0.37.3", "open_enum", "page_table", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_topology", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3858,7 +3844,7 @@ dependencies = [ "inspect", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -3889,9 +3875,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "loom" @@ -3921,7 +3907,7 @@ dependencies = [ name = "lx" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -3940,8 +3926,8 @@ dependencies = [ "tracing", "widestring", "winapi", - "windows 0.62.1", - "zerocopy 0.8.27", + "windows 0.62.0", + "zerocopy 0.8.25", ] [[package]] @@ -3955,7 +3941,7 @@ name = "make_imc_hive" version = "0.0.0" dependencies = [ "anyhow", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -3981,7 +3967,7 @@ dependencies = [ "user_driver", "user_driver_emulated_mock", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4009,7 +3995,7 @@ dependencies = [ "bitvec", "serde", "serde-big-array", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -4037,7 +4023,7 @@ dependencies = [ "parking_lot", "slab", "sparse_mmap", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "virt", "vm_topology", @@ -4046,9 +4032,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" @@ -4065,7 +4051,7 @@ version = "0.0.0" dependencies = [ "inspect", "mesh_protobuf", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -4104,7 +4090,7 @@ dependencies = [ "pal_event", "parking_lot", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] @@ -4119,7 +4105,7 @@ dependencies = [ "parking_lot", "static_assertions", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] @@ -4148,9 +4134,9 @@ dependencies = [ "pal_async", "parking_lot", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4186,8 +4172,8 @@ dependencies = [ "prost-build", "prost-types", "socket2", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -4209,12 +4195,12 @@ dependencies = [ "parking_lot", "socket2", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing_helpers", "unicycle", "unix_socket", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4236,13 +4222,13 @@ dependencies = [ "prost-build", "prost-types", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tokio", "tracing", "unicycle", "unix_socket", "urlencoding", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4292,7 +4278,7 @@ dependencies = [ "cfg-if", "hvdef", "minimal_rt_build", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4309,7 +4295,7 @@ dependencies = [ "parking_lot", "test_with_tracing", "tracelimit", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -4354,16 +4340,6 @@ dependencies = [ "vm_resource", ] -[[package]] -name = "moxcms" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd32fa8935aeadb8a8a6b6b351e40225570a37c43de67690383d87ef170cd08" -dependencies = [ - "num-traits", - "pxfm", -] - [[package]] name = "ms-tpm-20-ref" version = "0.1.0" @@ -4380,27 +4356,27 @@ dependencies = [ [[package]] name = "mshv-bindings" -version = "0.6.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3951108da6323fcfc0168272fb690e17a1d437b89ccb818697556f28c7c1d24e" +checksum = "805cf329582f770f62cc612716a04c14815276ae266b6298375a672d3c5a5184" dependencies = [ "libc", "num_enum", "serde", "serde_derive", "vmm-sys-util", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] name = "mshv-ioctls" -version = "0.6.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125eee2b9a89f0643069dcde5f4ab4c718ecdc224d838185bb9ced03e53ff2c8" +checksum = "aefaab4c067cf5226a917227640d835327b25b71a8d465f815f74f490344e10a" dependencies = [ "libc", "mshv-bindings", - "thiserror 2.0.17", + "thiserror 2.0.16", "vmm-sys-util", ] @@ -4442,7 +4418,7 @@ dependencies = [ "net_backend_resources", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vm_topology", @@ -4455,7 +4431,7 @@ dependencies = [ "guid", "inspect", "mesh", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", ] @@ -4473,7 +4449,7 @@ dependencies = [ "net_backend_resources", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", ] @@ -4515,13 +4491,13 @@ dependencies = [ "pci_core", "safeatomic", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "user_driver", "user_driver_emulated_mock", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4555,7 +4531,7 @@ dependencies = [ "net_backend_resources", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", ] @@ -4588,7 +4564,7 @@ dependencies = [ "static_assertions", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -4597,7 +4573,7 @@ dependencies = [ "vmbus_core", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4636,7 +4612,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "cfg-if", "cfg_aliases", "libc", @@ -4767,14 +4743,14 @@ dependencies = [ "scsi_buffers", "slab", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "unicycle", "user_driver", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4783,7 +4759,7 @@ version = "0.0.0" dependencies = [ "disk_backend", "nvme_spec", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -4813,12 +4789,12 @@ dependencies = [ "slab", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "user_driver", "user_driver_emulated_mock", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4840,7 +4816,7 @@ dependencies = [ "mesh", "open_enum", "storage_string", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4866,14 +4842,23 @@ dependencies = [ "pci_resources", "scsi_buffers", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "unicycle", "user_driver", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", ] [[package]] @@ -4904,7 +4889,7 @@ dependencies = [ "pal_async", "socket2", "term", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing-subscriber", "unicycle", ] @@ -4966,7 +4951,7 @@ dependencies = [ "serde", "serde_json", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -4990,10 +4975,10 @@ dependencies = [ "sidecar_defs", "string_page_buf", "tdcall", - "thiserror 2.0.17", + "thiserror 2.0.16", "underhill_confidentiality", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -5020,7 +5005,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "cfg-if", "foreign-types", "libc", @@ -5048,9 +5033,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.5.3+3.5.4" +version = "300.5.2+3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6bad8cd0233b63971e232cc9c5e83039375b8586d2312f31fda85db8f888c2" +checksum = "d270b79e2926f5150189d475bc7e9d2c69f9c4697b185fa917d5a32b792d21b4" dependencies = [ "cc", ] @@ -5079,7 +5064,7 @@ dependencies = [ "libc", "openssl", "openssl-sys", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -5151,7 +5136,7 @@ dependencies = [ "storvsp_resources", "tempfile", "term", - "thiserror 2.0.17", + "thiserror 2.0.16", "tpm_resources", "tracelimit", "tracing", @@ -5291,7 +5276,7 @@ dependencies = [ "parking_lot", "safeatomic", "sparse_mmap", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "user_driver", "vmcore", @@ -5303,7 +5288,7 @@ version = "0.0.0" dependencies = [ "bitfield-struct 0.11.0", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -5320,11 +5305,11 @@ dependencies = [ "pal_event", "seccompiler", "socket2", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "widestring", "winapi", - "windows 0.62.1", + "windows 0.62.0", ] [[package]] @@ -5351,8 +5336,8 @@ dependencies = [ "unicycle", "unix_socket", "winapi", - "windows-sys 0.61.1", - "zerocopy 0.8.27", + "windows-sys 0.61.0", + "zerocopy 0.8.25", ] [[package]] @@ -5371,7 +5356,7 @@ dependencies = [ "getrandom 0.3.3", "libc", "mesh_protobuf", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -5484,11 +5469,11 @@ dependencies = [ "chipset_device", "inspect", "mesh", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -5502,11 +5487,11 @@ dependencies = [ "mesh", "open_enum", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -5542,12 +5527,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" dependencies = [ "fixedbitset 0.5.7", - "hashbrown 0.15.5", + "hashbrown", "indexmap", "serde", ] @@ -5614,7 +5599,7 @@ dependencies = [ "sparse_mmap", "storvsp_resources", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.16", "tpm_resources", "tracing", "tracing-subscriber", @@ -5744,7 +5729,7 @@ dependencies = [ "unicycle", "vmsocket", "windows-service", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -5810,11 +5795,11 @@ dependencies = [ [[package]] name = "png" -version = "0.18.0" +version = "0.17.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" dependencies = [ - "bitflags 2.9.4", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", @@ -5876,7 +5861,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -5968,38 +5953,29 @@ dependencies = [ [[package]] name = "ptr_meta" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9a0cf95a1196af61d4f1cbdab967179516d9a4a4312af1f31948f8f6224a79" +checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" dependencies = [ "ptr_meta_derive", ] [[package]] name = "ptr_meta_derive" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7347867d0a7e1208d93b46767be83e2b8f978c3dad35f775ac8d8847551d6fe1" +checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" dependencies = [ "proc-macro2", "quote", "syn 2.0.106", ] -[[package]] -name = "pxfm" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f9b339b02259ada5c0f4a389b7fb472f933aa17ce176fd2ad98f28bb401fde" -dependencies = [ - "num-traits", -] - [[package]] name = "quote" -version = "1.0.41" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -6087,7 +6063,7 @@ version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", ] [[package]] @@ -6098,14 +6074,14 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.16", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] name = "regex" -version = "1.11.3" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -6115,9 +6091,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -6132,9 +6108,9 @@ checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "resolv-conf" -version = "0.7.5" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" +checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "rlimit" @@ -6171,7 +6147,7 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -6206,7 +6182,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "errno", "libc", "linux-raw-sys 0.4.15", @@ -6215,15 +6191,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "errno", "libc", - "linux-raw-sys 0.11.0", - "windows-sys 0.61.1", + "linux-raw-sys 0.9.4", + "windows-sys 0.60.2", ] [[package]] @@ -6238,7 +6214,7 @@ version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6614df0b6d4cfb20d1d5e295332921793ce499af3ebc011bf1e393380e1e492" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "cfg-if", "clipboard-win", "fd-lock", @@ -6283,7 +6259,7 @@ dependencies = [ name = "safeatomic" version = "0.0.0" dependencies = [ - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6305,11 +6281,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.59.0", ] [[package]] @@ -6341,7 +6317,7 @@ dependencies = [ "safeatomic", "smallvec", "sparse_mmap", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6364,7 +6340,7 @@ dependencies = [ "arbitrary", "bitfield-struct 0.11.0", "open_enum", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6390,13 +6366,13 @@ dependencies = [ "scsidisk_resources", "stackfuture", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "tracing_helpers", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6424,7 +6400,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "core-foundation", "core-foundation-sys", "libc", @@ -6433,9 +6409,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.15.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -6443,17 +6419,16 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ - "serde_core", "serde_derive", ] @@ -6466,20 +6441,11 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -6498,24 +6464,23 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", "ryu", "serde", - "serde_core", ] [[package]] name = "serde_spanned" -version = "1.0.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" +checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" dependencies = [ - "serde_core", + "serde", ] [[package]] @@ -6546,7 +6511,7 @@ dependencies = [ "open_enum", "serial_16550_resources", "serial_core", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -6584,7 +6549,7 @@ dependencies = [ "inspect", "serial_core", "serial_debugcon_resources", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -6615,7 +6580,7 @@ dependencies = [ "pal_async", "serial_core", "serial_pl011_resources", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -6652,9 +6617,9 @@ version = "0.0.0" dependencies = [ "nix 0.30.1", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.16", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6700,7 +6665,7 @@ dependencies = [ "minimal_rt_build", "sidecar_defs", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6714,9 +6679,9 @@ dependencies = [ "pal_async", "parking_lot", "sidecar_defs", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6726,7 +6691,7 @@ dependencies = [ "hvdef", "open_enum", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6823,9 +6788,9 @@ dependencies = [ "libc", "pal", "parking_lot", - "thiserror 2.0.17", - "windows-sys 0.61.1", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "windows-sys 0.61.0", + "zerocopy 0.8.25", ] [[package]] @@ -6869,7 +6834,7 @@ dependencies = [ "pal_async", "parking_lot", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vmcore", ] @@ -6886,8 +6851,8 @@ version = "0.0.0" dependencies = [ "inspect", "mesh_protobuf", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -6918,7 +6883,7 @@ dependencies = [ "user_driver_emulated_mock", "vmbus_channel", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6937,14 +6902,14 @@ dependencies = [ "storvsp_protocol", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing_helpers", "vmbus_async", "vmbus_channel", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6975,7 +6940,7 @@ dependencies = [ "storvsp_resources", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "tracing_helpers", @@ -6986,7 +6951,7 @@ dependencies = [ "vmbus_core", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -6997,7 +6962,7 @@ dependencies = [ "guid", "open_enum", "scsi_defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7014,8 +6979,8 @@ dependencies = [ name = "string_page_buf" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -7060,9 +7025,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.13.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" +checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" dependencies = [ "serde", ] @@ -7084,7 +7049,7 @@ version = "0.0.0" dependencies = [ "hvdef", "memory_range", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "x86defs", ] @@ -7094,9 +7059,9 @@ name = "tdx_guest_device" version = "0.0.0" dependencies = [ "nix 0.30.1", - "thiserror 2.0.17", + "thiserror 2.0.16", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7108,22 +7073,22 @@ dependencies = [ "sev_guest_device", "static_assertions", "tdx_guest_device", - "thiserror 2.0.17", + "thiserror 2.0.16", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] name = "tempfile" -version = "3.23.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.1.2", - "windows-sys 0.61.1", + "rustix 1.0.8", + "windows-sys 0.60.2", ] [[package]] @@ -7132,7 +7097,7 @@ version = "0.0.0" dependencies = [ "crossterm", "libc", - "thiserror 2.0.17", + "thiserror 2.0.16", "winapi", ] @@ -7142,7 +7107,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix 1.1.2", + "rustix 1.0.8", "windows-sys 0.60.2", ] @@ -7176,11 +7141,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.16", ] [[package]] @@ -7196,9 +7161,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", @@ -7216,9 +7181,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", @@ -7233,15 +7198,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", @@ -7280,7 +7245,7 @@ dependencies = [ name = "tmk_protocol" version = "0.0.0" dependencies = [ - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7308,7 +7273,7 @@ dependencies = [ "hvdef", "loader", "mesh", - "object", + "object 0.37.3", "page_table", "pal_async", "pal_uring", @@ -7327,7 +7292,7 @@ dependencies = [ "vm_topology", "vmcore", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7372,12 +7337,12 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.7" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" dependencies = [ "indexmap", - "serde_core", + "serde", "serde_spanned", "toml_datetime", "toml_parser", @@ -7387,21 +7352,21 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" dependencies = [ - "serde_core", + "serde", ] [[package]] name = "toml_edit" -version = "0.23.6" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" +checksum = "7211ff1b8f0d3adae1663b7da9ffe396eabe1ca25f0b0bee42b0da29a9ddce93" dependencies = [ "indexmap", - "serde_core", + "serde", "serde_spanned", "toml_datetime", "toml_parser", @@ -7411,18 +7376,18 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" +checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" [[package]] name = "tower-service" @@ -7447,13 +7412,13 @@ dependencies = [ "open_enum", "pal_async", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tpm_resources", "tracelimit", "tracing", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7578,7 +7543,7 @@ checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" name = "ucs2" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -7596,7 +7561,7 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da7569ceafb898907ff764629bac90ac24ba4203c38c33ef79ee88c74aa35b11" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "cfg-if", "log", "ptr_meta", @@ -7623,7 +7588,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cad96b8baaf1615d3fdd0f03d04a0b487d857c1b51b19dcbfe05e2e3c447b78" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "uguid", ] @@ -7632,10 +7597,10 @@ name = "uefi_nvram_specvars" version = "0.0.0" dependencies = [ "guid", - "thiserror 2.0.17", + "thiserror 2.0.16", "ucs2 0.0.0", "uefi_specs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7647,12 +7612,12 @@ dependencies = [ "inspect", "mesh_protobuf", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", "ucs2 0.0.0", "uefi_specs", "vmcore", "wchar", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7666,7 +7631,7 @@ dependencies = [ "static_assertions", "ucs2 0.0.0", "wchar", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7681,7 +7646,7 @@ dependencies = [ "mesh", "pal_async", "socket2", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] @@ -7707,7 +7672,7 @@ dependencies = [ "static_assertions", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "tracing_helpers", @@ -7718,7 +7683,7 @@ dependencies = [ "vmbus_channel", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7753,13 +7718,13 @@ dependencies = [ "static_assertions", "tee_call", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "time", "tracing", "user_driver_emulated_mock", "vmgs", "vmgs_format", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7776,7 +7741,7 @@ dependencies = [ "prost", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.16", "vtl2_settings_proto", ] @@ -7880,7 +7845,7 @@ dependencies = [ "string_page_buf", "tee_call", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "time", "tpm", "tpm_resources", @@ -7929,7 +7894,7 @@ dependencies = [ "watchdog_core", "watchdog_vmgs_format", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -7943,14 +7908,14 @@ dependencies = [ "guid", "libc", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "tracing-subscriber", "underhill_confidentiality", "vergen", "vmbus_async", "vmbus_user_channel", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8010,7 +7975,7 @@ dependencies = [ "pal_async", "parking_lot", "sparse_mmap", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "underhill_threadpool", @@ -8032,15 +7997,15 @@ dependencies = [ "pal_async", "pal_uring", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", ] [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" @@ -8079,7 +8044,7 @@ dependencies = [ "getrandom 0.3.3", "mesh_protobuf", "socket2", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -8125,7 +8090,7 @@ dependencies = [ "vfio-bindings", "vfio_sys", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8164,7 +8129,7 @@ dependencies = [ "igvm_defs", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8223,11 +8188,11 @@ dependencies = [ "parking_lot", "pci_core", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "video_core", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8247,7 +8212,7 @@ name = "vhd1_defs" version = "0.0.0" dependencies = [ "guid", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8276,13 +8241,13 @@ dependencies = [ "parking_lot", "pci_core", "slab", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_topology", "vmcore", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8300,7 +8265,7 @@ dependencies = [ "memory_range", "open_enum", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", @@ -8331,14 +8296,14 @@ dependencies = [ "parking_lot", "pci_core", "safe_intrinsics", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", "vm_topology", "vmcore", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8361,7 +8326,7 @@ dependencies = [ "parking_lot", "signal-hook", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", @@ -8369,7 +8334,7 @@ dependencies = [ "vmcore", "x86defs", "x86emu", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8406,7 +8371,7 @@ dependencies = [ "safe_intrinsics", "safeatomic", "sidecar_client", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "user_driver", @@ -8418,7 +8383,7 @@ dependencies = [ "vmcore", "x86defs", "x86emu", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8429,12 +8394,12 @@ dependencies = [ "aarch64emu", "guestmem", "hvdef", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", "vm_topology", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8446,7 +8411,7 @@ dependencies = [ "inspect", "inspect_counters", "parking_lot", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", @@ -8476,14 +8441,14 @@ dependencies = [ "hvdef", "iced-x86", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virt", "vm_topology", "x86defs", "x86emu", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8509,7 +8474,7 @@ dependencies = [ "pci_core", "range_map_vec", "sparse_mmap", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "tracing_helpers", @@ -8523,7 +8488,7 @@ dependencies = [ "winapi", "x86defs", "x86emu", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8547,13 +8512,13 @@ dependencies = [ "pci_resources", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "virtio_resources", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8575,13 +8540,13 @@ dependencies = [ "pal_async", "parking_lot", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "virtio", "virtio_resources", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8660,7 +8625,7 @@ dependencies = [ "virtio_resources", "vm_resource", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8697,7 +8662,7 @@ dependencies = [ "serial_core", "serial_debugcon_resources", "serial_pl011_resources", - "thiserror 2.0.17", + "thiserror 2.0.16", "vm_resource", "vmotherboard", ] @@ -8711,7 +8676,7 @@ dependencies = [ "linkme", "mesh", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", ] [[package]] @@ -8725,7 +8690,7 @@ dependencies = [ "memory_range", "mesh_protobuf", "safe_intrinsics", - "thiserror 2.0.17", + "thiserror 2.0.16", "x86defs", ] @@ -8740,14 +8705,14 @@ dependencies = [ "inspect", "open_enum", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vmbfs_resources", "vmbus_async", "vmbus_channel", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8768,10 +8733,10 @@ dependencies = [ "inspect_counters", "pal_async", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.16", "vmbus_channel", "vmbus_ring", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8789,7 +8754,7 @@ dependencies = [ "pal_event", "parking_lot", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vm_resource", @@ -8812,7 +8777,7 @@ dependencies = [ "pal_async", "pal_event", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "user_driver", @@ -8821,7 +8786,7 @@ dependencies = [ "vmbus_core", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8837,7 +8802,7 @@ dependencies = [ "tracing", "vmbus_async", "vmbus_client", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8852,8 +8817,8 @@ dependencies = [ "mesh", "open_enum", "static_assertions", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -8871,8 +8836,8 @@ dependencies = [ "tracing", "vmbus_core", "widestring", - "windows 0.62.1", - "zerocopy 0.8.27", + "windows 0.62.0", + "zerocopy 0.8.25", ] [[package]] @@ -8919,7 +8884,7 @@ dependencies = [ "vmbus_relay", "vmbus_ring", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8931,8 +8896,8 @@ dependencies = [ "inspect", "safeatomic", "smallvec", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -8949,7 +8914,7 @@ dependencies = [ "pal_async", "serial_core", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "unix_socket", "vm_resource", @@ -8957,7 +8922,7 @@ dependencies = [ "vmbus_serial_host", "vmbus_serial_protocol", "vmbus_user_channel", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8971,7 +8936,7 @@ dependencies = [ "inspect_counters", "serial_core", "task_control", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vmbus_async", @@ -8980,7 +8945,7 @@ dependencies = [ "vmbus_serial_protocol", "vmbus_serial_resources", "vmcore", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -8990,7 +8955,7 @@ dependencies = [ "guid", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9021,7 +8986,7 @@ dependencies = [ "safeatomic", "slab", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "unicycle", @@ -9032,8 +8997,8 @@ dependencies = [ "vmbus_proxy", "vmbus_ring", "vmcore", - "windows 0.62.1", - "zerocopy 0.8.27", + "windows 0.62.0", + "zerocopy 0.8.25", ] [[package]] @@ -9048,12 +9013,12 @@ dependencies = [ "parking_lot", "safeatomic", "sparse_mmap", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vmbus_async", "vmbus_channel", "vmbus_ring", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9074,12 +9039,12 @@ dependencies = [ "parking_lot", "save_restore_derive", "slab", - "thiserror 2.0.17", + "thiserror 2.0.16", "time", "tracelimit", "tracing", "vm_resource", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9109,11 +9074,11 @@ dependencies = [ "pal_async", "parking_lot", "scsi_buffers", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vmgs_format", - "windows 0.62.1", - "zerocopy 0.8.27", + "windows 0.62.0", + "zerocopy 0.8.25", ] [[package]] @@ -9124,7 +9089,7 @@ dependencies = [ "inspect", "mesh_channel", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vm_resource", "vmcore", @@ -9141,7 +9106,7 @@ dependencies = [ "inspect", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9181,7 +9146,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.16", "ucs2 0.0.0", "uefi_nvram_specvars", "uefi_nvram_storage", @@ -9230,7 +9195,7 @@ dependencies = [ "power_resources", "slab", "state_unit", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "virt", "virt_support_aarch64emu", @@ -9244,7 +9209,7 @@ dependencies = [ "vmotherboard", "vpci", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9315,7 +9280,7 @@ dependencies = [ "vm_resource", "vmm_test_macros", "vtl2_settings_proto", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9354,7 +9319,7 @@ dependencies = [ "pci_bus", "range_map_vec", "state_unit", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "uefi_nvram_storage", @@ -9375,7 +9340,7 @@ dependencies = [ "mesh", "pal_async", "socket2", - "windows-sys 0.61.1", + "windows-sys 0.61.0", ] [[package]] @@ -9388,11 +9353,11 @@ dependencies = [ "pal", "pal_async", "pal_event", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "widestring", "winapi", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9402,8 +9367,8 @@ dependencies = [ "futures", "pal_async", "socket2", - "thiserror 2.0.17", - "zerocopy 0.8.27", + "thiserror 2.0.16", + "zerocopy 0.8.25", ] [[package]] @@ -9456,7 +9421,7 @@ dependencies = [ "pci_core", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmbus_async", @@ -9464,7 +9429,7 @@ dependencies = [ "vmbus_ring", "vmcore", "vpci_protocol", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9486,7 +9451,7 @@ dependencies = [ "slab", "task_control", "test_with_tracing", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracelimit", "tracing", "vmbus_async", @@ -9495,7 +9460,7 @@ dependencies = [ "vmcore", "vpci", "vpci_protocol", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9505,7 +9470,7 @@ dependencies = [ "bitfield-struct 0.11.0", "guid", "open_enum", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -9604,20 +9569,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.7+wasi-0.2.4" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ - "wasip2", -] - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", + "wit-bindgen-rt", ] [[package]] @@ -9630,7 +9586,7 @@ dependencies = [ "inspect", "mesh", "pal_async", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "vmcore", "watchdog_vmgs_format", @@ -9640,7 +9596,7 @@ dependencies = [ name = "watchdog_vmgs_format" version = "0.0.0" dependencies = [ - "thiserror 2.0.17", + "thiserror 2.0.16", "vmcore", ] @@ -9683,7 +9639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ "env_home", - "rustix 1.1.2", + "rustix 1.0.8", "winsafe", ] @@ -9756,11 +9712,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.11" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" dependencies = [ - "windows-sys 0.61.1", + "windows-sys 0.60.2", ] [[package]] @@ -9781,45 +9737,24 @@ dependencies = [ [[package]] name = "windows" -version = "0.61.3" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +checksum = "9579d0e6970fd5250aa29aba5994052385ff55cf7b28a059e484bb79ea842e42" dependencies = [ - "windows-collections 0.2.0", - "windows-core 0.61.2", - "windows-future 0.2.1", - "windows-link 0.1.3", - "windows-numerics 0.2.0", -] - -[[package]] -name = "windows" -version = "0.62.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e6c4a1f363c8210c6f77ba24f645c61c6fb941eccf013da691f7e09515b8ac" -dependencies = [ - "windows-collections 0.3.1", - "windows-core 0.62.1", - "windows-future 0.3.1", - "windows-numerics 0.3.0", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core 0.61.2", + "windows-collections", + "windows-core 0.62.0", + "windows-future", + "windows-link 0.2.0", + "windows-numerics", ] [[package]] name = "windows-collections" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123e712f464a8a60ce1a13f4c446d2d43ab06464cb5842ff68f5c71b6fb7852e" +checksum = "a90dd7a7b86859ec4cdf864658b311545ef19dbcf17a672b52ab7cefe80c336f" dependencies = [ - "windows-core 0.62.1", + "windows-core 0.62.0", ] [[package]] @@ -9837,25 +9772,12 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" dependencies = [ - "windows-implement 0.60.1", - "windows-interface 0.59.2", - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-core" -version = "0.62.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" -dependencies = [ - "windows-implement 0.60.1", - "windows-interface 0.59.2", + "windows-implement 0.60.0", + "windows-interface 0.59.1", "windows-link 0.2.0", "windows-result 0.4.0", "windows-strings 0.5.0", @@ -9863,24 +9785,13 @@ dependencies = [ [[package]] name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", - "windows-threading 0.1.0", -] - -[[package]] -name = "windows-future" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f3db6b24b120200d649cd4811b4947188ed3a8d2626f7075146c5d178a9a4a" +checksum = "b2194dee901458cb79e1148a4e9aac2b164cc95fa431891e7b296ff0b2f1d8a6" dependencies = [ - "windows-core 0.62.1", + "windows-core 0.62.0", "windows-link 0.2.0", - "windows-threading 0.2.0", + "windows-threading", ] [[package]] @@ -9896,9 +9807,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.1" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", @@ -9918,9 +9829,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.2" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", @@ -9939,23 +9850,13 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", -] - [[package]] name = "windows-numerics" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ce3498fe0aba81e62e477408383196b4b0363db5e0c27646f932676283b43d8" dependencies = [ - "windows-core 0.62.1", + "windows-core 0.62.0", "windows-link 0.2.0", ] @@ -9968,15 +9869,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows-result" version = "0.4.0" @@ -9992,7 +9884,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "193cae8e647981c35bc947fdd57ba7928b1fa0d4a79305f6dd2dc55221ac35ac" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.9.3", "widestring", "windows-sys 0.59.0", ] @@ -10007,15 +9899,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows-strings" version = "0.5.0" @@ -10049,14 +9932,14 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.4", + "windows-targets 0.53.3", ] [[package]] name = "windows-sys" -version = "0.61.1" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" dependencies = [ "windows-link 0.2.0", ] @@ -10079,11 +9962,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.4" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link 0.2.0", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -10094,15 +9977,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows-threading" version = "0.2.0" @@ -10114,11 +9988,11 @@ dependencies = [ [[package]] name = "windows-version" -version = "0.1.6" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "700dad7c058606087f6fdc1f88da5841e06da40334413c6cd4367b25ef26d24e" +checksum = "e04a5c6627e310a23ad2358483286c7df260c964eb2d003d8efd6d0f4e79265c" dependencies = [ - "windows-link 0.2.0", + "windows-link 0.1.3", ] [[package]] @@ -10243,10 +10117,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "wit-bindgen" -version = "0.46.0" +name = "wit-bindgen-rt" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.3", +] [[package]] name = "wyz" @@ -10265,7 +10142,7 @@ dependencies = [ "bitfield-struct 0.11.0", "open_enum", "static_assertions", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -10274,10 +10151,10 @@ version = "0.0.0" dependencies = [ "futures", "iced-x86", - "thiserror 2.0.17", + "thiserror 2.0.16", "tracing", "x86defs", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -10315,7 +10192,7 @@ dependencies = [ "ignore", "log", "mbrman", - "object", + "object 0.37.3", "rayon", "serde", "serde_json", @@ -10324,7 +10201,7 @@ dependencies = [ "walkdir", "which 8.0.0", "xshell", - "zerocopy 0.8.27", + "zerocopy 0.8.25", ] [[package]] @@ -10347,11 +10224,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.8.27", + "zerocopy-derive 0.8.25", ] [[package]] @@ -10367,9 +10244,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", @@ -10378,6 +10255,6 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.8.2" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" From b751de94cd1edeba109b2473d6609474dabfb035 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Wed, 1 Oct 2025 23:58:44 +0000 Subject: [PATCH 49/57] updating baseline values --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index 0ec4b6a643..dcac83e430 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -199,7 +199,7 @@ "underhill_vm": { "Pss": { "base": 29554, - "threshold": 150 + "threshold": 500 }, "Pss_Anon": { "base": 9312, From 84cf512765b65e637da9f5dbb1cc663c562a9821 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Thu, 2 Oct 2025 23:37:39 +0000 Subject: [PATCH 50/57] tuning baseline values --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index dcac83e430..c5ebdec101 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -160,7 +160,7 @@ }, "Pss_Anon": { "base": 16628, - "threshold": 150 + "threshold": 500 } } } @@ -203,7 +203,7 @@ }, "Pss_Anon": { "base": 9312, - "threshold": 150 + "threshold": 250 } } }, From 293c0c5462ef1d63671b2b8a840cacf8deec1619 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 17:11:18 +0000 Subject: [PATCH 51/57] reverting to previous threshold value for GP anonymous memory --- vmm_tests/vmm_tests/test_data/memstat_baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm_tests/vmm_tests/test_data/memstat_baseline.json b/vmm_tests/vmm_tests/test_data/memstat_baseline.json index c5ebdec101..58d6b1dfaa 100644 --- a/vmm_tests/vmm_tests/test_data/memstat_baseline.json +++ b/vmm_tests/vmm_tests/test_data/memstat_baseline.json @@ -160,7 +160,7 @@ }, "Pss_Anon": { "base": 16628, - "threshold": 500 + "threshold": 1000 } } } From c0a1d5bc22cdc63c6c17c655cd3bb06663a8ad10 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 17:33:46 +0000 Subject: [PATCH 52/57] removing unused deps --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 24a137443d..49687d2bc1 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -5,12 +5,9 @@ use anyhow::Context; use futures::StreamExt; -use hyperv_ic_resources::kvp::KvpRpc; -use jiff::SignedDuration; use memstat::TestVPCount; use memstat::WaitPeriodSec; use memstat::idle_test; -use mesh::rpc::RpcSend; use petri::MemoryConfig; use petri::PetriGuestStateLifetime; use petri::PetriHaltReason; From 1c574a20b32147eb9bac150b47aaeefc129289f1 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 20:47:44 +0000 Subject: [PATCH 53/57] using supplied vmm test driver for idle wait --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 22 +++++++++++++++++-- .../tests/tests/multiarch/memstat.rs | 11 +++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 49687d2bc1..9c268afe76 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -8,6 +8,8 @@ use futures::StreamExt; use memstat::TestVPCount; use memstat::WaitPeriodSec; use memstat::idle_test; +use pal_async::DefaultDriver; +use petri::ArtifactResolver; use petri::MemoryConfig; use petri::PetriGuestStateLifetime; use petri::PetriHaltReason; @@ -569,8 +571,16 @@ async fn reboot_into_guest_vsm( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, + _artifact_resolver: ArtifactResolver<'_>, + driver: DefaultDriver, ) -> anyhow::Result<()> { - idle_test(config, TestVPCount::SmallVPCount, WaitPeriodSec::ShortWait).await + idle_test( + config, + TestVPCount::SmallVPCount, + WaitPeriodSec::ShortWait, + driver, + ) + .await } #[vmm_test_no_agent( @@ -582,6 +592,14 @@ async fn memory_validation_small( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_large( config: PetriVmBuilder, + _artifact_resolver: ArtifactResolver<'_>, + driver: DefaultDriver, ) -> anyhow::Result<()> { - idle_test(config, TestVPCount::LargeVPCount, WaitPeriodSec::LongWait).await + idle_test( + config, + TestVPCount::LargeVPCount, + WaitPeriodSec::LongWait, + driver, + ) + .await } diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index a8d8d37622..1b3c7593b8 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -3,7 +3,7 @@ //! Memory Validation for VMM Tests -use pal_async::DefaultPool; +use pal_async::DefaultDriver; use pal_async::timer::PolledTimer; use petri::IsolationType; use petri::MemoryConfig; @@ -363,6 +363,7 @@ pub async fn idle_test( config: PetriVmBuilder, vps: TestVPCount, wait_time_sec: WaitPeriodSec, + driver: DefaultDriver, ) -> anyhow::Result<()> { let isolation_type = config.isolation(); let machine_arch = config.arch(); @@ -395,11 +396,9 @@ pub async fn idle_test( let vtl2_agent = vm.wait_for_vtl2_agent().await?; // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results - DefaultPool::run_with(async |driver| { - PolledTimer::new(&driver) - .sleep(Duration::from_secs(wait_time_sec as u64)) - .await; - }); + PolledTimer::new(&driver) + .sleep(Duration::from_secs(wait_time_sec as u64)) + .await; let memstat = MemStat::new(&vtl2_agent).await; tracing::info!("MEMSTAT_START:{}:MEMSTAT_END", to_string(&memstat).unwrap()); From 3e20b449a00954543223298bfe53f66663e80950 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 21:05:22 +0000 Subject: [PATCH 54/57] changing resolver and driver parameters to references --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 8 ++++---- vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index 9c268afe76..c7c1ff5f68 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -571,8 +571,8 @@ async fn reboot_into_guest_vsm( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, - _artifact_resolver: ArtifactResolver<'_>, - driver: DefaultDriver, + _resolver: &ArtifactResolver<'_>, + driver: &DefaultDriver, ) -> anyhow::Result<()> { idle_test( config, @@ -592,8 +592,8 @@ async fn memory_validation_small( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_large( config: PetriVmBuilder, - _artifact_resolver: ArtifactResolver<'_>, - driver: DefaultDriver, + _resolver: &ArtifactResolver<'_>, + driver: &DefaultDriver, ) -> anyhow::Result<()> { idle_test( config, diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 1b3c7593b8..3e61eb38bd 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -363,7 +363,7 @@ pub async fn idle_test( config: PetriVmBuilder, vps: TestVPCount, wait_time_sec: WaitPeriodSec, - driver: DefaultDriver, + driver: &DefaultDriver, ) -> anyhow::Result<()> { let isolation_type = config.isolation(); let machine_arch = config.arch(); @@ -396,7 +396,7 @@ pub async fn idle_test( let vtl2_agent = vm.wait_for_vtl2_agent().await?; // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results - PolledTimer::new(&driver) + PolledTimer::new(driver) .sleep(Duration::from_secs(wait_time_sec as u64)) .await; From e9a438fa10a26b4c0a192ae5b33bce844b76b691 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 22:06:08 +0000 Subject: [PATCH 55/57] removing ArtifactResolver parameter --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 7 ++----- vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index c7c1ff5f68..db3065c0ea 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -9,7 +9,6 @@ use memstat::TestVPCount; use memstat::WaitPeriodSec; use memstat::idle_test; use pal_async::DefaultDriver; -use petri::ArtifactResolver; use petri::MemoryConfig; use petri::PetriGuestStateLifetime; use petri::PetriHaltReason; @@ -571,8 +570,7 @@ async fn reboot_into_guest_vsm( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, - _resolver: &ArtifactResolver<'_>, - driver: &DefaultDriver, + driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test( config, @@ -592,8 +590,7 @@ async fn memory_validation_small( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_large( config: PetriVmBuilder, - _resolver: &ArtifactResolver<'_>, - driver: &DefaultDriver, + driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test( config, diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs index 3e61eb38bd..1b3c7593b8 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch/memstat.rs @@ -363,7 +363,7 @@ pub async fn idle_test( config: PetriVmBuilder, vps: TestVPCount, wait_time_sec: WaitPeriodSec, - driver: &DefaultDriver, + driver: DefaultDriver, ) -> anyhow::Result<()> { let isolation_type = config.isolation(); let machine_arch = config.arch(); @@ -396,7 +396,7 @@ pub async fn idle_test( let vtl2_agent = vm.wait_for_vtl2_agent().await?; // This wait is needed to let the idle VM fully instantiate its memory - provides more accurate memory usage results - PolledTimer::new(driver) + PolledTimer::new(&driver) .sleep(Duration::from_secs(wait_time_sec as u64)) .await; From 971eac81466b05615fb7931b878eee4e39d3d949 Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 22:38:20 +0000 Subject: [PATCH 56/57] setting artifact resolver to specify openhcl IGVM --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index db3065c0ea..d798bae26e 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -570,6 +570,7 @@ async fn reboot_into_guest_vsm( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, + _: (ResolvedArtifact,), driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test( @@ -590,6 +591,7 @@ async fn memory_validation_small( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_large( config: PetriVmBuilder, + _: (ResolvedArtifact,), driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test( From a8ae017d83cfa95a7620ad0f564216f7917e839c Mon Sep 17 00:00:00 2001 From: Daniel Paliulis Date: Fri, 3 Oct 2025 22:57:30 +0000 Subject: [PATCH 57/57] setting second parameter to generic tuple --- vmm_tests/vmm_tests/tests/tests/multiarch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index d798bae26e..05a661730b 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -570,7 +570,7 @@ async fn reboot_into_guest_vsm( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_small( config: PetriVmBuilder, - _: (ResolvedArtifact,), + _: (), driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test( @@ -591,7 +591,7 @@ async fn memory_validation_small( #[cfg_attr(not(windows), expect(dead_code))] async fn memory_validation_large( config: PetriVmBuilder, - _: (ResolvedArtifact,), + _: (), driver: DefaultDriver, ) -> anyhow::Result<()> { idle_test(