diff --git a/qemu/tests/cfg/hotplug_memory_repeat.cfg b/qemu/tests/cfg/hotplug_memory_repeat.cfg index 1995c683a3..cc66358140 100644 --- a/qemu/tests/cfg/hotplug_memory_repeat.cfg +++ b/qemu/tests/cfg/hotplug_memory_repeat.cfg @@ -9,7 +9,7 @@ no WinXP Win2000 Win2003 WinVista slots_mem = 256 mem_fixed = 4096 - x86_64: + aarch64,x86_64: mem_fixed = 8192 size_mem = 128M maxmem_mem = 40G @@ -24,6 +24,13 @@ maxmem_mem = 70G backend_mem = memory-backend-ram repeat_times = 256 + aarch64: + # Section size must be at least 128MB for 4K and 16k base + # page size config. + # Section size must be at least 512MB for 64K base + get_basic_page = "getconf PAGE_SIZE" + size_mem_64k = 512M + maxmem_mem = 140G variants test_type: - repeat_256: only Linux diff --git a/qemu/tests/hotplug_mem_repeat.py b/qemu/tests/hotplug_mem_repeat.py index 7ca0cfbd9a..6f78a6f7c8 100644 --- a/qemu/tests/hotplug_mem_repeat.py +++ b/qemu/tests/hotplug_mem_repeat.py @@ -2,6 +2,7 @@ from virttest import error_context from virttest import utils_test + from virttest.utils_test.qemu import MemoryHotplugTest LOG_JOB = logging.getLogger('avocado.test') @@ -35,12 +36,17 @@ def start_test(self): memory 256 times, then unplug 256 times. Otherwise, repeat hotplug and unplug in turn for 256 times. This is test entry. """ - times = int(self.params["repeat_times"]) + times = self.params.get_numeric("repeat_times", int) target_mems = [] for i in range(times): target_mems.append("mem%s" % i) vm = self.env.get_vm(self.params["main_vm"]) session = vm.wait_for_login() + if self.params.get("vm_arch_name", "") == "aarch64": + self.test.log.info("Check basic page size on guest.") + get_basic_page = self.params.get("get_basic_page") + if session.cmd(get_basic_page).strip() == '65536': + self.params['size_mem'] = self.params.get("size_mem_64k") if self.params.get_boolean("mem_unplug_test", False): arg = "movable_node" utils_test.update_boot_option(vm, args_added=arg)