]> xenbits.xensource.com Git - xen.git/commitdiff
automation: Add arm64 test for running Xen with GICv3
authorMichal Orzel <michal.orzel@amd.com>
Tue, 23 Apr 2024 16:11:21 +0000 (18:11 +0200)
committerStefano Stabellini <stefano.stabellini@amd.com>
Wed, 24 Apr 2024 23:51:53 +0000 (16:51 -0700)
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@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
automation/gitlab-ci/test.yaml
automation/scripts/qemu-smoke-dom0less-arm64.sh

index 1e5d86763f6c40910f5cfb63c389743ba8c160db..ad249fa0a5d92ed00896c2948eb53c7c67e1fe46 100644 (file)
@@ -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:
index fc943a1a622c6cbb5233712231044759e90bf2de..292c38a561472312c858b222915ba56f010b6b7f 100755 (executable)
@@ -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 \