diff --git a/flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs b/flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs index 6a684f500b..1ea2e7c715 100644 --- a/flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs +++ b/flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs @@ -130,6 +130,13 @@ impl ResolvedArtifactSelections { true } + // OpenVMM vhost binary (Linux only) + "petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_LINUX_X64" + | "petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_LINUX_AARCH64" => { + self.build.openvmm_vhost = true; + true + } + // OpenHCL IGVM files "petri_artifacts_vmm_test::artifacts::openhcl_igvm::LATEST_STANDARD_X64" | "petri_artifacts_vmm_test::artifacts::openhcl_igvm::LATEST_STANDARD_DEV_KERNEL_X64" diff --git a/vmm_tests/vmm_tests/tests/tests/multiarch.rs b/vmm_tests/vmm_tests/tests/tests/multiarch.rs index b50d5d6ee0..8a67237a2a 100644 --- a/vmm_tests/vmm_tests/tests/tests/multiarch.rs +++ b/vmm_tests/vmm_tests/tests/tests/multiarch.rs @@ -16,6 +16,8 @@ use petri::openvmm::OpenVmmPetriBackend; use petri::pipette::cmd; use petri_artifacts_common::tags::MachineArch; use petri_artifacts_common::tags::OsFlavor; +#[cfg(target_os = "linux")] +use petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_NATIVE; use vmm_test_macros::openvmm_test; use vmm_test_macros::vmm_test; use vmm_test_macros::vmm_test_with; @@ -481,10 +483,13 @@ async fn guest_test_uefi(config: PetriVmBuilder) -> anyho /// virtio transport → frontend protocol → socket → backend protocol → /// virtio-blk device → disk file. #[cfg(target_os = "linux")] -#[openvmm_test(linux_direct_x64, linux_direct_aarch64)] -async fn vhost_user_blk_device( +#[openvmm_test( + linux_direct_x64[OPENVMM_VHOST_NATIVE], + linux_direct_aarch64[OPENVMM_VHOST_NATIVE], +)] +async fn vhost_user_blk_device( config: PetriVmBuilder, - _extra_deps: (), + extra_deps: (petri::ResolvedArtifact,), driver: pal_async::DefaultDriver, ) -> anyhow::Result<()> { use openvmm_defs::config::VirtioBus; @@ -493,8 +498,8 @@ async fn vhost_user_blk_device( use virtio_resources::vhost_user::VhostUserDeviceHandle; use vm_resource::IntoResource; - let openvmm_vhost_path = - petri_artifact_resolver_openvmm_known_paths::get_output_executable_path("openvmm_vhost")?; + let (openvmm_vhost_artifact,) = extra_deps; + let openvmm_vhost_path = openvmm_vhost_artifact.get(); let log_file = config.log_source().log_file("openvmm_vhost")?; @@ -513,7 +518,7 @@ async fn vhost_user_blk_device( // Spawn the openvmm_vhost backend process. Pipe stderr so we can // forward it to the petri log system. let (stderr_read, stderr_write) = pal::pipe_pair()?; - let backend_child = std::process::Command::new(&openvmm_vhost_path) + let backend_child = std::process::Command::new(openvmm_vhost_path) .arg("--socket") .arg(&socket_path) .arg("blk")