From nobody Sun Apr 12 06:05:57 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=1770997849; cv=none; d=zohomail.com; s=zohoarc; b=VAx8ik5TqfJv5ymFEy/FLP314OkT+FQ+eISeOhzwJ+5cwHONQvjEY2Wn3Yj43APRQMZJVu/Nxou1i5mSSdXsf9SMQIjokwXZxRNbA0jgqyL0Ep8d0NroaYGguRWEIVIOTqmk/Pb09iHNdYe1avXggAvEK3DQRD0+/RHssIqFfmQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770997849; 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=zC+gcSeZ99GKv5sRztPc7adAuVq0E0dT5LvwAnUamAA=; b=IJKBYoS2+vTsmb0ZRG8wiUJJgbRuj6GdHHHEDPRwjOduTg6dHFC250aJpXU3CIIeYSbGmjLXAAtekAruli75cIm+ORpJpxPCWOdiTqjR2kwHd6ZzyTBmix/qCU5uGge4AP44AOuavyPCJSljuCt9dnt6qK4+6Zb417JuH4Ww3vQ= 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 1770997849071690.4678050014847; Fri, 13 Feb 2026 07:50:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vqvPs-0001tj-Ft; Fri, 13 Feb 2026 10:49:12 -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 1vqvPr-0001sv-DO for qemu-devel@nongnu.org; Fri, 13 Feb 2026 10:49:11 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vqvPm-0007x9-Lg for qemu-devel@nongnu.org; Fri, 13 Feb 2026 10:49:10 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-6594382a264so1640760a12.1 for ; Fri, 13 Feb 2026 07:49:06 -0800 (PST) Received: from draig.lan ([185.124.0.126]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-65bad19bfc8sm774340a12.1.2026.02.13.07.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 07:49:04 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6BF0F5FC85; Fri, 13 Feb 2026 15:49:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770997745; x=1771602545; 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=zC+gcSeZ99GKv5sRztPc7adAuVq0E0dT5LvwAnUamAA=; b=x2RnXYWRrYuiW5rFX9brGT8jgHHiM3Yeq8XqjsWO2x2DR9IK33V8MU9UsBk7QRCFmF M5GQ7a8wlkzTScOA9aR0tkmFM8HSWp70oWJNMigMQJw9Few6jqHOEnCZVGUnKjhVRJKF X9YQsTPfuPy1wZTtvjRfatPMdjdTpV3Ry0Ongi3SCwoabXX3boZADSohVwUGEnXLJNk/ iRE3aZRffylxV9J2MswBwKtCugEfW3E3oo2LyXA0+SUQtVg/P00FSLMruAEdPn6gjy6E O4udj/8NnDhrHdF6xCGuBSy/3XUymfn+5F4ndZqvZgi30Fjk6X8ZK9FS0YFTVXJvwE4p Fl2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770997745; x=1771602545; 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=zC+gcSeZ99GKv5sRztPc7adAuVq0E0dT5LvwAnUamAA=; b=agiJJE1ww73h17Ah6cldXH3FE7poid2c2J2sglRgVpE3TCfQCjn0hu5EUjliH0MRHv 1J5wnDHV3B0wcPlDCu5/l7rp4fldanJK19Buojk4U8jEJc6CmWY8lCu1FW8RbczLzutl tl0lyEEnX49Idpzkh2R1iLpW89lSZUrBxz6ppS+a4pEu6fnVuz/aDa7b4iOm7DerF+Gl QZAUjySOE21gjuioRjR0ekQG0r88dUauuZal24ynCfYmXRBml2x3JVV7+CZIBubWy2DV Z2/1C6rdg099CwdPTnTozUZnopek8Y/sR5PJqaI1AZH7bTGSjZVoUtaK9BkIN17UlKyX YqKw== X-Gm-Message-State: AOJu0Yxu0/EmTSXp0li4qjT7GMfq5qgEogttLFJZtkF444qgUSl8xGUJ ZU8e28Em3sHdEbBSgCyPa7uw/oo1KoTDF8hTQaNdpnfAGmvuXWtpnTdq1/uUcCsAh2I= X-Gm-Gg: AZuq6aLrvJrGtmzsBbU25hF7uw2urzEIDH1NM3cdudWZXA/jIsixz95PT64XQq0ainV 2ezsSliAmeyIWbWlOrIyklkHEQwdbYvlBMqrINi4J3FGIY/o8G/AcZq5nlV/+AFMEyqOCJDVoss A/vasugAy6ptwD3B5UEune8SZ5FiyJsTPXdTGAZpjEjF/n91a5R4xeAnTLlfn+AyGVDn39XFAq3 PzktApVWQ2GhABSOKX0qkMuxY8Z2OucChYWfeIjVdoGJkUPV6nQb828KRmynwV1XRN+fqzCM+28 2oCqig6B2OgwRFbBuzMw2dpUHuSfca/jGdAeXo6063SRFdrzTNI68cbwlgk3EpHbFp1bprLkJnJ Y241vHoeACfPE8cV5y4yIKvIB9P0mUqczq9WH9Fqic39nSXz2SFahohtaqnv6fwGDUkyJnBE18G UiYiqsNDXCDy91tR1Zewbdrpw= X-Received: by 2002:a05:6402:42ce:b0:659:40a9:713a with SMTP id 4fb4d7f45d1cf-65bb116439fmr1070623a12.12.1770997745082; Fri, 13 Feb 2026 07:49:05 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Brad Smith , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Kyle Evans , Peter Maydell , qemu-arm@nongnu.org Subject: [PATCH 6/6] tests/functional: add Arm VBSA uefi conformance test Date: Fri, 13 Feb 2026 15:48:59 +0000 Message-ID: <20260213154859.1551283-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260213154859.1551283-1-alex.bennee@linaro.org> References: <20260213154859.1551283-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::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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: 1770997850832158500 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. Signed-off-by: Alex Benn=C3=A9e --- tests/functional/aarch64/meson.build | 1 + tests/functional/aarch64/test_virt_vbsa.py | 99 ++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100755 tests/functional/aarch64/test_virt_vbsa.py 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..53cabf9d6c5 --- /dev/null +++ b/tests/functional/aarch64/test_virt_vbsa.py @@ -0,0 +1,99 @@ +#!/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 wait_for_console_pattern, get_qemu_img, skipIfMissin= gCommands +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'Kernel panic - not syn= cing', + 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.e= fi', + '80f37d2fb86d152d95dec4d05ff099c9e47ee8a8931426= 8e08056b0e1359e1fa') + + ASSET_BSA_SHELL =3D Asset('https://github.com/ARM-software/bsa-acs/raw= /refs/heads/main/' + 'prebuilt_images/BSA_DT/v20.05_05_ALPHA/Shell.= efi', + '763e7b293fa9d1582153ea8fd0cf60e2a7a87d092d35d= 342cf9b3b697f47b588') + + 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=3Do= n,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/BOOTA= A64.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=3Dn= one,id=3Ddrive0') + 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