From nobody Mon Mar 2 10:54:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1772205550; cv=none; d=zohomail.com; s=zohoarc; b=jCSx/YopMtEz9DwLxJGvYhrTJGtwK8A8X4dERJprXwL/QTfdR7YSL9iObYD1xVtoA0kmpNxeIKbYUGRd6UU04oQA8FgG7Y/AsN8L0ZD1zIRk9mEU8McYGoBHisAicryf8kPTOAeB9IMHJYfkjVILVFLIN24VSAhZGE2fU7ZalKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772205550; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=whYwc363DlBWavn49nvRwmkQKGaamlvRPoo53Es7/go=; b=nXYbvONUD8i9MZAaj5d6hQ3AVidKIYZxP8yMplbbZkVx/oPuEExMIlEB2AGX1k3gb/8PVA7SBmMuJKZXh3xjT1QPhI17khVWUrHDW73rqVxwJqoLGxO/t1ULY/2FtPzbiCKVH3pD9682mDeBTetHBEEvWfbLV8Y9c/iSXLdoxOk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772205550919438.95646246351487; Fri, 27 Feb 2026 07:19:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvzbj-0000P0-H9; Fri, 27 Feb 2026 10:18:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvzbf-0000Nh-5s for qemu-devel@nongnu.org; Fri, 27 Feb 2026 10:18:20 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvzbb-0005lM-LZ for qemu-devel@nongnu.org; Fri, 27 Feb 2026 10:18:18 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-b8f992167dcso250062866b.1 for ; Fri, 27 Feb 2026 07:18:14 -0800 (PST) Received: from draig.lan ([185.124.0.126]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b9385836a84sm21349666b.59.2026.02.27.07.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 07:18:10 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CEDA45FA8E; Fri, 27 Feb 2026 15:18:05 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772205494; x=1772810294; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=whYwc363DlBWavn49nvRwmkQKGaamlvRPoo53Es7/go=; b=G+GgLNBaDXi4nm1Wb04dMxb3m9skf5ozCsfQQ74d6u/h+YPKyrnTIcp1VJgZO8cNjd L5ThXBU/oEeuQugfYy/X7TgRV7nBWHlKDgpQoSSOgv63HRZvabGhrzaSuz4ZlauT2kST uJ0Q/2a3MUCKSOg5I6VxFHqPpWytlWG6jWCn7Bmhkadl1wi7dkFfa8k324Oa2KWs7zKA alZZ5VoBbKmd+le90/MkWQ5GHDlFkd3BGjxFm0DpkfHe8BZlgbtqrkoovHE6TEgTaHtt 5QOKYveYVTLh+28lWEDAL/MsQg2CE18jt6T4FIyA1vdpXBOwT8sv+cgKPOHpn6BR7K+d exnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772205494; x=1772810294; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=whYwc363DlBWavn49nvRwmkQKGaamlvRPoo53Es7/go=; b=i4kcQPVvIUmUprwp6LXmMUzo2LTDzw2N3SPLrz5rOMCrHe55KoCv+d1PzkjHo7Ivix imM2oNAcWW/MU/MOjKahZMGr5vaSoqg0M3x1wmc8MaJ5CS2UZFfM0aqf/UxpUGRbVT6u SwBEQztF8cPprVd9aiEAzr293FOJecYgofq2A0Jtak0H0Ky9WieADURwx6kGyAhFom8s LEFKTzwv9SygeI8Y0iAP1ehFQr8/zw2rKLAiI3QD/VwCQQ2FKsOHt8jj4AXpslJksdAO rBYynf5XrUpSQTiFEPLT0NlIBuzMiuBV6AbugWL2iNs6cWw0wYCCcd9CmM4HceYYdbLR y2og== X-Gm-Message-State: AOJu0YzKue54REsxWOLT7CgWAYO8emxda3+cKPiEfCnDSd44ObLPWfU1 noB5/5bnfPAIlgGNmwgowiqd820fYi8flbmMKIlfesaSw7nPmpcpN7YR0CbIqNXaavc= X-Gm-Gg: ATEYQzyDzyua5w+xgP+CxohIDL1w3dEsd1k56WLyIlEo3J53xe4SBYtbktRAZAU5qCM aUrBDMH/pW+f5LRP1V8e/baNcyIcVs4zyyRoc+OR1zjkm6gOhViTtt02yTCIRJ800/O5Ijxh2Ta VwFjXYf2X4z7aYE/vzCtIdKxqgNSzVTLfIY9q4g0+l85drLVXEZlBnDKxKWeW/1aHqUx3sHaVee BeZRuqQUNbgUfdujDehRZng1ndKzXQhdSUGPNpdsyB0IEE8ANHxyKpG4NgsnsA5xOg1CD7VbeiN gxHWQi9S+ENB3hnWWNfgaTU77CG/E4ymYkGBus8ntZmuVViqJsMLRCZYmOyIy5InCRJlvp0l81L vZcUYkK5GDf6ns+H+xWw9U1xbIds8SsGfieFYichfKHu3OeApc7FQFRSo9yj631O8O0wvf0l7Bp TCKKZo5NirhBoEvJh1dmPlow5T97iDQ4vd2Q== X-Received: by 2002:a17:906:26ca:b0:b87:3c4a:e68f with SMTP id a640c23a62f3a-b9376512748mr173471766b.36.1772205493562; Fri, 27 Feb 2026 07:18:13 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mohamed Mediouni , Pierrick Bouvier , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 7/7] tests/functional: add Arm VBSA uefi conformance test Date: Fri, 27 Feb 2026 15:18:04 +0000 Message-ID: <20260227151805.2335641-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260227151805.2335641-1-alex.bennee@linaro.org> References: <20260227151805.2335641-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772205565082158500 The VBSA test is a subset of the wider Arm architecture compliance suites (ACS) which validate machines meet particular minimum set of requirements. The VBSA is for virtual machines so it makes sense we should check the -M virt machine is compliant. Fortunately there are prebuilt binaries published via github so all we need to do is build an EFI partition and place things in the right place. There are some additional Linux based tests which are left for later. Reviewed-by: Mohamed Mediouni Reviewed-by: Pierrick Bouvier Message-ID: <20260226185303.1920021-8-alex.bennee@linaro.org> Signed-off-by: Alex Benn=C3=A9e diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch6= 4/meson.build index 49eca120589..7ea8c22b048 100644 --- a/tests/functional/aarch64/meson.build +++ b/tests/functional/aarch64/meson.build @@ -46,6 +46,7 @@ tests_aarch64_system_thorough =3D [ 'tuxrun', 'virt', 'virt_gpu', + 'virt_vbsa', 'xen', 'xlnx_versal', ] diff --git a/tests/functional/aarch64/test_virt_vbsa.py b/tests/functional/= aarch64/test_virt_vbsa.py new file mode 100755 index 00000000000..1dd4cecde1e --- /dev/null +++ b/tests/functional/aarch64/test_virt_vbsa.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +# +# Functional test that runs the Arm VBSA conformance tests. +# +# Copyright (c) 2026 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import shutil +from subprocess import check_call, DEVNULL + +from qemu_test import QemuSystemTest, Asset +from qemu_test import get_qemu_img, skipIfMissingCommands +from qemu_test import wait_for_console_pattern +from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait + + +@skipIfMissingCommands("mformat", "mcopy", "mmd") +class Aarch64VirtMachine(QemuSystemTest): + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + timeout =3D 360 + + def wait_for_console_pattern(self, success_message, vm=3DNone): + wait_for_console_pattern(self, success_message, + failure_message=3D'FAILED', + vm=3Dvm) + + ASSET_VBSA_EFI =3D Asset( + 'https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main' + '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Vbsa.efi', + '80f37d2fb86d152d95dec4d05ff099c9e47ee8a89314268e08056b0e1359e1fa') + + ASSET_BSA_SHELL =3D Asset( + 'https://github.com/ARM-software/sysarch-acs/raw/refs/heads/main' + '/prebuilt_images/VBSA/v25.12_VBSA_0.7.0/Shell.efi', + 'e526604f0d329b481c6a1f62f7a0db8ea24ce8178b2c6abda8e247425f38775c') + + def test_aarch64_vbsa_uefi_tests(self): + """ + Launch the UEFI based VBSA test from an EFI file-system + """ + + self.vm.set_console() + + # virt machine wi + self.set_machine('virt') + self.vm.add_args('-M', 'virt,gic-version=3Dmax,virtualization=3Don= ') + self.vm.add_args('-cpu', 'max', '-m', '1024') + + # We will use the QEMU firmware blobs to boot + code_path =3D self.build_file('pc-bios', 'edk2-aarch64-code.fd') + vars_source =3D self.build_file('pc-bios', 'edk2-arm-vars.fd') + vars_path =3D self.scratch_file('vars.fd') + shutil.copy(vars_source, vars_path) + + self.vm.add_args('-drive', + f'if=3Dpflash,format=3Draw,readonly=3Don,file=3D{= code_path}') + self.vm.add_args('-drive', f'if=3Dpflash,format=3Draw,file=3D{vars= _path}') + + # Build an EFI FAT32 file-system for the UEFI tests + vbsa_efi =3D self.ASSET_VBSA_EFI.fetch() + bsa_shell =3D self.ASSET_BSA_SHELL.fetch() + + img_path =3D self.scratch_file('vbsa.img') + qemu_img =3D get_qemu_img(self) + check_call([qemu_img, 'create', '-f', 'raw', img_path, '64M'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + check_call(['mformat', '-i', img_path, '-v', 'VBSA', '::'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + check_call(['mmd', '-i', img_path, '::/EFI'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + check_call(['mmd', '-i', img_path, '::/EFI/BOOT'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + check_call(['mcopy', '-i', img_path, bsa_shell, + '::/EFI/BOOT/BOOTAA64.EFI'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + check_call(['mcopy', '-i', img_path, vbsa_efi, '::/Vbsa.efi'], + stdout=3DDEVNULL, stderr=3DDEVNULL) + + self.vm.add_args('-drive', + f'file=3D{img_path},format=3Draw,if=3Dnone,id=3Dd= rive0') + self.vm.add_args('-device', 'virtio-blk-pci,drive=3Ddrive0') + + self.vm.launch() + + # wait for EFI prompt + self.wait_for_console_pattern('Shell>') + + # Start the VBSA tests + ec_and_wait(self, "FS0:Vbsa.efi", 'VBSA Architecture Compliance Su= ite') + + # could we parse the summary somehow? + + self.wait_for_console_pattern('VBSA tests complete. Reset the syst= em.') + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.47.3