From patchwork Thu Mar 16 09:12:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiamei Xie X-Patchwork-Id: 13177245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41580C6FD19 for ; Thu, 16 Mar 2023 09:12:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.510408.788025 (Exim 4.92) (envelope-from ) id 1pcjfH-0007In-MH; Thu, 16 Mar 2023 09:12:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 510408.788025; Thu, 16 Mar 2023 09:12:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pcjfH-0007Ig-In; Thu, 16 Mar 2023 09:12:51 +0000 Received: by outflank-mailman (input) for mailman id 510408; Thu, 16 Mar 2023 09:12:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pcjfG-0006zO-Em for xen-devel@lists.xenproject.org; Thu, 16 Mar 2023 09:12:50 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id b91a9c8e-c3da-11ed-87f5-c1b5be75604c; Thu, 16 Mar 2023 10:12:49 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AACF32F4; Thu, 16 Mar 2023 02:13:32 -0700 (PDT) Received: from comhpcalt.shanghai.arm.com (comhpcalt.shanghai.arm.com [10.169.190.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BF1923F67D; Thu, 16 Mar 2023 02:12:46 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b91a9c8e-c3da-11ed-87f5-c1b5be75604c From: "jiamei.xie" To: xen-devel@lists.xenproject.org Cc: wei.chen@arm.com, jiamei.xie@arm.com, sstabellini@kernel.org, bertrand.marquis@arm.com, Doug Goldstein Subject: [PATCH v2 1/2] automation: arm64: Create test jobs for testing static heap on qemu Date: Thu, 16 Mar 2023 09:12:23 +0000 Message-Id: <20230316091224.338620-2-jiamei.xie@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230316091224.338620-1-jiamei.xie@arm.com> References: <20230316091224.338620-1-jiamei.xie@arm.com> MIME-Version: 1.0 From: Jiamei Xie Create 2 new test jobs, called qemu-smoke-dom0less-arm64-gcc-staticheap and qemu-smoke-dom0less-arm64-gcc-debug-staticheap. Add property "xen,static-heap" under /chosen node to enable static-heap. If the domU can start successfully with static-heap enabled, then this test pass. ImageBuillder sets the kernel and ramdisk range based on the file size. It will use the memory range between 0x45600000 to 0x47AED1E8. It uses MEMORY_START and MEMORY_END from the cfg file as a range in which it can instruct u-boot where to place the images. Change MEMORY_END to 0x50000000 for all test cases. Signed-off-by: Jiamei Xie Reviewed-by: Stefano Stabellini --- Changes from v1: - Change MEMORY_END to 0x50000000 for all test cases. - Update commit message. --- automation/gitlab-ci/test.yaml | 16 ++++++++++++++ .../scripts/qemu-smoke-dom0less-arm64.sh | 21 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 2e1a6886df..37465305ff 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -158,6 +158,22 @@ qemu-smoke-dom0less-arm64-gcc-debug-staticmem: - *arm64-test-needs - alpine-3.12-gcc-debug-arm64-staticmem +qemu-smoke-dom0less-arm64-gcc-staticheap: + extends: .qemu-arm64 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm64.sh static-heap 2>&1 | tee ${LOGFILE} + needs: + - *arm64-test-needs + - alpine-3.12-gcc-arm64 + +qemu-smoke-dom0less-arm64-gcc-debug-staticheap: + extends: .qemu-arm64 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm64.sh static-heap 2>&1 | tee ${LOGFILE} + needs: + - *arm64-test-needs + - alpine-3.12-gcc-debug-arm64 + qemu-smoke-dom0less-arm64-gcc-boot-cpupools: extends: .qemu-arm64 script: diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/scripts/qemu-smoke-dom0less-arm64.sh index 182a4b6c18..2d69d976ea 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -27,6 +27,11 @@ fi " fi +if [[ "${test_variant}" == "static-heap" ]]; then + passed="${test_variant} test passed" + domU_check="echo \"${passed}\"" +fi + if [[ "${test_variant}" == "boot-cpupools" ]]; then # Check if domU0 (id=1) is assigned to Pool-1 with null scheduler passed="${test_variant} test passed" @@ -107,7 +112,7 @@ cd .. # ImageBuilder echo 'MEMORY_START="0x40000000" -MEMORY_END="0xC0000000" +MEMORY_END="0x50000000" DEVICE_TREE="virt-gicv2.dtb" XEN="xen" @@ -128,6 +133,20 @@ if [[ "${test_variant}" == "static-mem" ]]; then echo -e "\nDOMU_STATIC_MEM[0]=\"${domu_base} ${domu_size}\"" >> binaries/config fi +if [[ "${test_variant}" == "static-heap" ]]; then + # ImageBuilder uses the config file to create the uboot script. Devicetree + # will be set via the generated uboot script. + # The valid memory range is 0x40000000 to 0x80000000 as defined before. + # ImageBuillder sets the kernel and ramdisk range based on the file size. + # It will use the memory range between 0x45600000 to 0x47AED1E8, and + # MEMORY_END has been set to 0x50000000 above, so set memory range between + # 0x50000000 and 0x80000000 as static heap. + echo ' +XEN_STATIC_HEAP="0x50000000 0x30000000" +# The size of static heap should be greater than the guest memory +DOMU_MEM[0]="128"' >> binaries/config +fi + if [[ "${test_variant}" == "boot-cpupools" ]]; then echo ' CPUPOOL[0]="cpu@1 null"