From nobody Fri Nov 14 21:01:24 2025 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=1760440424; cv=none; d=zohomail.com; s=zohoarc; b=e0t3yEOc9WPOE33fyWKO4E2NJw4/kOmuiyZknCyt9bETd0DbhVtXMZ3C6iXy/ifwu86UpRTLq4/ONNX7WEE+fwlROelLbDJVTau0EKvn2sdUuSWLoSOGl0XsunkidJybO2oLgV1+ZZw/J/Eu/OPyUunKcVBv7Jv2WyuAZ8NKOpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760440424; 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=kxqMBghotsNAW3z2sKbNmh6PO8mUrbQ9ykLagwcUbrI=; b=K4LJyEywHYVVa6gziHKhQaTVzzW31z9WPdnkprq8PBtjp7eT2jaEQ8luQJVeagUreROjc6iA2p9BhTbIULlGJ04b5O4CmcBnY/I5XUeOcEXi6fgL0drlsV2ARDYk79w77LI+4WUY1NTuGVY2pnetZR9HoLICWi2JUpJ7R5q3qPs= 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 176044042437332.60366252468077; Tue, 14 Oct 2025 04:13:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v8cxc-000836-GJ; Tue, 14 Oct 2025 07:12:56 -0400 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 1v8cxU-0007wJ-Ok for qemu-devel@nongnu.org; Tue, 14 Oct 2025 07:12:48 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v8cxS-00083M-Bc for qemu-devel@nongnu.org; Tue, 14 Oct 2025 07:12:48 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-b463f986f80so184462066b.2 for ; Tue, 14 Oct 2025 04:12:45 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b55d5cac037sm1102213566b.12.2025.10.14.04.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:12:39 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CA6E65FA5C; Tue, 14 Oct 2025 12:12:35 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1760440364; x=1761045164; 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=kxqMBghotsNAW3z2sKbNmh6PO8mUrbQ9ykLagwcUbrI=; b=vS9f/PMIKu7b/hHM6yztiOxk5YBy3SQGmparUaMPKf8DOJIPF/iqOoXELTgg1rzE2C 1kFZ6zqx3I/iSwIdGxVS3Q2/bLb6ZP/63dXJ+zrUAor0oNnKPOPyjkJYCAGlEJzBXRhR TDPRGqv0Us4xLSUbfOe/+wstk7+5gwvpIo+FjYmB+sQmEflOH4leifJdzknSdU2UFRQk c/stZLWdF30t3MZRO0XqNWZTqTTQjMvu6VKFnhiX6wr24O0sMPwbOzBG1euRtwt6tvgm jFxxDWX0uO+Ip1RSjrbKKoW+zz7qvy2iPjazQ1IOQmfleK5lYzcQQf24SrINwcldr7MV JdiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440364; x=1761045164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kxqMBghotsNAW3z2sKbNmh6PO8mUrbQ9ykLagwcUbrI=; b=Qhp+1QIm3kxuJ2GvFa7kTD47oZBMxVEqk5gPBFlaPgsucwdo8zwoBMqjpOV7I7/qCA F3gWZCu/FhMG/ZOI6TXZnLNZB4Nk5CnvqiddVrAR0Kj0wPLj5qKFuGSyufn6uciQW5bl /VAROHeezxoAzGXdn6ZcCd8r0531RzpNx0me9Rc29HkZEu9zYgA3x/2m8S4Rh87qCi6n 2aiob5O1r91IPqFY64uBWtgX5IINm3wKgcURVtc5GQbkAZ+VJaPr+o9SLdFdvK2tv+t4 GESuL8QZbyK628ehYm1UtRCXLZnY7ZwEFgW7mesroFN/oWmJJgep9WRnA/UXu7KCNGlU NcEg== X-Gm-Message-State: AOJu0YwWeW/IWKbtShivw0QYCW7RU1pDEevUHrEeM+O4S0+/vpwtYwhD nVT+nPHnI1VhDAyw7FTj1lhE2vLwNoo0y7Yy7HHYd969ldPAQAQPsGBsU6BL1TiRZH0= X-Gm-Gg: ASbGnctA25pOVKP5IhfhBsCknm4KiOI7CH3iQUHgxa1dkR7dqOf+2VjA4xWu5XsiREz jXoEE6mU/yANK92uEoVsoYvxKliiv1MBquAkZEqRH91Cd9zHxLZ7fZNf9dKoBODpC54HoqrNM8v LdRdnerOtb6SdYi0/xjgzrVbDZfBdiSFpI9udyv80prixwJXzb8e/PgHmxzbUiL6bGH5SnFkEYi s1w6pPFBcvKYk/XNzXU0ImajrzDYy8MbqOF3KFq6jEqbnoOg2iUJtfmXuFsK3CuWbMJZvO2Lof+ PbVvqg4MfSEBDWFNxHBfBTX2+3abbzzhcLND2UkpTlZFuFwtbWW233/VBqGnnsN6BuDVWUf95TT NyfYPx8cN4pLwW3T6IgnllOtNrMNgQAcsJFRWwhgUcKyKMQ== X-Google-Smtp-Source: AGHT+IHHJHMPJYJ5v7xglCte7DfQ1AWOsH39mv1264aNNKNlWkjYNPKN6crIFVmHw8oD8baC9uYpTQ== X-Received: by 2002:a17:907:94d0:b0:b04:7232:3e97 with SMTP id a640c23a62f3a-b50aa3921edmr2633393566b.21.1760440363678; Tue, 14 Oct 2025 04:12:43 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Paolo Bonzini , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Dmitry Osipenko , Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Akihiko Odaki , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Xu , "Michael S. Tsirkin" Subject: [PATCH 8/8] tests/functional: add GPU blob allocation test Date: Tue, 14 Oct 2025 12:12:34 +0100 Message-ID: <20251014111234.3190346-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251014111234.3190346-1-alex.bennee@linaro.org> References: <20251014111234.3190346-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::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.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: 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: 1760440428298154100 This is a very short microkernel test that initialises and then maps and unmaps a blob resource. Without the other fixes in this series it causes QEMU to hang on the unhandled unmap. Signed-off-by: Alex Benn=C3=A9e --- tests/functional/aarch64/meson.build | 1 + tests/functional/aarch64/test_gpu_blob.py | 73 +++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/functional/aarch64/test_gpu_blob.py diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch6= 4/meson.build index 5ad52f93e1d..f6ca33b2be4 100644 --- a/tests/functional/aarch64/meson.build +++ b/tests/functional/aarch64/meson.build @@ -26,6 +26,7 @@ tests_aarch64_system_thorough =3D [ 'aspeed_ast2700', 'aspeed_ast2700fc', 'device_passthrough', + 'gpu_blob', 'hotplug_pci', 'imx8mp_evk', 'kvm', diff --git a/tests/functional/aarch64/test_gpu_blob.py b/tests/functional/a= arch64/test_gpu_blob.py new file mode 100755 index 00000000000..a913d3b29c8 --- /dev/null +++ b/tests/functional/aarch64/test_gpu_blob.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +# +# Functional tests for GPU blob support. This is a directed test to +# exercise the blob creation and removal features of virtio-gpu. You +# can find the source code for microkernel test here: +# https://gitlab.com/epilys/qemu-880-repro +# +# Copyright (c) 2025 Linaro Ltd. +# +# Authors: +# Manos Pitsidianakis +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu.machine.machine import VMLaunchFailure + +from qemu_test import Asset +from qemu_test import wait_for_console_pattern +from qemu_test.linuxkernel import LinuxKernelTest + +class Aarch64VirtBlobTest(LinuxKernelTest): + + ASSET_BLOB =3D Asset('https://fileserver.linaro.org/s/kE4nCFLdQcoBF9t/' + 'download?path=3D%2Fblob-test&files=3Dqemu-880.bin', + '2f6ab85d0b156c94fcedd2c4c821c5cbd52925a2de107f8e2d= 569ea2e34e42eb') + + def test_virtio_gpu_blob(self): + + self.set_machine('virt') + self.require_accelerator("tcg") + + blob =3D self.ASSET_BLOB.fetch() + + self.vm.set_console() + + self.vm.add_args("-machine", "virt,memory-backend=3Dmem0,accel=3Dt= cg", + '-m', '4G', + '-cpu', 'max', + '-kernel', blob, + '-object', 'memory-backend-memfd,share=3Don,id=3D= mem0,size=3D4G', + '-global', 'virtio-mmio.force-legacy=3Dfalse', + '-nic', 'none', + '-device', + 'virtio-gpu-gl,hostmem=3D128M,blob=3Dtrue,venus= =3Dtrue', + '-display', 'egl-headless,gl=3Don', + '-d', 'guest_errors') + + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "old virglrenderer, blob resources unsupported" in excp.out= put: + self.skipTest("No blob support for virtio-gpu") + elif "old virglrenderer, venus unsupported" in excp.output: + self.skipTest("No venus support for virtio-gpu") + elif "egl: no drm render node available" in excp.output: + self.skipTest("Can't access host DRM render node") + elif "'type' does not accept value 'egl-headless'" in excp.out= put: + self.skipTest("egl-headless support is not available") + elif "'type' does not accept value 'dbus'" in excp.output: + self.skipTest("dbus display support is not available") + elif "eglInitialize failed: EGL_NOT_INITIALIZED" in excp.outpu= t: + self.skipTest("EGL failed to initialize on this host") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp + + self.wait_for_console_pattern('[INFO] virtio-gpu test finished') + # the test should cleanly exit + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.3