From 253fe724353d356123467a9c7d66f5697f4a3783 Mon Sep 17 00:00:00 2001 From: Chao Wu Date: Sun, 3 Mar 2024 23:34:06 +0800 Subject: [PATCH] Dragonball: fix test_handler_insert_region the mmap region start guest addr hard-code a value and later there would be check whether the mentioned addr is larger than or equal to mem_end (default to host_phy_mem >> 1) in order to satisfy the requirement for DaxMemory. Since github virt machine phy_mem is larger than previous CI machine we use, the hard-code value could no longer be worked. To fix this, we change the address to mem_end in unit test to avoid the influence of host machine change. fixes: #9207 Signed-off-by: Chao Wu --- src/dragonball/src/device_manager/mod.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dragonball/src/device_manager/mod.rs b/src/dragonball/src/device_manager/mod.rs index f0958b1166..e8e660985a 100644 --- a/src/dragonball/src/device_manager/mod.rs +++ b/src/dragonball/src/device_manager/mod.rs @@ -1429,11 +1429,7 @@ mod tests { Some(vm.vm_config().clone()), vm.shared_info().clone(), ); - #[cfg(target_arch = "x86_64")] - let guest_addr = GuestAddress(0x200000000000); - // TODO: #7290 - https://github.com/kata-containers/kata-containers/issues/7290 - #[cfg(target_arch = "aarch64")] - let guest_addr = GuestAddress(0xF800000000); + let guest_addr = GuestAddress(*dbs_boot::layout::GUEST_MEM_END); let cache_len = 1024 * 1024 * 1024; let mmap_region = MmapRegion::build(