From nobody Fri Nov 29 04:55:14 2024 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=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1647981580; cv=none; d=zohomail.com; s=zohoarc; b=DCuEg03NbDmkmdaFNmumM8ijuCoV3KC9/jpbhCphRBdgRA1KprmoXSgrfmxzNnyy1aspg5QkFAyZvGKH6690wRaamP4Er1sa+Vq1um30gLR7p6e8rUxauWLdj5DNl0rOfa8caaCcknBwRfZNQe8lJqjKvqXV5DBtgONR14sk7Tc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647981580; 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=14/HvlAHYpEQdFaLoR9muAnQTGsP+XXXOZD12fXZZIg=; b=Eul+ME4VNBpdNkCU4CngD99Q3D5NBh2mr0RbCLMbYmnfq+IMYtoBcwoxoKWsoev9ft9xPe5omEi19Q5vMrMDRrcrjXWwu0wWZOG871nidsT5CdrPelIfmkMisdx9iDO56XvLpUkDFu95ljPZovwYIEX5AyISQdkk3A9vaGfBvvc= 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 1647981580205707.0489269496957; Tue, 22 Mar 2022 13:39:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.293662.498962 (Exim 4.92) (envelope-from ) id 1nWlHR-0007HL-I0; Tue, 22 Mar 2022 20:39:01 +0000 Received: by outflank-mailman (output) from mailman id 293662.498962; Tue, 22 Mar 2022 20:39:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nWlHR-0007HC-Ec; Tue, 22 Mar 2022 20:39:01 +0000 Received: by outflank-mailman (input) for mailman id 293662; Tue, 22 Mar 2022 20:38:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nWlHP-0006yG-AL for xen-devel@lists.xenproject.org; Tue, 22 Mar 2022 20:38:59 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 18dc1e7d-aa20-11ec-8fbc-03012f2f19d4; Tue, 22 Mar 2022 21:38:58 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 12354616F6; Tue, 22 Mar 2022 20:38:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 238A8C340EC; Tue, 22 Mar 2022 20:38:56 +0000 (UTC) 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: 18dc1e7d-aa20-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647981536; bh=6fcuGmN0VOLiEsFwZuvE42PfLHtwz8AS00f3BuXsHLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9TQ4LGBhNJR0BBC5r6dx7PIlZVHYtbwkrQO3XeFGEwMMwHufAibte88HpfMMfCh7 QdVugTuYYaVt2773NHkayT7ReLpxlGdeQA/ikj7JO6kxADjB2ehlYoXQLt1lxdusN/ P63wdWdh07wSRJfFTXNl/nsgLLrF7WZzkHm0S140KaO/1JBWPwGg6dvh61mUO6m6hu sS/sLV3KHrFtf92WZcvdjxz0INFlqwuuO4hkGlQCK59odIuqsJN35hJE1jRhe93J/5 1BEIvf1fly/LR2xAimJNcrSsClXnHWYHqIJc+rJeR4HEKahFz6tIYGtY/rhRbMMtZj gMktqxaQoTVsQ== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, cardoe@cardoe.com, wl@xen.org, andrew.cooper3@citrix.com, anthony.perard@citrix.com, bertrand.marquis@arm.com, Stefano Stabellini Subject: [PATCH v4 1/2] gitlab-ci: add qemu-system-arm to the existing tests-artifacts container Date: Tue, 22 Mar 2022 13:38:53 -0700 Message-Id: <20220322203854.420940-1-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1647981582411100001 Content-Type: text/plain; charset="utf-8" From: Stefano Stabellini Add qemu-system-arm to the existing test-artifacts qemu container (which doesn't get build for every iteration but only updated once in a while.) With qemu-system-arm available, we'll be able to run ARM32 tests. This patch also bumps the QEMU version to v6.0.0 for both arm32 and arm64 (the test-artifacts container is one, shared for both). Signed-off-by: Stefano Stabellini Reviewed-by: Anthony PERARD --- automation/gitlab-ci/build.yaml | 14 ++++++++++++-- automation/gitlab-ci/test.yaml | 4 ++-- ...arm64v8.dockerfile =3D> 6.0.0-arm64v8.dockerfile} | 5 +++-- 3 files changed, 17 insertions(+), 6 deletions(-) rename automation/tests-artifacts/qemu-system-aarch64/{5.2.0-arm64v8.docke= rfile =3D> 6.0.0-arm64v8.dockerfile} (95%) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index cc36428cf5..72f2a317ac 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -591,9 +591,9 @@ kernel-5.9.9-arm64-export: tags: - arm64 =20 -qemu-system-aarch64-5.2.0-arm64-export: +qemu-system-aarch64-6.0.0-arm64-export: stage: build - image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-a= arch64:5.2.0-arm64v8 + image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-a= arch64:6.0.0-arm64v8 script: - mkdir binaries && cp /qemu-system-aarch64 binaries/qemu-system-aarch= 64 artifacts: @@ -602,6 +602,16 @@ qemu-system-aarch64-5.2.0-arm64-export: tags: - arm64 =20 +qemu-system-aarch64-6.0.0-arm32-export: + stage: build + image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-a= arch64:6.0.0-arm64v8 + script: + - mkdir binaries && cp /qemu-system-arm binaries/qemu-system-arm + artifacts: + paths: + - binaries/qemu-system-arm + tags: + - arm64 =20 # x86_64 test artifacts =20 diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 47e8704df3..ec2a2e1607 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -33,7 +33,7 @@ qemu-alpine-arm64-gcc: - alpine-3.12-gcc-arm64 - alpine-3.12-arm64-rootfs-export - kernel-5.9.9-arm64-export - - qemu-system-aarch64-5.2.0-arm64-export + - qemu-system-aarch64-6.0.0-arm64-export artifacts: paths: - smoke.serial @@ -81,7 +81,7 @@ qemu-smoke-arm64-gcc: dependencies: - debian-unstable-gcc-arm64 - kernel-5.9.9-arm64-export - - qemu-system-aarch64-5.2.0-arm64-export + - qemu-system-aarch64-6.0.0-arm64-export artifacts: paths: - smoke.serial diff --git a/automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.d= ockerfile b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.do= ckerfile similarity index 95% rename from automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.do= ckerfile rename to automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dock= erfile index e105a1c636..793432d40b 100644 --- a/automation/tests-artifacts/qemu-system-aarch64/5.2.0-arm64v8.dockerfi= le +++ b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfi= le @@ -3,7 +3,7 @@ LABEL maintainer.name=3D"The Xen Project" \ maintainer.email=3D"xen-devel@lists.xenproject.org" =20 ENV DEBIAN_FRONTEND=3Dnoninteractive -ENV QEMU_VERSION=3D5.2.0 +ENV QEMU_VERSION=3D6.0.0 ENV USER root =20 RUN mkdir /build @@ -25,7 +25,7 @@ RUN apt-get update && \ tar xvJf qemu-"$QEMU_VERSION".tar.xz && \ cd qemu-"$QEMU_VERSION" && \ ./configure \ - --target-list=3Daarch64-softmmu \ + --target-list=3Darm-softmmu,aarch64-softmmu \ --enable-system \ --disable-blobs \ --disable-bsd-user \ @@ -68,6 +68,7 @@ RUN apt-get update && \ && \ make -j$(nproc) && \ cp ./build/qemu-system-aarch64 / && \ + cp ./build/qemu-system-arm / && \ cd /build && \ rm -rf qemu-"$QEMU_VERSION"* && \ apt-get autoremove -y && \ --=20 2.25.1 From nobody Fri Nov 29 04:55:14 2024 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=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1647981565; cv=none; d=zohomail.com; s=zohoarc; b=hk/mYf0PpR3Li/hcmhGJbRMlg/sjNk/EL3IBePr9RhW0C4QxfhcAVkEvN4+A3UwhvFyXUCBJvmv1LcrHO5ts66d5GiGyMzuzENfLCbXQlQA/LtraJMDglsv8iPZr6SQgVHOW4BzJ7jbnMZpgUlgjS1ijk3GHd04qsPYjlb3DKKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647981565; 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=gVnZii45DBubmC7Jhrgu/WBM4cTr2Hh2ZXUMja87pWQ=; b=BFFeuH8r2vV159yGqe5rvM5Od87q2urQXJBpYvtzr15cf90CSmfUZRZnErT4KneMmR8jZjBSe0OUOBuxQ2ZovqvxxA71oxpfbetvmrnW4zfq6FhA+THmUodn6gSBVEoQbzpDrhgqUO60fDNa7/ebemb/X0w25etzmiwLMQY5YWM= 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 16479815651551011.6948511478658; Tue, 22 Mar 2022 13:39:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.293663.498967 (Exim 4.92) (envelope-from ) id 1nWlHR-0007K6-S3; Tue, 22 Mar 2022 20:39:01 +0000 Received: by outflank-mailman (output) from mailman id 293663.498967; Tue, 22 Mar 2022 20:39:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nWlHR-0007JK-Mx; Tue, 22 Mar 2022 20:39:01 +0000 Received: by outflank-mailman (input) for mailman id 293663; Tue, 22 Mar 2022 20:39:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nWlHQ-0006yG-Af for xen-devel@lists.xenproject.org; Tue, 22 Mar 2022 20:39:00 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 194f32f1-aa20-11ec-8fbc-03012f2f19d4; Tue, 22 Mar 2022 21:38:58 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9BE18616F9; Tue, 22 Mar 2022 20:38:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4D52C340EE; Tue, 22 Mar 2022 20:38:56 +0000 (UTC) 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: 194f32f1-aa20-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647981537; bh=6BFOwCcDZyb2QPiN6A24R5iB6eqbhMTsMQW5c95Q1mU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MuWBAHp1H0ee0RCU6GJOKBlsV9CkMV/YP/7xuebuCO+JXAlSiQUqMlo0JjWnu1E6R IFk0db4yfpu1Djtdqp+sOQ1DlGN4ESp26WerEJWxOvK316G7PKcP2E8DkPHtmAuQr0 hdX5zC7N9D4vDPgcjfH51xL4k/YzskpgfCU3Bj4+LofO9rRu6YeFAbnqHewfAOg8ML oVxXccqUhJzWYo426AN3ezAwcnO8iT5A7F5OyUEMeITDQDfhhAMepLcppwZkA0bJXP PhBwp8cVTBz4NXfnfpmDEGICKh1G1cbYwlUt7Q3LUFmcaV/BIksh39Enq6uDSoQxMT eWw8R6u3e+RGg== From: Stefano Stabellini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, cardoe@cardoe.com, wl@xen.org, andrew.cooper3@citrix.com, anthony.perard@citrix.com, bertrand.marquis@arm.com, Stefano Stabellini Subject: [PATCH v4 2/2] gitlab-ci: add an ARM32 qemu-based smoke test Date: Tue, 22 Mar 2022 13:38:54 -0700 Message-Id: <20220322203854.420940-2-sstabellini@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1647981566014100003 Content-Type: text/plain; charset="utf-8" Add a minimal ARM32 smoke test based on qemu-system-arm, as provided by the test-artifacts qemu container. The minimal test simply boots Xen (built from previous build stages) and Dom0. The test needs a working kernel and minimal initrd for dom0. Instead of building our own kernel and initrd, which would mean maintaining one or two more builting scripts under automation/, we borrow a kernel and initrd from distros. For the kernel we pick the Debian Bullseye kernel, which has everything we need already built-in. However, we cannot use the Debian Bullseye initrd because it is 22MB and the large size causes QEMU to core dump. Instead, use the tiny busybox-based rootfs provided by Alpine Linux, which is really minimal: just 2.5MB. Note that we cannot use the Alpine Linux kernel because that doesn't boot on Xen. Signed-off-by: Stefano Stabellini --- Changes in v4: - improve commit message - use Debian Bullseye kernel - use Alpine Linux initrd --- automation/gitlab-ci/test.yaml | 23 ++++++++ automation/scripts/qemu-smoke-arm32.sh | 81 ++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100755 automation/scripts/qemu-smoke-arm32.sh diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index ec2a2e1607..42cd725a12 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -95,6 +95,29 @@ qemu-smoke-arm64-gcc: - /^coverity-tested\/.*/ - /^stable-.*/ =20 +qemu-smoke-arm32-gcc: + stage: test + image: registry.gitlab.com/xen-project/xen/${CONTAINER} + variables: + CONTAINER: debian:unstable-arm64v8 + script: + - ./automation/scripts/qemu-smoke-arm32.sh 2>&1 | tee qemu-smoke-arm32= .log + dependencies: + - debian-unstable-gcc-arm32 + - qemu-system-aarch64-6.0.0-arm32-export + artifacts: + paths: + - smoke.serial + - '*.log' + when: always + tags: + - arm64 + except: + - master + - smoke + - /^coverity-tested\/.*/ + - /^stable-.*/ + qemu-smoke-x86-64-gcc: stage: test image: registry.gitlab.com/xen-project/xen/${CONTAINER} diff --git a/automation/scripts/qemu-smoke-arm32.sh b/automation/scripts/qe= mu-smoke-arm32.sh new file mode 100755 index 0000000000..d554de7939 --- /dev/null +++ b/automation/scripts/qemu-smoke-arm32.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +set -ex + +export DEBIAN_FRONTENT=3Dnoninteractive +apt-get -qy update +apt-get -qy install --no-install-recommends device-tree-compiler \ + curl \ + cpio + +cd binaries +# Use the kernel from Debian +curl --fail --silent --show-error --location --output vmlinuz http://http.= us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/net= boot/vmlinuz +# Use a tiny initrd based on busybox from Alpine Linux +curl --fail --silent --show-error --location --output initrd.tar.gz https:= //dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15= .1-armhf.tar.gz + +mkdir rootfs +cd rootfs +tar xvzf ../initrd.tar.gz +find . | cpio -H newc -o | gzip > ../initrd.gz +cd .. + +kernel=3D`stat -L --printf=3D"%s" vmlinuz` +initrd=3D`stat -L --printf=3D"%s" initrd.gz` + +# For Xen, we need a couple of more node. Dump the DT from QEMU and add th= em +# 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 +./qemu-system-arm \ + -machine virt-6.0 \ + -machine virtualization=3Dtrue \ + -smp 4 \ + -m 1024 \ + -serial stdio \ + -monitor none \ + -display none \ + -machine dumpdtb=3Dvirt.dtb + +dtc -I dtb -O dts virt.dtb > virt.dts + +cat >> virt.dts << EOF +/ { + chosen { + #address-cells =3D <0x2>; + #size-cells =3D <0x2>; + stdout-path =3D "/pl011@9000000"; + xen,xen-bootargs =3D "console=3Ddtuart dtuart=3D/pl011@9000000 dom= 0_mem=3D512M bootscrub=3D0"; + xen,dom0-bootargs =3D "console=3Dtty0 console=3Dhvc0 earlyprintk clk_ign= ore_unused root=3D/dev/ram0 rdinit=3D/bin/sh init=3D/bin/sh"; + dom0 { + compatible =3D "xen,linux-zimage", "xen,multiboot-module"; + reg =3D <0x0 0x1000000 0x0 $kernel>; + }; + dom0-ramdisk { + compatible =3D "xen,linux-initrd", "xen,multiboot-module"; + reg =3D <0x0 0x3200000 0x0 $initrd>; + }; + }; +}; +EOF +dtc -I dts -O dtb virt.dts > virt.dtb + +rm -f smoke.serial +set +e +timeout -k 1 240 \ +./qemu-system-arm \ + -machine virt-6.0 \ + -machine virtualization=3Dtrue \ + -smp 4 \ + -m 1024 \ + -serial stdio \ + -monitor none \ + -display none \ + -dtb virt.dtb \ + -no-reboot \ + -kernel ./xen \ + -device loader,file=3D./vmlinuz,addr=3D0x1000000 \ + -device loader,file=3D./initrd.gz,addr=3D0x3200000 |& tee smoke.serial + +set -e +(grep -q "^/ #" smoke.serial) || exit 1 +exit 0 --=20 2.25.1