From 28ba2c89402bed43a9d1c5068d968d83b6f33487 Mon Sep 17 00:00:00 2001 From: Shuang Zheng Date: Mon, 7 Sep 2020 11:13:23 +0800 Subject: [PATCH] acrn-config: update the size range of ivshmem memory region update the size of ivshmem memory region to [2MB, 512MB]. Tracked-On: #4853 Signed-off-by: Shuang Zheng Reviewed-by: Yuan Liu --- misc/acrn-config/library/scenario_cfg_lib.py | 4 ++-- misc/acrn-config/scenario_config/ivshmem_cfg_h.py | 2 +- misc/vm_configs/scenarios/hybrid_rt/whl-ipc-i5/ivshmem_cfg.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/acrn-config/library/scenario_cfg_lib.py b/misc/acrn-config/library/scenario_cfg_lib.py index e5fa3895a..65d009598 100644 --- a/misc/acrn-config/library/scenario_cfg_lib.py +++ b/misc/acrn-config/library/scenario_cfg_lib.py @@ -763,8 +763,8 @@ def share_mem_check(shmem_regions, raw_shmem_regions, vm_type_info, prime_item, except: ERR_LIST[key] = "The size of share Memory region should be decimal or hexadecimal." return - if int_size < 0x200000 or int_size >= 0x40000000: - ERR_LIST[key] = "The size of share Memory region should be in [2M, 1G)." + if int_size < 0x200000 or int_size > 0x20000000: + ERR_LIST[key] = "The size of share Memory region should be in [2MB, 512MB]." return if not ((int_size & (int_size-1) == 0) and int_size != 0): ERR_LIST[key] = "The size of share Memory region should be a power of 2." diff --git a/misc/acrn-config/scenario_config/ivshmem_cfg_h.py b/misc/acrn-config/scenario_config/ivshmem_cfg_h.py index 950f50006..a31892e6c 100644 --- a/misc/acrn-config/scenario_config/ivshmem_cfg_h.py +++ b/misc/acrn-config/scenario_config/ivshmem_cfg_h.py @@ -39,7 +39,7 @@ def write_shmem_regions(config): print("", file=config) print("/*", file=config) print(" * The IVSHMEM_SHM_SIZE is the sum of all memory regions.", file=config) - print(" * The size range of each memory region is [2M, 1G) and is a power of 2.", file=config) + print(" * The size range of each memory region is [2MB, 512MB] and is a power of 2.", file=config) print(" */", file=config) total_shm_size = 0 if len(shmem_regions) > 0: diff --git a/misc/vm_configs/scenarios/hybrid_rt/whl-ipc-i5/ivshmem_cfg.h b/misc/vm_configs/scenarios/hybrid_rt/whl-ipc-i5/ivshmem_cfg.h index f3ff2c916..3a91f92ff 100644 --- a/misc/vm_configs/scenarios/hybrid_rt/whl-ipc-i5/ivshmem_cfg.h +++ b/misc/vm_configs/scenarios/hybrid_rt/whl-ipc-i5/ivshmem_cfg.h @@ -12,7 +12,7 @@ /* * The IVSHMEM_SHM_SIZE is the sum of all memory regions. - * The size range of each memory region is [2M, 1G) and is a power of 2. + * The size range of each memory region is [2MB, 512MB] and is a power of 2. */ #define IVSHMEM_SHM_SIZE 0x200000UL #define IVSHMEM_DEV_NUM 2UL