From nobody Sat Feb 7 09:35:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1657226321; cv=none; d=zohomail.com; s=zohoarc; b=kGNsVDhH8WY24KL6l8XBbfn4/mi30/pk8CpVRr5BqqObxEUXU/LWGSGCrD2DpCwvmEJw+a/4IiU2iQTqdt7TzBk4ymh6aOGZk7imlkqw/dRwKLRpozQdEO/PXUsGLbfIG3UJhh/Rif+3JceB5cSgRjvamy8FpwZlorfGve08orI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657226321; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=x5r3MkqNQKETdv3U9LPOk3V6DXnQBYUf9+YzV6L4cI4=; b=RMfyiaHxEGhhi3up1NYluTh2oAhErXtcIsMvVndvgmrQSC0iqU/1pQPFXVBroean7LuyQUoB44/CrlrBB8Hh3isLua0z7B2dw1r2cc36eklYFYqmsEUQPOQa3/VZw7g6ZzJBfmkG7JsxSpvRxDOIgWybEKfBlQOwBwVe4ZlVUes= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 165722632162121.80394106948063; Thu, 7 Jul 2022 13:38:41 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.363125.593499 (Exim 4.92) (envelope-from ) id 1o9YGX-0005Y3-SN; Thu, 07 Jul 2022 20:38:25 +0000 Received: by outflank-mailman (output) from mailman id 363125.593499; Thu, 07 Jul 2022 20:38:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o9YGX-0005Xu-ON; Thu, 07 Jul 2022 20:38:25 +0000 Received: by outflank-mailman (input) for mailman id 363125; Thu, 07 Jul 2022 20:38:25 +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 1o9YGW-0005FX-TF for xen-devel@lists.xenproject.org; Thu, 07 Jul 2022 20:38:25 +0000 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [2a00:1450:4864:20::632]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bece1b40-fe34-11ec-bd2d-47488cf2e6aa; Thu, 07 Jul 2022 22:38:23 +0200 (CEST) Received: by mail-ej1-x632.google.com with SMTP id a9so4688769ejf.6 for ; Thu, 07 Jul 2022 13:38:24 -0700 (PDT) Received: from uni.. (adsl-142.37.6.26.tellas.gr. [37.6.26.142]) by smtp.googlemail.com with ESMTPSA id s17-20020a1709060c1100b00722e52d043dsm19344858ejf.114.2022.07.07.13.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 13:38:22 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: bece1b40-fe34-11ec-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x5r3MkqNQKETdv3U9LPOk3V6DXnQBYUf9+YzV6L4cI4=; b=hkses1a30jzJ8OVxDA5IvEl9iNMgdz+7Oxoai2bEUc/31PEDl9VP5EVi63PL0vNIxj s7lGe7jVURr5NuMGildiKqxB07pXOqQjrxlLqgGtvK3In5sPOq6N6hQkH85M2qXBYG3n MgsHj0ba7D4E4XM7cTDJKGcsIIB2jm8quEbbt+htO8dHjDqKSyFycEorKx16+Q3PsfPy 18dn5M5CBIjbyVqePtBW4dFgW8JfdWzx1aQXb0SbYXxEu6e0G7XBV9Nwgtw2gwipdcXC 6cPcJuhyDiMfmNh8/Y1BjXIOvGS4cYQfn1vVBlZ/DRmXYjf0Qcyu/bx69t03vySaK8Py h/jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x5r3MkqNQKETdv3U9LPOk3V6DXnQBYUf9+YzV6L4cI4=; b=ghp5csbTxyLFIEKXMsU0EIuEuzbz8BW46VnRDFGvXvzmce6PGuiCj74r1PXciWYs2/ 5ELKhs+jbDFlDq3ftEuPmwFPBGAN5OflK96nEVAk1SUWv3e3cLoC2d39+skLR7vJKdzy Pnqsnyf1dG3dMqOD7ijwRKNDqDLFwuDwfURYZOfG+uChBgR95oa0pQrHD3AmyfNwnOnX Rdf1hT1WTv+7PL+uG0rRSrIiHYGYKNcimf5gm8/EdGM0ZZEwyai5npUSNTv8i+X1J0vz YEr/5NFPx5+X9S1SGuQ607VYb8lZg5ebXMw9mzmJl12T2xLAIiCGcAY5Rik24blsvRjf sIwQ== X-Gm-Message-State: AJIora+5oVVuCt6YFeVXo+03YfPZunW8jjMzDNVfCiPk+e6Je7OTLXPB nxaww3e8M8mKI5X5wriMP7mDInhoZ9s= X-Google-Smtp-Source: AGRyM1u9kTlkyE3D8hqJUq/rFPvwAotF1//FwtOQn/TBvYkgopQWR0gZyAA0+6wwYl5CYZwdIDRlAA== X-Received: by 2002:a17:907:9620:b0:722:fc5e:3259 with SMTP id gb32-20020a170907962000b00722fc5e3259mr44292104ejc.579.1657226303408; Thu, 07 Jul 2022 13:38:23 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Doug Goldstein , Stefano Stabellini Subject: [PATCH 1/2] automation: Remove XEN_CONFIG_EXPERT leftovers Date: Thu, 7 Jul 2022 23:38:02 +0300 Message-Id: <20220707203803.798317-2-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220707203803.798317-1-burzalodowa@gmail.com> References: <20220707203803.798317-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1657226322926100001 Content-Type: text/plain; charset="utf-8" The EXPERT config option cannot anymore be selected via the environmental variable XEN_CONFIG_EXPERT. Remove stale references to XEN_CONFIG_EXPERT from the automation code. Signed-off-by: Xenia Ragiadakou Reviewed-by: Stefano Stabellini --- automation/build/README.md | 3 --- automation/scripts/build | 4 ++-- automation/scripts/containerize | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/automation/build/README.md b/automation/build/README.md index 2137957408..00305eed03 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -65,9 +65,6 @@ understands. - CONTAINER_NO_PULL: If set to 1, the script will not pull from docker hub. This is useful when testing container locally. =20 -- XEN_CONFIG_EXPERT: If this is defined in your shell it will be - automatically passed through to the container. - If your docker host has Linux kernel > 4.11, and you want to use containers that run old glibc (for example, CentOS 6 or SLES11SP4), you may need to a= dd =20 diff --git a/automation/scripts/build b/automation/scripts/build index 281f8b1fcc..21b3bc57c8 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -91,6 +91,6 @@ for cfg in `ls ${cfg_dir}`; do echo "Building $cfg" make -j$(nproc) -C xen clean rm -f xen/.config - make -C xen KBUILD_DEFCONFIG=3D../../../../${cfg_dir}/${cfg} XEN_CONFI= G_EXPERT=3Dy defconfig - make -j$(nproc) -C xen XEN_CONFIG_EXPERT=3Dy + make -C xen KBUILD_DEFCONFIG=3D../../../../${cfg_dir}/${cfg} defconfig + make -j$(nproc) -C xen done diff --git a/automation/scripts/containerize b/automation/scripts/container= ize index 8992c67278..9d4beca4fa 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -101,7 +101,6 @@ exec ${docker_cmd} run \ -v "${CONTAINER_PATH}":/build:rw${selinux} \ -v "${HOME}/.ssh":/root/.ssh:ro \ ${SSH_AUTH_DIR:+-v "${SSH_AUTH_DIR}":/tmp/ssh-agent${selinux}} \ - ${XEN_CONFIG_EXPERT:+-e XEN_CONFIG_EXPERT=3D${XEN_CONFIG_EXPERT}} \ ${CONTAINER_ARGS} \ -${termint}i --rm -- \ ${CONTAINER} \ --=20 2.34.1 From nobody Sat Feb 7 09:35:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1657226331; cv=none; d=zohomail.com; s=zohoarc; b=Hk3Qkz1Et0/dfCaH++zmpa7SdQiwBy2W4wglyOZIg8uLgpRwYtkkCO2GdbzWZEcfjjmMd8u+3BhuJhANNXCPFJRf5j5NfsSJkjt/gGhqPgKkCbxnNUgldSg7iT9h0JadIc756U3fiG4Zg2/wTUMHajNi42yTc+JOkGPVLv30MUU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657226331; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vpI0Eg9KfzwGX1e9i4YH3hbJD+D1xrKH9eSxJgwZEeo=; b=nYZmoEh7iRIatHj02sWomeGdh+HRBJlV/vjOOHtFiph0VbAijPluBvQ+VQHm5qpdiWtBxNCSBK7WzyhACAsEEs+vwXqsi9CfNo8tJWXETWmq8/mpBnnQIG/nvxzXk2ZKnreum6o8aRnMZ++bA99jBc15oomyBRBy1iIAnSRlNqc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1657226331553926.2878437907522; Thu, 7 Jul 2022 13:38:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.363126.593510 (Exim 4.92) (envelope-from ) id 1o9YGb-0005qr-8J; Thu, 07 Jul 2022 20:38:29 +0000 Received: by outflank-mailman (output) from mailman id 363126.593510; Thu, 07 Jul 2022 20:38:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o9YGb-0005qf-4f; Thu, 07 Jul 2022 20:38:29 +0000 Received: by outflank-mailman (input) for mailman id 363126; Thu, 07 Jul 2022 20:38:28 +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 1o9YGZ-0005FX-Sw for xen-devel@lists.xenproject.org; Thu, 07 Jul 2022 20:38:28 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c08297b8-fe34-11ec-bd2d-47488cf2e6aa; Thu, 07 Jul 2022 22:38:26 +0200 (CEST) Received: by mail-ej1-x636.google.com with SMTP id r21so5625640eju.0 for ; Thu, 07 Jul 2022 13:38:27 -0700 (PDT) Received: from uni.. (adsl-142.37.6.26.tellas.gr. [37.6.26.142]) by smtp.googlemail.com with ESMTPSA id s17-20020a1709060c1100b00722e52d043dsm19344858ejf.114.2022.07.07.13.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 13:38:25 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: c08297b8-fe34-11ec-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vpI0Eg9KfzwGX1e9i4YH3hbJD+D1xrKH9eSxJgwZEeo=; b=WxNh2FmivGG996dANC5w8c6Rv5bY/hKuttQb9oEjJjOKVwIKJOWKkZxBWF365PTGk2 5q57Rto6GNdfFzRjSqSbZbOAZx91EbDMCHGEV7VAcjFRgzWfv6a4P9ApSL9B4Ibwl6r9 kA0IuGH2nBdu57t5aRMmpOnZ//QNpf0jE5MIjhxPiRnagRxhcCp8qyUYD7NKxjNQAxqR RO/YynBg+mk+Q5crOgQ4NiHUDPGET62YFsk3fZnFh2VPTHcIdtVdob3kaiXYJ0GY+sLU NO9X8I136iFY4whMMksAqhiGqCuMkjoVB6bmCkeMFhbL6Yv7qQ28vUqIWreKL19HpRWU PTRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vpI0Eg9KfzwGX1e9i4YH3hbJD+D1xrKH9eSxJgwZEeo=; b=f6CkNry7mbtbuGK8Du/4st4nI6dE2CueUIz00Kba3CT+S81SyImsEb9kmRMf448sVH ERUl8PinWa+98Os4NEUK3BByiAlWX4UCGHv6GlNHoLLa0YigngrYmnrOxDush7BMMAGa L1aJ+ehX3C04POOFVopbtGm/YEgyve0CNUkCwA8Hg6Uz0p90lXxMCiaKTRwtbaWSCKuW 28m+rso06GgILwh1ht8SbCuB1L04dEpK9BrpP94sAH7lZu5YzUR7qCxIAuretgEMyMH9 6XZLt4b/hFyMRA/W59y1+5eg4DyC955zvPBGeHX08Ud4hhQYpAdBrO+rJBsQ9kFHiwhP ZFSg== X-Gm-Message-State: AJIora+96cbRK/F+7Je+d4TCgHEko42j95G0NyS0u91lTTSYfVFNjuhG UqrRSSFywVkHLO5XYFVpF4jjDHiro4A= X-Google-Smtp-Source: AGRyM1umJab1NL2O2IU6i1UNh78+R1b4ihs9PuE1i/OvJKkN9EfPjVSVGqdQIvDG00ygXXZZp/B9rA== X-Received: by 2002:a17:907:3e86:b0:6f5:917:10cc with SMTP id hs6-20020a1709073e8600b006f5091710ccmr46875855ejc.53.1657226306309; Thu, 07 Jul 2022 13:38:26 -0700 (PDT) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Doug Goldstein , Stefano Stabellini Subject: [PATCH 2/2] automation: arm64: Create a test job for testing static allocation on qemu Date: Thu, 7 Jul 2022 23:38:03 +0300 Message-Id: <20220707203803.798317-3-burzalodowa@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220707203803.798317-1-burzalodowa@gmail.com> References: <20220707203803.798317-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1657226332702100001 Content-Type: text/plain; charset="utf-8" Add an arm subdirectory under automation/configs for the arm specific confi= gs and add a config that enables static allocation. Modify the build script to search for configs also in this subdirectory and= to keep the generated xen binary, suffixed with the config file name, as artif= act. Create a test job that - boots xen on qemu with a single direct mapped dom0less guest configured w= ith statically allocated memory - verifies that the memory ranges reported in the guest's logs are the same with the provided static memory regions For guest kernel, use the 5.9.9 kernel from the tests-artifacts containers. Use busybox-static package, to create the guest ramdisk. To generate the u-boot script, use ImageBuilder. Use the qemu from the tests-artifacts containers. Signed-off-by: Xenia Ragiadakou --- automation/configs/arm/static_mem | 3 + automation/gitlab-ci/test.yaml | 24 +++++ automation/scripts/build | 4 + automation/scripts/qemu-staticmem-arm64.sh | 114 +++++++++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 automation/configs/arm/static_mem create mode 100755 automation/scripts/qemu-staticmem-arm64.sh diff --git a/automation/configs/arm/static_mem b/automation/configs/arm/sta= tic_mem new file mode 100644 index 0000000000..84675ddf4e --- /dev/null +++ b/automation/configs/arm/static_mem @@ -0,0 +1,3 @@ +CONFIG_EXPERT=3Dy +CONFIG_UNSUPPORTED=3Dy +CONFIG_STATIC_MEMORY=3Dy \ No newline at end of file diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 42cd725a12..dc181f3777 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -205,3 +205,27 @@ qemu-smoke-x86-64-clang-pvh: - smoke - /^coverity-tested\/.*/ - /^stable-.*/ + +qemu-staticmem-arm64-gcc: + stage: test + image: registry.gitlab.com/xen-project/xen/${CONTAINER} + variables: + CONTAINER: debian:unstable-arm64v8 + script: + - ./automation/scripts/qemu-staticmem-arm64.sh 2>&1 | tee qemu-staticm= em-arm64.log + dependencies: + - debian-unstable-gcc-arm64 + - kernel-5.9.9-arm64-export + - qemu-system-aarch64-6.0.0-arm64-export + artifacts: + paths: + - qemu-staticmem.serial + - '*.log' + when: always + tags: + - arm64 + except: + - master + - smoke + - /^coverity-tested\/.*/ + - /^stable-.*/ diff --git a/automation/scripts/build b/automation/scripts/build index 21b3bc57c8..9c6196d9bd 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -83,6 +83,7 @@ fi # Build all the configs we care about case ${XEN_TARGET_ARCH} in x86_64) arch=3Dx86 ;; + arm64) arch=3Darm ;; *) exit 0 ;; esac =20 @@ -93,4 +94,7 @@ for cfg in `ls ${cfg_dir}`; do rm -f xen/.config make -C xen KBUILD_DEFCONFIG=3D../../../../${cfg_dir}/${cfg} defconfig make -j$(nproc) -C xen + if [[ ${arch} =3D=3D "arm" ]]; then + cp xen/xen binaries/xen-${cfg} + fi done diff --git a/automation/scripts/qemu-staticmem-arm64.sh b/automation/script= s/qemu-staticmem-arm64.sh new file mode 100755 index 0000000000..5b89a151aa --- /dev/null +++ b/automation/scripts/qemu-staticmem-arm64.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +base=3D(0x50000000 0x100000000) +size=3D(0x10000000 0x10000000) + +set -ex + +apt-get -qy update +apt-get -qy install --no-install-recommends u-boot-qemu \ + u-boot-tools \ + device-tree-compiler \ + cpio \ + curl \ + busybox-static + +# DomU Busybox +cd binaries +mkdir -p initrd +mkdir -p initrd/bin +mkdir -p initrd/sbin +mkdir -p initrd/etc +mkdir -p initrd/dev +mkdir -p initrd/proc +mkdir -p initrd/sys +mkdir -p initrd/lib +mkdir -p initrd/var +mkdir -p initrd/mnt +cp /bin/busybox initrd/bin/busybox +initrd/bin/busybox --install initrd/bin +echo "#!/bin/sh + +mount -t proc proc /proc +mount -t sysfs sysfs /sys +mount -t devtmpfs devtmpfs /dev +/bin/sh" > initrd/init +chmod +x initrd/init +cd initrd +find . | cpio --create --format=3D'newc' | gzip > ../initrd.cpio.gz +cd ../.. + +# XXX QEMU looks for "efi-virtio.rom" even if it is unneeded +curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom + +./binaries/qemu-system-aarch64 -nographic \ + -M virtualization=3Dtrue \ + -M virt \ + -M virt,gic-version=3D2 \ + -cpu cortex-a57 \ + -smp 2 \ + -m 8G \ + -M dumpdtb=3Dbinaries/virt-gicv2.dtb + +#dtc -I dtb -O dts binaries/virt-gicv2.dtb > binaries/virt-gicv2.dts + +# ImageBuilder +rm -rf imagebuilder +git clone https://gitlab.com/ViryaOS/imagebuilder + +echo "MEMORY_START=3D\"0x40000000\" +MEMORY_END=3D\"0x0200000000\" + +DEVICE_TREE=3D\"virt-gicv2.dtb\" + +XEN=3D\"xen-static_mem\" +XEN_CMD=3D\"console=3Ddtuart earlyprintk xsm=3Ddummy\" + +NUM_DOMUS=3D1 +DOMU_MEM[0]=3D512 +DOMU_VCPUS[0]=3D1 +DOMU_KERNEL[0]=3D\"Image\" +DOMU_RAMDISK[0]=3D\"initrd.cpio.gz\" +DOMU_CMD[0]=3D\"earlyprintk console=3DttyAMA0\" +DOMU_STATIC_MEM[0]=3D\"${base[0]} ${size[0]} ${base[1]} ${size[1]}\" + +UBOOT_SOURCE=3D\"boot.source\" +UBOOT_SCRIPT=3D\"boot.scr\"" > binaries/imagebuilder_config + +bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binarie= s/imagebuilder_config + +# Run the test +rm -f qemu-staticmem.serial +set +e +echo " virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"| \ +timeout -k 1 60 ./binaries/qemu-system-aarch64 -nographic \ + -M virtualization=3Dtrue \ + -M virt \ + -M virt,gic-version=3D2 \ + -cpu cortex-a57 \ + -smp 2 \ + -m 8G \ + -no-reboot \ + -device virtio-net-pci,netdev=3Dvnet0 -netdev user,id=3Dvnet0,tftp=3Db= inaries \ + -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin \ + -dtb ./binaries/virt-gicv2.dtb \ + |& tee qemu-staticmem.serial + +set -e + +(grep -q "Xen dom0less mode detected" qemu-staticmem.serial) || exit 1 + +for ((i=3D0; i<${#base[@]}; i++)) +do + start=3D"$(printf "0x%016x" ${base[$i]})" + end=3D"$(printf "0x%016x" $((${base[$i]} + ${size[$i]} - 1)))" + grep -q "node 0: \[mem ${start}-${end}\]" qemu-staticmem.serial + if test $? -eq 1 + then + exit 1 + fi +done + +(grep -q "BusyBox" qemu-staticmem.serial) || exit 1 + +exit 0 --=20 2.34.1