[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] automation: Add arm64 test for running Xen with GICv3


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 23 Apr 2024 18:11:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r2zWqE04jldfd294CAby8dj98qrqQ+RxFMatI9jhagI=; b=oclH5efEiNTlQywMfRD28meMUxm8nkPJwzzBcNzFAK/xWWicRxA13134tcKvSoJ6w+Xg8EGj+U0kKIvPJQCO0JhhJBQ4Ey1vV7dyUfyiDzCpeu7PuLlcm1lVmqH97xJeMGWf9W8y3Vftvy427eC0MYuGGTdCXa+BK0+PBnuJJOpYAaXJ5ZbKmNGHjnjvBCytG0x+8JWNKnMi1oRzsDahqsNxohzMtdY9/9flcXYBYKweI9WR77/4XlG09v26iqZiLOuQ/hnaptkPzyQNbdRA71ElaQXeBbrSsJoeGxvaK3r23pAlg+quoTotQZCF1S3OEiI08VYec5XtpWhfhf6eJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GL1MXw3v3krDKeXNohm5oVubMUFY4YgPWIAb6SBNxqgipah2RfAHj+ET9aWj72uBakS0OfNbWdQtADLXzMvU0w+e4dAycuqGVtE0BrJexZxG3V/fiBMpjPLXOhnINIPE9vc8aE3I7cvy1VYLd9t7FCx0Trg0fwnJxbSnQMrmMNq1EzCA02lGUpardRueam+Mc5Uyk9VssKXNH9V13M33js4OXEi32d+C/PeGkiYboqhQw/r/QVBsGXXATHEpkV4bOncQCvxPUzts8xc0/MQtjIzNwKfu7K8JJiTGGBZCsPqdPCJXId+jzU1KwgG8gdsgT4dkblb6MCCbfvm4ADFgfg==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 23 Apr 2024 16:11:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

At the moment, all the Arm64 Qemu tests use GICv2 which is the default
GIC version used by Qemu. Improve the coverage by adding a new test in
which Qemu will be configured to have GICv3.

Rename host device tree name to "virt.dtb" to be GIC version agnostic.
Use "gic-version" Qemu option to select the version to use. Unless the
test variant is set to "gicv3", version 2 will be used.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 automation/gitlab-ci/test.yaml                |  8 ++++++++
 .../scripts/qemu-smoke-dom0less-arm64.sh      | 19 ++++++++++++++-----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 1e5d86763f6c..ad249fa0a5d9 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -255,6 +255,14 @@ qemu-smoke-dom0less-arm64-gcc-debug:
     - *arm64-test-needs
     - alpine-3.18-gcc-debug-arm64
 
+qemu-smoke-dom0less-arm64-gcc-debug-gicv3:
+  extends: .qemu-arm64
+  script:
+    - ./automation/scripts/qemu-smoke-dom0less-arm64.sh gicv3 2>&1 | tee 
${LOGFILE}
+  needs:
+    - *arm64-test-needs
+    - alpine-3.18-gcc-debug-arm64
+
 qemu-smoke-dom0less-arm64-gcc-debug-staticmem:
   extends: .qemu-arm64
   script:
diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh 
b/automation/scripts/qemu-smoke-dom0less-arm64.sh
index fc943a1a622c..292c38a56147 100755
--- a/automation/scripts/qemu-smoke-dom0less-arm64.sh
+++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh
@@ -4,6 +4,9 @@ set -ex
 
 test_variant=$1
 
+# Default GIC version
+gic_version="2"
+
 if [ -z "${test_variant}" ]; then
     passed="ping test passed"
     domU_check="
@@ -66,16 +69,22 @@ if [[ "${test_variant}" == "earlyprintk" ]]; then
     passed="\- Ready \-"
 fi
 
+if [[ "${test_variant}" == "gicv3" ]]; then
+    gic_version=3
+    passed="${test_variant} test passed"
+    domU_check="echo \"${passed}\""
+fi
+
 # 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 \
    -machine virtualization=true \
-   -cpu cortex-a57 -machine type=virt \
+   -cpu cortex-a57 -machine type=virt,gic-version=$gic_version \
    -m 2048 -smp 2 -display none \
-   -machine dumpdtb=binaries/virt-gicv2.dtb
+   -machine dumpdtb=binaries/virt.dtb
 
 # XXX disable pl061 to avoid Linux crash
-fdtput binaries/virt-gicv2.dtb -p -t s /pl061@9030000 status disabled
+fdtput binaries/virt.dtb -p -t s /pl061@9030000 status disabled
 
 # Busybox
 mkdir -p initrd
@@ -138,7 +147,7 @@ cd ..
 echo 'MEMORY_START="0x40000000"
 MEMORY_END="0x50000000"
 
-DEVICE_TREE="virt-gicv2.dtb"
+DEVICE_TREE="virt.dtb"
 XEN="xen"
 DOM0_KERNEL="Image"
 DOM0_RAMDISK="dom0-rootfs.cpio.gz"
@@ -200,7 +209,7 @@ echo "  virtio scan; dhcp; tftpb 0x40000000 boot.scr; 
source 0x40000000"| \
 timeout -k 1 240 \
 ./binaries/qemu-system-aarch64 \
     -machine virtualization=true \
-    -cpu cortex-a57 -machine type=virt \
+    -cpu cortex-a57 -machine type=virt,gic-version=$gic_version \
     -m 2048 -monitor none -serial stdio \
     -smp 2 \
     -no-reboot \
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.