From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048698; cv=none; d=zohomail.com; s=zohoarc; b=YVKIZZUXmrLBHr1/43mVzaVkB4z1a7EGfUCYY36I5hcWeZeFrNtYuPxkPXeAVeljmd8+nrijOUkHVAY4CTp+jOIP5eWKhLPvCOe+embWfHlGV2h6Js941EbYsKI+RDMgVQUXXicsHN2vFfZuaekZ+2elPGN39sBOIlwMVysjvmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048698; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=zJWoGpGBb9XoVGl1zEB1CPuzVYBaioPmWvxlvBAi+gE=; b=R/8BVbpTJJrb9wixE/fU5iuv7rtAcqueuDMe3q9BdLlXX1RTcIoarzZaX0SRkGJzMyEkuTaYBE2vcaPYqUdNsF6EnD8rnITc4eCdcDl0sJPYBKiQ0qAe1Ox/9nHI41yU7t11ye7ksW2HeMMIyqN+gKSAZdRSFg6GcaYhS4fjcwY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048698966349.51459892099797; Wed, 26 May 2021 10:04:58 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-564-iT-wEGhtNACWX5mmhcvZig-1; Wed, 26 May 2021 13:04:56 -0400 Received: by mail-wr1-f69.google.com with SMTP id x10-20020adfc18a0000b029010d83c83f2aso608784wre.8 for ; Wed, 26 May 2021 10:04:55 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id n10sm20650630wrw.37.2021.05.26.10.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zJWoGpGBb9XoVGl1zEB1CPuzVYBaioPmWvxlvBAi+gE=; b=VD0t+iE1bT/SobeHZDXkgefnUQbm1HIfOE2nm0IVdWiE50qxBKT8ccPYL2Xi1GnUT8NLED YGyC9uog3p+eVnJC9IcJPCEEZSFNtCpxf5vHPQ82DXPs/4zKWvRHnC/VWnOsBOc/Hp/4/D UxZQUwFsdCa/H+4e02TQSH33B88km6A= X-MC-Unique: iT-wEGhtNACWX5mmhcvZig-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zJWoGpGBb9XoVGl1zEB1CPuzVYBaioPmWvxlvBAi+gE=; b=Arp5H3MZ/+2tfHzEmXRlnJf0IK2PgP8pe6Rkp6nluuYXn7hkBXWa/YHbhPkdXm1l6P 3hXPw8fOhJ+cQjyTiYFxnuDII1rtHDQG3jiqb15XTmCN14VgGPdcgee1E4TDK0STfuVE kJN+fam6i6347sTQVCkAzkaHvpPc5xmQL7j59BMFd95iGZvsudKKr0KUVdOFiBJk6gNs xQkWKAh/igrNVE6g2XZ1x96wjPEvhHIF1TvmC9FhV/kWQ2vhgZpIebbhCdDPgdkjHCv6 KDMNcoB39qr2ZHNUXk8f0PRYqD3NXSbR22OCAJ1+24J5dcmkRNDgE0tytJI8o7WX4lLw a/dA== X-Gm-Message-State: AOAM532uy+eJMPm+xNcofom3l4OQ0/V7/RNrBgr+HCoZjRCuL+Het88b R9VC9EuylWsNtit5Xvd+ksgyUwWe73oWKVi+9nDgK+JvxvouXTr77q4K1PMJJVJOG5JsZGD1T7h HNakI1BR1/dV95w== X-Received: by 2002:a1c:f016:: with SMTP id a22mr12679074wmb.65.1622048694957; Wed, 26 May 2021 10:04:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoRr4qsueZR1YBjBWEhnIEDlIbwUS5WQiHRtKfPxFjsuOY5TMi2TkOJm3hfc7s5i2b1uLjig== X-Received: by 2002:a1c:f016:: with SMTP id a22mr12679045wmb.65.1622048694817; Wed, 26 May 2021 10:04:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v8 01/12] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section Date: Wed, 26 May 2021 19:04:21 +0200 Message-Id: <20210526170432.343588-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We want the ARM maintainers and the qemu-arm@ list to be notified when this file is modified. Add an entry to the 'ARM TCG CPUs' section in the MAINTAINERS file. Acked-by: Andrew Jones Reviewed-by: Thomas Huth Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index a77f2465694..52757b08540 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -156,6 +156,7 @@ S: Maintained F: target/arm/ F: tests/tcg/arm/ F: tests/tcg/aarch64/ +F: tests/qtest/arm-cpu-features.c F: hw/arm/ F: hw/cpu/a*mpcore.c F: include/hw/cpu/a*mpcore.h --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048703; cv=none; d=zohomail.com; s=zohoarc; b=mUkl/FwybO+Km9GcQrp2r1wvO0wBqPz4oMGhqfiUFKSHnqtywIw2hvMyuKIaREFEjrI9aXCtB7ZKMm9q/EyQumSURf02zbBdFfaa02jadBjA/upPZ0Iq+BCaEWbGbpy04187UtcbtF7tJouNSwiDywQzFI2p6l7lE0KWdN+hhc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048703; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=3uXX+K1GXf7TrWdaqri3KbXM16p7ZXQ8jRKVT3E8l+g=; b=DXz5nGjVzG8nir4ymxm0pqywZAGiQ5QU0q2F1+uMjAtsmNYFD1ImN5Zg1cBipvrTiiyC1NCz8GmF+oVzUMTcATv1YqSFqKTF60J7NDzXh7MUuBj/PmFf03j7CC3ilPv6Mgmh+2peJRwTlvSW+2RXV70SyJao5oUJKeuapWWbexw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048703668191.311754181403; Wed, 26 May 2021 10:05:03 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-5WnnXMLWMJSoJ5Hm9YSPzg-1; Wed, 26 May 2021 13:05:01 -0400 Received: by mail-wm1-f71.google.com with SMTP id j71-20020a1c234a0000b0290192d5ad58d9so387670wmj.4 for ; Wed, 26 May 2021 10:05:00 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id w12sm20326986wrt.16.2021.05.26.10.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3uXX+K1GXf7TrWdaqri3KbXM16p7ZXQ8jRKVT3E8l+g=; b=MADN760r1zlu8MIHaY+S0AJDP7SvM0xNcNuvLM0EKilnJ9MDNATV3ftLObVxbKs+al3/Z8 r3OWv8/r3lxbt+osjSX+3Fl31wSSK5RRAg8ig3kxTRAA+rBJkqSS05esh2gQ8WUT1aS2KV uouj9mIBNtheXxDZTsF77TyCjJHm3c4= X-MC-Unique: 5WnnXMLWMJSoJ5Hm9YSPzg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3uXX+K1GXf7TrWdaqri3KbXM16p7ZXQ8jRKVT3E8l+g=; b=byHUkIUgrvmY9dHeJwDgWzruRRWatxayjFns29tAZUnfEEbXvLnFL0K6QrAL4oAFA4 2PC2XtIOuXZO3HpIZrJZ5Z5InNndijFHTC4nDdoVgvwUQpiv9g+fzR0Dz1Empx7K7vqO IXdiv5CytRLn4jgzoGbgC5Z2x4jMf0lxamV370GnOSx6k7CorQtEXdxH6i++YwgzKSEj TKJhfva91bxsJyig9K7KdI6/fTM+l37/qubrMNVz31e5Kt/BEgOpNdWG9T13KXo0rqja 1uoEKfFTx+mdCtyM5VpimnJc5kDp/Ab1SzhNtYO0NDdKOkrNNrVLxPADA0xH64KY8q0Z y7bQ== X-Gm-Message-State: AOAM5315KKowAHaFeCGs2zxc4sPoZCoIwen7PBG3rKWihAgKXbP+EOGp faNuQg1mSv9T3O+/1tgN4Xi/dzBOJfRt2I3m19bfydK0QCS4sHHERvSbVeASs/TaI0EGlXag2zx 0OOVlAIK7Cr0csQ== X-Received: by 2002:adf:fa42:: with SMTP id y2mr33945023wrr.12.1622048699867; Wed, 26 May 2021 10:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1cnHw/E71Lh8KfQ4kl/CRqEG9TJdCE27goJKc5KOzwuECBffF+uGm07qXVlNgGBOvKjL72Q== X-Received: by 2002:adf:fa42:: with SMTP id y2mr33945011wrr.12.1622048699726; Wed, 26 May 2021 10:04:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow , Marcel Apfelbaum Subject: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command Date: Wed, 26 May 2021 19:04:22 +0200 Message-Id: <20210526170432.343588-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Introduce the 'query-accels' QMP command which returns a list of built-in accelerator names. - Accelerator is a QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Currently the common structure base provides the name of the accelerator, while the specific part is empty, but each accelerator can expand it. - 'query-accels' QMP command returns a list of @AcceleratorInfo For example on a KVM-only build we get: { "execute": "query-accels" } { "return": [ { "name": "qtest" }, { "name": "kvm" } ] } Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin --- v8: - Include code snippet from Markus adding to machine-target.json to be able to use enum values or union branches conditional. - Use accel_find() on enum to be sure the accelerator is enabled at runtime (chat with jsnow / eblake). Cc: Eric Blake Cc: John Snow Cc: Markus Armbruster --- qapi/machine-target.json | 54 ++++++++++++++++++++++++++++++++++++++++ accel/accel-qmp.c | 32 ++++++++++++++++++++++++ accel/meson.build | 2 +- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 accel/accel-qmp.c diff --git a/qapi/machine-target.json b/qapi/machine-target.json index e7811654b72..586a61b5d99 100644 --- a/qapi/machine-target.json +++ b/qapi/machine-target.json @@ -329,3 +329,57 @@ ## { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'], 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386= ) || defined(TARGET_S390X) || defined(TARGET_MIPS)' } + +## +# @Accelerator: +# +# An enumeration of accelerator names. +# +# Since: 6.1 +## +{ 'enum': 'Accelerator', + 'data': [ + { 'name': 'hax', 'if': 'defined(CONFIG_HAX)' }, + { 'name': 'hvf', 'if': 'defined(CONFIG_HVF)' }, + { 'name': 'kvm', 'if': 'defined(CONFIG_KVM)' }, + { 'name': 'qtest' }, + { 'name': 'tcg', 'if': 'defined(CONFIG_TCG)' }, + { 'name': 'whpx', 'if': 'defined(CONFIG_WHPX)' }, + { 'name': 'xen', 'if': 'defined(CONFIG_XEN_BACKEND)' } ] } + +## +# @AcceleratorInfo: +# +# Accelerator information. +# +# @name: The accelerator name. +# +# Since: 6.1 +## +{ 'struct': 'AcceleratorInfo', + 'data': { 'name': 'Accelerator' } } + +## +# @query-accels: +# +# Get a list of AcceleratorInfo for all built-in accelerators. +# +# Returns: a list of @AcceleratorInfo describing each accelerator. +# +# Since: 6.1 +# +# Example: +# +# -> { "execute": "query-accels" } +# <- { "return": [ +# { +# "name": "qtest" +# }, +# { +# "name": "kvm" +# } +# ] } +# +## +{ 'command': 'query-accels', + 'returns': ['AcceleratorInfo'] } diff --git a/accel/accel-qmp.c b/accel/accel-qmp.c new file mode 100644 index 00000000000..0098297caa5 --- /dev/null +++ b/accel/accel-qmp.c @@ -0,0 +1,32 @@ +/* + * QEMU accelerators, QMP commands + * + * Copyright (c) 2021 Red Hat Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/accel.h" +#include "qapi/qapi-types-machine-target.h" +#include "qapi/qapi-commands-machine-target.h" + +AcceleratorInfoList *qmp_query_accels(Error **errp) +{ + AcceleratorInfoList *list =3D NULL, **tail =3D &list; + + for (Accelerator accel =3D 0; accel < ACCELERATOR__MAX; accel++) { + AcceleratorInfo *info; + + if (!accel_find(Accelerator_str(accel))) { + /* Accelerator available at build time but not at runtime. */ + continue; + } + + info =3D g_new0(AcceleratorInfo, 1); + info->name =3D accel; + QAPI_LIST_APPEND(tail, info); + } + + return list; +} diff --git a/accel/meson.build b/accel/meson.build index b44ba30c864..7a48f6d568d 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -1,4 +1,4 @@ -specific_ss.add(files('accel-common.c')) +specific_ss.add(files('accel-common.c', 'accel-qmp.c')) softmmu_ss.add(files('accel-softmmu.c')) user_ss.add(files('accel-user.c')) =20 --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048713; cv=none; d=zohomail.com; s=zohoarc; b=byYb613bj7WtvmrpmvwRBTW2qqPbGfaRIyrQRcYHcVsroQEiWaCCAh5Kx43w4fAiSoMosTHWXCDF0j1BipAVOqm/WUjNoztqVIqrKzW9WIH9xE9Qijp+rk+JB7fK4afY/eUCUk48eRn7E3U1EZXTNJ7apZ9/gPlA8qxV0Cil0Zg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048713; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tsozEC/O65XrXttGJnvmQubqaZycdAh0e//OeWpacrI=; b=SR0xjvomqBgiYkFSWA0DymUr6GFECkagroYhiBKvZ/QtQDS+G5p1OIPsIy6+Mzb9JnNvBGidw4tcwFXEz8o1FpbRgPoXJg9RNOwXM76eMuzOkAkamsetThC+/nzIex2+fmAAvdAeMn1yKxq1TwEXrq1BJLOLdvNG+Lfkx6gXIcg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048713797659.359890340543; Wed, 26 May 2021 10:05:13 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-ER4A1RhnMKCUWdsqxzqRHA-1; Wed, 26 May 2021 13:05:11 -0400 Received: by mail-wr1-f72.google.com with SMTP id h22-20020adfa4d60000b029011244156c68so596011wrb.13 for ; Wed, 26 May 2021 10:05:10 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id p2sm21017502wrj.10.2021.05.26.10.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tsozEC/O65XrXttGJnvmQubqaZycdAh0e//OeWpacrI=; b=ApDg/FL51dMVaRqM/ClYXzEpGmWZCS+emYnb+s/tifYDI0dJZtu5maadojoWIxw/M2NRMX dvmtaPuvC3UAL+kTVax8Kicr0AsIls9aLEL2+vrvJBp84f+XAuZxZcKevmYaxFQnZj2df1 1EXIJmmngwE+1zC2AHXHiFHY6+0XkjE= X-MC-Unique: ER4A1RhnMKCUWdsqxzqRHA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tsozEC/O65XrXttGJnvmQubqaZycdAh0e//OeWpacrI=; b=fd8Rk6IIJAT6jZEzvhO0Fy5U+IczmamVs2Q+0mJEKWY5Kxn4BHb70LK/DceWbK4ShE KKXtqe6zfOL85Olfsh4NwQ1wts0veC4EYeRuC9Ig5hZiz6cgwFZtpyu7qNvWaB1L7Cxm rABOgW2F+w0FECVA1eDQdCjjMY+cFPLr+N7Q+pTCl74blMc6aa1wip/5B66nX06ulCgp urEDsgYt6fa3Uhr1skbdTBWJUh4cazymCHPVWr91n7zOOTT3XTQrt8FT6vatMk8B+/Ro Ugptx4BdQFXYCF2Bno10iE7U2qwYfNNlR1FKEl26IXU2ICCEuGhRhLSZKGHSjlBKsGz2 5CJA== X-Gm-Message-State: AOAM533s4U/XECiPcUAj/xacl2F85rt84mvOhZGhiCODQe1NYEfOGk1z T8fpwLxwwtQKFtCKwoEgVQDALl+o3NiTfBjDa9FUUNmIltslsXq29O9UfFtwZwUPYv0J/txdLC+ 0+dtnV76dl64wLQ== X-Received: by 2002:a1c:f30a:: with SMTP id q10mr30088623wmq.138.1622048709960; Wed, 26 May 2021 10:05:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdUHV0TwEgMp9/a0pLsB6U6jSNoUBBCYInmUfTEf71eMiyFKmsXsugqLhQmeAm3ljYZwYUsw== X-Received: by 2002:a1c:f30a:: with SMTP id q10mr30088602wmq.138.1622048709808; Wed, 26 May 2021 10:05:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 03/12] qtest: Add qtest_has_accel() method Date: Wed, 26 May 2021 19:04:23 +0200 Message-Id: <20210526170432.343588-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Introduce the qtest_has_accel() method which allows a runtime query on whether a QEMU instance has an accelerator built-in. Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/libqos/libqtest.h | 8 ++++++++ tests/qtest/libqtest.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h index a68dcd79d44..d80c618c18d 100644 --- a/tests/qtest/libqos/libqtest.h +++ b/tests/qtest/libqos/libqtest.h @@ -763,6 +763,14 @@ void qmp_expect_error_and_unref(QDict *rsp, const char= *class); */ bool qtest_probe_child(QTestState *s); =20 +/** + * qtest_has_accel: + * @accel_name: Accelerator name to check for. + * + * Returns: true if the accelerator is built in. + */ +bool qtest_has_accel(const char *accel_name); + /** * qtest_set_expected_status: * @s: QTestState instance to operate on. diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 825b13a44c7..6bda6e1f331 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -393,6 +393,35 @@ QTestState *qtest_init_with_serial(const char *extra_a= rgs, int *sock_fd) return qts; } =20 +bool qtest_has_accel(const char *accel_name) +{ + bool has_accel =3D false; + QDict *response; + QList *accels; + QListEntry *accel; + QTestState *qts; + + qts =3D qtest_initf("-accel qtest -machine none"); + response =3D qtest_qmp(qts, "{'execute': 'query-accels'}"); + accels =3D qdict_get_qlist(response, "return"); + + QLIST_FOREACH_ENTRY(accels, accel) { + QDict *accel_dict =3D qobject_to(QDict, qlist_entry_obj(accel)); + const char *name =3D qdict_get_str(accel_dict, "name"); + + if (g_str_equal(name, accel_name)) { + has_accel =3D true; + break; + } + } + qobject_unref(response); + + qtest_quit(qts); + + return has_accel; +} + + void qtest_quit(QTestState *s) { qtest_remove_abrt_handler(s); --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048726; cv=none; d=zohomail.com; s=zohoarc; b=jphrfe99XRb1jvvzTDI0tjAsDWMQN8Pl7c6Ud/hE0q7X99UcF4xsb7oFyNseFh5Vx2XeJ0oN785Ry94MsxmJzY+m/BZ8DtsixqtR6CjTE81ZIMEFaIzbU8PHIV0DkSD0z+j/X/QKozrCYFyiyFi47r8C7ksPWadiVhPexI6L4ys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048726; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=MeNb2Atwfh/sX8kxLzvRexJijoqF1JUDJOimaLT3mRk=; b=XVbj4EuSLfkhKMFkhYYa4AE/VzP5IwLi4IQxaK15c1RlyDofeo/QXGhkF5GKABh2EU9/a14OzNaCrhR1emCfCbZRNPROqZ6K+wuXZYBRYGRHisp1gAhACfMn8BNgnSYGILCEeWcBl+x40ADIpk6/+z7IbzXosQVx1UbYhX6m7E0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048726035541.0004072712496; Wed, 26 May 2021 10:05:26 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-558-rOr_zlksMgCFqlOMQ3Iylg-1; Wed, 26 May 2021 13:05:21 -0400 Received: by mail-wr1-f70.google.com with SMTP id f15-20020adfdb4f0000b02901141a0606bdso592924wrj.17 for ; Wed, 26 May 2021 10:05:21 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id y3sm20531104wrh.28.2021.05.26.10.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MeNb2Atwfh/sX8kxLzvRexJijoqF1JUDJOimaLT3mRk=; b=fdtZgqlnlKr0E/14/nAtTWNgPUtDxesh9CZ2u4nU4Cl80kqwr7BGToRGrN6FjNPaUGuviZ +aVuLPaXh9fGyOr19+wA1DNz+HESGJJ+s+jmEZ1IzCLTVMFewR+3olxDfRXIfY2iRLOH02 GnBng2V+9V8/vja0355+bzaOKERrIyw= X-MC-Unique: rOr_zlksMgCFqlOMQ3Iylg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MeNb2Atwfh/sX8kxLzvRexJijoqF1JUDJOimaLT3mRk=; b=CN85NssTNNwM78LFPMEgIWbJVMOq1dUQHAUXBUqPTL8ujgR6EAf7F/X6SwHwORvr3r yELNze5j/XwPYTDp6ZtVUP7ziW6RchoTxPxbKKtsMnQsabBeF8UazCRMR8bFGOyzuOsI c9D0+d1atyLD+/2ih1398EsWQ3rGJDXVODEWPGSTLVk1K7GCcdLyo9dzx/yGk9is3njx jrH3XnLka8xtgVe42ZyGhBkwJLlCylaj+wBJkX/RZ2HCsUu6n5v5hArY9MzCJc/50hUH 89UGGNQCC9kevOJSusTBDngz7nzRzqq0izC4nvyVHfr8Hrdu9SxMsphsOIYob8OuYWcA WEFQ== X-Gm-Message-State: AOAM533T4lvPSPkEc39B0SLd9HYZzbxsJJmfUoX3A0fu/0f3iFynVJCf lABn0VjLeEA7Qd+CV1dSvY2L6WCPtAHFLHCiyohpkUaC91pOpqb/hp8Xs+3dBhO526OE9NP7GDT dZaPhzaEv54QjKQ== X-Received: by 2002:a5d:59a4:: with SMTP id p4mr35039630wrr.248.1622048720135; Wed, 26 May 2021 10:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxae93qVMDwIUT5mL++yA99Wuz3sl1Pc1mHn7RTJgcPR9zNZyYvI9WXW24TycHPczc6T41tLQ== X-Received: by 2002:a5d:59a4:: with SMTP id p4mr35039606wrr.248.1622048719923; Wed, 26 May 2021 10:05:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Claudio Fontana , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 04/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM Date: Wed, 26 May 2021 19:04:24 +0200 Message-Id: <20210526170432.343588-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Use the recently added generic qtest_has_accel() method to check if KVM is available. Suggested-by: Claudio Fontana Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 8252b85bb85..7f4b2521277 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -26,21 +26,6 @@ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" =20 -static bool kvm_enabled(QTestState *qts) -{ - QDict *resp, *qdict; - bool enabled; - - resp =3D qtest_qmp(qts, "{ 'execute': 'query-kvm' }"); - g_assert(qdict_haskey(resp, "return")); - qdict =3D qdict_get_qdict(resp, "return"); - g_assert(qdict_haskey(qdict, "enabled")); - enabled =3D qdict_get_bool(qdict, "enabled"); - qobject_unref(resp); - - return enabled; -} - static QDict *do_query_no_props(QTestState *qts, const char *cpu_type) { return qtest_qmp(qts, QUERY_HEAD "'model': { 'name': %s }" @@ -493,14 +478,6 @@ static void test_query_cpu_model_expansion_kvm(const v= oid *data) =20 qts =3D qtest_init(MACHINE_KVM "-cpu max"); =20 - /* - * These tests target the 'host' CPU type, so KVM must be enabled. - */ - if (!kvm_enabled(qts)) { - qtest_quit(qts); - return; - } - /* Enabling and disabling kvm-no-adjvtime should always work. */ assert_has_feature_disabled(qts, "host", "kvm-no-adjvtime"); assert_set_feature(qts, "host", "kvm-no-adjvtime", true); @@ -624,7 +601,7 @@ int main(int argc, char **argv) * order avoid attempting to run an AArch32 QEMU with KVM on * AArch64 hosts. That won't work and isn't easy to detect. */ - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")= ) { qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", NULL, test_query_cpu_model_expansion_kvm); } --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048733; cv=none; d=zohomail.com; s=zohoarc; b=ktkTpx2qGdNtwsV3IsWaN/nkFTXEEbwrRIV3BVipg8DlcEh4B8G6QGEM9seNHWb230qO2Jg3G2bfs7hsw8+H7t8/IeLV1kYlCifrtsgw8KSoWIukI2ZC7addCL5+vh3gE9ZmGe6Xc2/vPFq330qVxI59LCaDV5vf6x8DDT6yht4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048733; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=YUwsAY7j/ecV1UbnP3UC7xEIyUmH3VJq/XNOQQ4OyUg=; b=AD9Vwo1A6lUpYZfw3wUTrSgtXLRxGwRnREcH/jNHDD/EWxyXyYQiDOcKrHm8T1R/3kDXVN77Al2sdwtEHxcVtbGSJHOCmNXFpjTK00hyR8YaKsSt47JZOXyo4cPzeTHml5hDSnI64eiS354XGNl4DmG0ug4RoNuY4sh57N7WGTk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048733267641.149073334945; Wed, 26 May 2021 10:05:33 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-TcwKqdHtNNCeLmAfSzUtow-1; Wed, 26 May 2021 13:05:30 -0400 Received: by mail-wm1-f71.google.com with SMTP id w10-20020a1c620a0000b0290192eaddd6b0so558730wmb.1 for ; Wed, 26 May 2021 10:05:30 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id t14sm6719869wmq.16.2021.05.26.10.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YUwsAY7j/ecV1UbnP3UC7xEIyUmH3VJq/XNOQQ4OyUg=; b=bflpbootwjAVjMtlkL/hgmiIAVx+gz/Mhb7xhuSkqXesM3pGXa6UlOeAfVSaJx0TLwJIbE yXyaKVAuyBzE00hQ7SXqIrXVc2BT4023wh3inRHpEk+DJbDS3nfGW4k/SEQWfaiPGYVvOT n9K8cZD9FYOwjdn3x3Rg//f6k1YZdjc= X-MC-Unique: TcwKqdHtNNCeLmAfSzUtow-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YUwsAY7j/ecV1UbnP3UC7xEIyUmH3VJq/XNOQQ4OyUg=; b=FbwJU638UpUTd/vuEMh4rw+Nnf19He4FjTGj9/q+XHDIUHTUTwbX27diDMPM6yzavQ p4tNbHWdInDidRZC/QRvOza+aVOArqQIoEdFx0612R8k1BtGA5C5sLIZEBpMKCNigf3Q dhNpGOfTVo3GVWz/IXWRtSe+e47EQD4+Ldvea3ayZJitG9mKzhtyLIgxr7eETSq9iaMk G8V7ILg/R3uP5hqY5azjw+ftmOzE45w0xaWfA6Pue8Oe0IZ+VjeIZ/TPSVqOyE8k0ERG mxU0yQgfWgyosq0CDPl8qFztlk8HPKcO5cTZqXhQQIOqrab22623ZInPiZA0xeVyleyi iZtA== X-Gm-Message-State: AOAM533nR1uZ2EYBDqkBiNTgPZz+4feQ2GdbxWx8Zq9MhmAJJMdQAsrM mYgyVGTDlcGlQvtJ0PD62Nj7461aJXZBsAvtV0s7DnMvhgpnDe2MIyiQVuIn5MYU7EVJtmY4esa aUhhSnVAfg6RatQ== X-Received: by 2002:a5d:6c6f:: with SMTP id r15mr33128020wrz.79.1622048729785; Wed, 26 May 2021 10:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHIsIzHp16SXARV3XE2hkFnV3zVOvyLUW1bVnOiLVwgyKcmU849alrSDO7ZnsuXfLWBeZa4w== X-Received: by 2002:a5d:6c6f:: with SMTP id r15mr33127995wrz.79.1622048729660; Wed, 26 May 2021 10:05:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 05/12] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM Date: Wed, 26 May 2021 19:04:25 +0200 Message-Id: <20210526170432.343588-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The sve_tests_sve_off_kvm() test is KVM specific. Only run it if KVM is available. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 7f4b2521277..66300c3bc20 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -604,6 +604,8 @@ int main(int argc, char **argv) if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")= ) { qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", NULL, test_query_cpu_model_expansion_kvm); + qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off", + NULL, sve_tests_sve_off_kvm); } =20 if (g_str_equal(qtest_get_arch(), "aarch64")) { @@ -611,8 +613,6 @@ int main(int argc, char **argv) NULL, sve_tests_sve_max_vq_8); qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off", NULL, sve_tests_sve_off); - qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off", - NULL, sve_tests_sve_off_kvm); } =20 return g_test_run(); --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048738; cv=none; d=zohomail.com; s=zohoarc; b=asafnzVf9ZLm6o79nY5E/Vx+rHhXkdU/+CbX51KcaXrrEfNlQDVlwtmk8A/R3QkfaMy6PEPJp2cOTme943PQuXWj4oJQxVMPZy3SFQU9+MuTZAEwnh+WJiwMMHOjTXvrHQTYTM3WMY2Cy9aKiLJfoykpHrJkGsLNkrMAC9Q0ZwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048738; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cVrcRnyBOkjPEo/icx3S79OKNawcTbdRmhevRRnT37M=; b=HMXcnYL/p0m1s1+H2jpCNCSMkHgE87Ow/m9zQCzeAtFqPn2mkZ8/ky89P/fY689h8uzI2+JdjpcswvjiLNujFp/GMDK/12ilBawmAAvMW669w7tgsevs91pGgmZkdd9BMF/6TnETUuM7MCY6Bx2tdhDQweJFlqSK8ulvNRPlJP0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048738814784.9329701827327; Wed, 26 May 2021 10:05:38 -0700 (PDT) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-X6Z1PkMqMi6TI-fAxc2heQ-1; Wed, 26 May 2021 13:05:36 -0400 Received: by mail-wm1-f69.google.com with SMTP id o126-20020a1c28840000b0290149b8f27c99so631022wmo.2 for ; Wed, 26 May 2021 10:05:35 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id a16sm20462434wrw.62.2021.05.26.10.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cVrcRnyBOkjPEo/icx3S79OKNawcTbdRmhevRRnT37M=; b=IxB41d1Ub5xiHvRC4V77AgO6Ik3yCQFgLFh3qm2pd3cU340Pk0S7eZ1HlIMs9VHayQHLkN +iedwAZXrVwmdQu//mn9uTkeHwjCEukSVdh2UsusRygyKFm784vw0pj/uQxijGVpvIZyWd ouFufmywVfNs4QcTOhKZ9+1oCxYt0Ng= X-MC-Unique: X6Z1PkMqMi6TI-fAxc2heQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cVrcRnyBOkjPEo/icx3S79OKNawcTbdRmhevRRnT37M=; b=V/bx6UeczyzWyhDdrtdKEqGlWbm888luIRP0imvb4nCHp02iPsBrtMs9eTB9oaqoTU gt54VtGntOD0pU/RWH7bbgXD4Au5g4EBI0fTSK9d4vza1rjCHwjFoqtFoyji9ZzySUUQ UrR4WUv5OVsmgIIUyvsFPvI7JdfY6zbCm8L0rED+IGStnt9c4Qgdu4Nc1009+vRZKBig GwGYPU9t5PDVx3sGPvpqSCOrMmuhe51crm4ICP3nahg3uuUXzrxeLpHQlpRgto/1TqPm wLKSOhx+uSTbFW8lfEBrkkk/rX0lva1JZ1v4AOGOaxQqIWj2uAdgrvEnOqKT/JbWq+9P gQIQ== X-Gm-Message-State: AOAM530DlFfKIhEI9XQPOUg9Scic+wj5fX407jcq1lsGSnwBaMXQzskO Aur3JsWQ7dLXrNXCWxgTUkkrmvmzKe1dwD1usNxFhOaAIx/3aXwO9YsOODfhSXCV01hlGbOD/jV g+u88X0+uUqAjfA== X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr35102832wry.14.1622048734774; Wed, 26 May 2021 10:05:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP6aNvdBMSRqkm8AafJGVA5fY66I6sXZksfURgiqrMBrfwU6Lyarisy43Y271/g2VFNtc1vg== X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr35102817wry.14.1622048734589; Wed, 26 May 2021 10:05:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 06/12] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests Date: Wed, 26 May 2021 19:04:26 +0200 Message-Id: <20210526170432.343588-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) sve_tests_sve_off_kvm() and test_query_cpu_model_expansion_kvm() tests are now only being run if KVM is available. Drop the TCG fallback. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 66300c3bc20..b1d406542f7 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -21,7 +21,7 @@ #define SVE_MAX_VQ 16 =20 #define MACHINE "-machine virt,gic-version=3Dmax -accel tcg " -#define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm -accel tcg= " +#define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048744; cv=none; d=zohomail.com; s=zohoarc; b=SPydNCWaopF5QdlA0xUH0W238FB0tlpzF0JqB6kotAepSU1/aVeYN+kaA2gBmZ1aWUqN0llqOJONWy15PlsFdNs/8pWLqB5fMCdhWUWwIhUWJP1hsXoh15ffRhp80s0MZdLxST3XGt/XKele0J4Y/SUBAlZ4JYxWz9XtjnBqxY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048744; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JLhAw7XD7qIOrjXaghuSYUyF7i2GShMvrYawRB6AMVs=; b=fqhyYLFIzl2JR+jKMgBTS13DRMdh46LVJ/Ixl+BuivaDTqMJS7bis+hHW3tsQFGJn1lTGbWlS+xKFREv7qysg1PaGV4Yh1jWrCxh5jTHwKImOGzw1IX2RvXoCAUKBvZWnoAeGb2Iio5IyIkbCKR2GiR2E0iwovdHpA7YJSSpoiI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048744158234.93719973015288; Wed, 26 May 2021 10:05:44 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-XWLY1FFmMqegZiWS3fIp2Q-1; Wed, 26 May 2021 13:05:41 -0400 Received: by mail-wr1-f69.google.com with SMTP id 1-20020adf93810000b029010fd5ac4ed7so600978wrp.15 for ; Wed, 26 May 2021 10:05:41 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id z188sm15793094wme.38.2021.05.26.10.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JLhAw7XD7qIOrjXaghuSYUyF7i2GShMvrYawRB6AMVs=; b=RZGhal9ped4Q4SfznlOqTzaj4KEyFjhZHYjzNBLIZ/u2CS4ZftCj/NcUbth+jWlSQY6Rjx PowFH0uT5WVyjpZSdsIqgWCepY/dNEOqDwcuIOOf1vT7HKEgTNJXspGYhLlqajKfA1EfXV 7SgW+M07s302myhVCKS+RWPcajD5CYs= X-MC-Unique: XWLY1FFmMqegZiWS3fIp2Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JLhAw7XD7qIOrjXaghuSYUyF7i2GShMvrYawRB6AMVs=; b=Z53nO78uCog2L8rMeQYMHwoUKVJ3CbFzNp5kRxl8nsX7BZ0jmLh46LvoBMUP6+MrHx gTWd3HIRXpoaoqPgeDjTgwOuIlg2mQJZ+J0jaYvyhXKpkbfL8rUt9QmeKvAcgFc17vIV YvMqTpeXLctl2vNMsTd4i03Cme91o5TVroMb7IJjpc7XexO+n779OQjkkAjKJ9WNtmbA HI2LkXN7LgSWEi9EH9iKG9m64qTokxOs0uPDbDaaF2IecXem5HHG4F2PXXxMfx1vuang QKpe9Jis48M2nMufQSFv5s+3nzh/sFxe8ywDkwIsqqxJcmc3+RgzjxgKCCzeig/pCo/z Ga3A== X-Gm-Message-State: AOAM531tJ+NylldKpqUPxEB5ajRsURMjGQ6lD7UZekPspJXdYVm5dHAM zzNOmoTHAr0KSkQK/kOvfHQ8WRX/GNw0AsXW0jSBCOwmRhMiiqrMNJ5q4aPTwHJcSTmp7fM75H2 fDRKI1iiiMJB3HA== X-Received: by 2002:a1c:5982:: with SMTP id n124mr29729658wmb.33.1622048740138; Wed, 26 May 2021 10:05:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMGG7z8UKWqlemLMNjHEosnR/lNpsFsAree9mSOrsWiL6i4d+YXqf/OfxGgxIf7lTAZ5CFLg== X-Received: by 2002:a1c:5982:: with SMTP id n124mr29729628wmb.33.1622048739958; Wed, 26 May 2021 10:05:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 07/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG Date: Wed, 26 May 2021 19:04:27 +0200 Message-Id: <20210526170432.343588-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Now than we can probe if the TCG accelerator is available at runtime with a QMP command, only run these tests if TCG is built into the QEMU binary. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index b1d406542f7..0d9145dd168 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -20,7 +20,7 @@ */ #define SVE_MAX_VQ 16 =20 -#define MACHINE "-machine virt,gic-version=3Dmax -accel tcg " +#define MACHINE_TCG "-machine virt,gic-version=3Dmax -accel tcg " #define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " @@ -337,7 +337,7 @@ static void sve_tests_sve_max_vq_8(const void *data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max,sve-max-vq=3D8"); + qts =3D qtest_init(MACHINE_TCG "-cpu max,sve-max-vq=3D8"); =20 assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL); =20 @@ -372,7 +372,7 @@ static void sve_tests_sve_off(const void *data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max,sve=3Doff"); + qts =3D qtest_init(MACHINE_TCG "-cpu max,sve=3Doff"); =20 /* SVE is off, so the map should be empty. */ assert_sve_vls(qts, "max", 0, NULL); @@ -428,7 +428,7 @@ static void test_query_cpu_model_expansion(const void *= data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max"); + qts =3D qtest_init(MACHINE_TCG "-cpu max"); =20 /* Test common query-cpu-model-expansion input validation */ assert_type_full(qts); @@ -593,8 +593,10 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 - qtest_add_data_func("/arm/query-cpu-model-expansion", - NULL, test_query_cpu_model_expansion); + if (qtest_has_accel("tcg")) { + qtest_add_data_func("/arm/query-cpu-model-expansion", + NULL, test_query_cpu_model_expansion); + } =20 /* * For now we only run KVM specific tests with AArch64 QEMU in @@ -608,7 +610,7 @@ int main(int argc, char **argv) NULL, sve_tests_sve_off_kvm); } =20 - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("tcg")= ) { qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq= -8", NULL, sve_tests_sve_max_vq_8); qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off", --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048754; cv=none; d=zohomail.com; s=zohoarc; b=jyDu6fKnP4ZK2O8JP5wPsK+H8Y/tMy/SuMpnWFjLSILXoXkaOtq6nnGIpn0S9BmIvgmEXWYpnbhyqXm1uUBj9JFIS7ktYNQUB0moMPeGjwaisWdvF0XPbR6VGs9JNgmb9sJniJGFj1Z+SU52NPEjmxdnLjRivflvEqWSgE+kZM4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048754; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=CIcR3Dg8r3/BLZX5s3uJXgxa95m9nxbDQsMDWt+Jqds=; b=PebErJy3oMbKbMDcoazJTNi25Gvf0lFPT8aq3SDMs0eaCzf/zkpTC1ADnBC/VdfRPO+fkwPoo0DopHTtzUq2mlWpv3vlRwJKvUchh5hg2zHk0kHrsPuZ/4JGLlsoWJsPcoHZ0bc/ZNcsOdfhnjlenHFy7qLYaHIqmFPGNDd1Rjc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048754634576.2015976945802; Wed, 26 May 2021 10:05:54 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-azUC5XwaNM6uLFnAeKTHyg-1; Wed, 26 May 2021 13:05:51 -0400 Received: by mail-wm1-f71.google.com with SMTP id l18-20020a05600c4f12b02901921c0f2098so763809wmq.0 for ; Wed, 26 May 2021 10:05:51 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id u8sm6728924wmq.29.2021.05.26.10.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CIcR3Dg8r3/BLZX5s3uJXgxa95m9nxbDQsMDWt+Jqds=; b=TTNHOZa83fVY6eIvSWXMi08hy0bS4skdpLcIpbLdLK3uwP1qQCJ7Gba7u+zqAex95WoNcy MUGXOSEjd9U8Ky0vRkQ1bCdhhXIbjzCxBjCJRlpdI6AQU0swfOivdS+2OuzuJ6J1+LDM74 IJ+dkVs6UVtqx1ldNRJb1qhWDBlqXvk= X-MC-Unique: azUC5XwaNM6uLFnAeKTHyg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CIcR3Dg8r3/BLZX5s3uJXgxa95m9nxbDQsMDWt+Jqds=; b=Cia6fE1Aba2Ey2Q3fMYkEzmkxEi4HJYOeIW0x2UVFWIYYEqzuJsvlKg44bhumWunWx pwwjgz3ndjl9NuTBLzlvj9pod40fGWRXRJBJMOWJij+m0tiEB2JRkPT5u5nNHMS/AwqX iq6EwBq3nxI4jGtx9Qhlql42quPK5BS3Or6Ed1FlU4c24we/xu3sM9A+sRFrFuAAkMpb JHt1NBNgE+letN0yuycBstY4vUIZJco/3WI5Qg6xdabqT+OoIP3QLs6XPAknUtUode/1 qkDKfVo2T4ecxg50uhGtnrqD61p9BsQWAJJEs3KCI6mx90FC94PeG3yxOJtH2znzpB6O YK1g== X-Gm-Message-State: AOAM532DYL4bVq4I3GPqtE3dI5AHU1CAxHa5Cx3Pe9C3+ve7TjRsQj2a DQeXRLqu8q2dD3l5MZew/82QypIzYJac9sShe9EARVdvCVRx8ZAKpy8yOa4khbytaQYaLbuX2Bm Eb4xrjm19aFyOOg== X-Received: by 2002:a1c:e205:: with SMTP id z5mr3177883wmg.70.1622048750731; Wed, 26 May 2021 10:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj4PizJCrJQJlSo/ySLsvv0tj5e6Z5qV1FcEphaUG4il7OPu6e6vZHZRXx2BjTcNzEqb6cww== X-Received: by 2002:a1c:e205:: with SMTP id z5mr3177867wmg.70.1622048750606; Wed, 26 May 2021 10:05:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson , Greg Kurz , Cornelia Huck , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Juan Quintela , "Dr. David Alan Gilbert" , Thomas Huth , Laurent Vivier Subject: [PATCH v8 08/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 Date: Wed, 26 May 2021 19:04:28 +0200 Message-Id: <20210526170432.343588-9-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We might have a s390x/ppc64 QEMU binary built without the KVM accelerator (configured with --disable-kvm). Checking for /dev/kvm accessibility isn't enough, also check for the accelerator in the binary. Reviewed-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/migration-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 2b028df6875..102bc36b91c 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1387,7 +1387,7 @@ int main(int argc, char **argv) */ if (g_str_equal(qtest_get_arch(), "ppc64") && (access("/sys/module/kvm_hv", F_OK) || - access("/dev/kvm", R_OK | W_OK))) { + access("/dev/kvm", R_OK | W_OK) || !qtest_has_accel("kvm"))) { g_test_message("Skipping test: kvm_hv not available"); return g_test_run(); } @@ -1398,7 +1398,7 @@ int main(int argc, char **argv) */ if (g_str_equal(qtest_get_arch(), "s390x")) { #if defined(HOST_S390X) - if (access("/dev/kvm", R_OK | W_OK)) { + if (access("/dev/kvm", R_OK | W_OK) || !qtest_has_accel("kvm")) { g_test_message("Skipping test: kvm not available"); return g_test_run(); } --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048762; cv=none; d=zohomail.com; s=zohoarc; b=fSZZmG37que6SArAKl1xUPqIkg5S1taPYGtCef9y0t+udZZZGpuhgGE3V6YakQnrfFXugJaLJN27IH9Hp8DblafSXBdbx0lUBIKbn3IQH1HzWLMR3Ltxgf1tuK70n35V6SUXmUSaX/6/CCZXpfO0nyWx4OmvUpFfXdQ0JDe5Ugw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048762; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=KOTyr/GPtp/0gjIOd5U6W6CXxFx7PEMuxtPRZj/UCuE=; b=XsSvc3VB+H6Lggxq41MevTWyIIwdYptuGO2EejdaBSOL3S5+8A9jObDKsPsarDw9zq8xslu92b+xFwJIDiAy+sDsDLbaSvmdLbgBa3nKd/nfTb+p1r0aEoFdi8VPaGFfInVWZgEmVZMnvIXK4YqS8/U9+tf3/sGOqHJ0JaaBIIY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048762194783.7628304163597; Wed, 26 May 2021 10:06:02 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-n3c2BNywP1GxMiEukRdKSA-1; Wed, 26 May 2021 13:05:57 -0400 Received: by mail-wr1-f69.google.com with SMTP id h104-20020adf90710000b029010de8455a3aso600739wrh.12 for ; Wed, 26 May 2021 10:05:56 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id f13sm22482769wrt.86.2021.05.26.10.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KOTyr/GPtp/0gjIOd5U6W6CXxFx7PEMuxtPRZj/UCuE=; b=FQqssdWzPY8WHHaHyDhv/GVTLFnq15jpB8Unjw0kk79lCRqJcfciUT6KE14i3MUOOyukYA di8u2ny5gdy9jLj36fyHWYWXuHkgqMu2VvCOkEwfdmAqiEiUOXnLLVZ8QDq3JIGL1F2O9X nke6TdA7hDrWzR5m0smfzto55Puk9Ek= X-MC-Unique: n3c2BNywP1GxMiEukRdKSA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KOTyr/GPtp/0gjIOd5U6W6CXxFx7PEMuxtPRZj/UCuE=; b=Hgj3tFHu/nknHRXVpmR+Jj2DEjWyaVZGd2kbyKkhzt7DXVDtwCZhzx4+cjGTxpHylb Ehn5qvUNGCYt0YDMzBG05M7QT+/nZa3r2FXtH055ggKCGmkRy168wBZRNtjDmv8xFTZM 2pzHvqtlWeXxEsWnB35pCNS5WyYiFzuHX7pi3aIFhRzjNJDylayhkezMCmng5HR5kG3R snnFyhr7yfOpv7EmeeaK+Z0dQkGpUX0i4yt4/h9w9Eu/d6xfhBDwAMJtfhfqX3ZnXnft t9WHYA+SRQfaCs6llJnqjZfa6oyf79tnrXDnLJzXqZpmF87pBDEY7cFKm+0s/zR8d1dz SIuw== X-Gm-Message-State: AOAM530ORcS6fkAP9LTTFZL26AsyqIFaGeVztGUss8GZtPkxvTYW98v/ PzPPCorsdxgVF0zsHCba5fs9B26+EIeycjZ9JTOXFtuefxBCVsnoF1hy8HdVBdYh7bSuq8GfOki XAL3tKGXVuyXzVQ== X-Received: by 2002:a1c:cc17:: with SMTP id h23mr29478150wmb.129.1622048755783; Wed, 26 May 2021 10:05:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7LeD8j6ciD3Jd1g4wk+7HetCZSxOClfSi/nH+UvMZrdrqTt2UKoQ9mJ6FRfcsTtd8gy0xBg== X-Received: by 2002:a1c:cc17:: with SMTP id h23mr29478123wmb.129.1622048755562; Wed, 26 May 2021 10:05:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Igor Mammedov , "Michael S. Tsirkin" Subject: [PATCH v8 09/12] qtest/bios-tables-test: Rename tests not TCG specific Date: Wed, 26 May 2021 19:04:29 +0200 Message-Id: <20210526170432.343588-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Various tests don't require TCG, but have '_tcg' in their name. As this is misleading, remove 'tcg' from their name. Reported-by: Igor Mammedov Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 142 ++++++++++++++++----------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 156d4174aa3..ce498b3ff48 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -753,7 +753,7 @@ static uint8_t base_required_struct_types[] =3D { 0, 1, 3, 4, 16, 17, 19, 32, 127 }; =20 -static void test_acpi_piix4_tcg(void) +static void test_acpi_piix4(void) { test_data data; =20 @@ -768,7 +768,7 @@ static void test_acpi_piix4_tcg(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_bridge(void) +static void test_acpi_piix4_bridge(void) { test_data data; =20 @@ -824,7 +824,7 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg(void) +static void test_acpi_q35(void) { test_data data; =20 @@ -841,7 +841,7 @@ static void test_acpi_q35_tcg(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_bridge(void) +static void test_acpi_q35_bridge(void) { test_data data; =20 @@ -855,7 +855,7 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_mmio64(void) +static void test_acpi_q35_mmio64(void) { test_data data =3D { .machine =3D MACHINE_Q35, @@ -872,7 +872,7 @@ static void test_acpi_q35_tcg_mmio64(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_cphp(void) +static void test_acpi_piix4_cphp(void) { test_data data; =20 @@ -888,7 +888,7 @@ static void test_acpi_piix4_tcg_cphp(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_cphp(void) +static void test_acpi_q35_cphp(void) { test_data data; =20 @@ -908,7 +908,7 @@ static uint8_t ipmi_required_struct_types[] =3D { 0, 1, 3, 4, 16, 17, 19, 32, 38, 127 }; =20 -static void test_acpi_q35_tcg_ipmi(void) +static void test_acpi_q35_ipmi(void) { test_data data; =20 @@ -923,7 +923,7 @@ static void test_acpi_q35_tcg_ipmi(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_ipmi(void) +static void test_acpi_piix4_ipmi(void) { test_data data; =20 @@ -941,7 +941,7 @@ static void test_acpi_piix4_tcg_ipmi(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_memhp(void) +static void test_acpi_q35_memhp(void) { test_data data; =20 @@ -957,7 +957,7 @@ static void test_acpi_q35_tcg_memhp(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_memhp(void) +static void test_acpi_piix4_memhp(void) { test_data data; =20 @@ -973,7 +973,7 @@ static void test_acpi_piix4_tcg_memhp(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_nosmm(void) +static void test_acpi_piix4_nosmm(void) { test_data data; =20 @@ -984,7 +984,7 @@ static void test_acpi_piix4_tcg_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_smm_compat(void) +static void test_acpi_piix4_smm_compat(void) { test_data data; =20 @@ -995,7 +995,7 @@ static void test_acpi_piix4_tcg_smm_compat(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_smm_compat_nosmm(void) +static void test_acpi_piix4_smm_compat_nosmm(void) { test_data data; =20 @@ -1006,7 +1006,7 @@ static void test_acpi_piix4_tcg_smm_compat_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_nohpet(void) +static void test_acpi_piix4_nohpet(void) { test_data data; =20 @@ -1017,7 +1017,7 @@ static void test_acpi_piix4_tcg_nohpet(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_numamem(void) +static void test_acpi_q35_numamem(void) { test_data data; =20 @@ -1029,7 +1029,7 @@ static void test_acpi_q35_tcg_numamem(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_nosmm(void) +static void test_acpi_q35_nosmm(void) { test_data data; =20 @@ -1040,7 +1040,7 @@ static void test_acpi_q35_tcg_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_smm_compat(void) +static void test_acpi_q35_smm_compat(void) { test_data data; =20 @@ -1051,7 +1051,7 @@ static void test_acpi_q35_tcg_smm_compat(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_smm_compat_nosmm(void) +static void test_acpi_q35_smm_compat_nosmm(void) { test_data data; =20 @@ -1062,7 +1062,7 @@ static void test_acpi_q35_tcg_smm_compat_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_nohpet(void) +static void test_acpi_q35_nohpet(void) { test_data data; =20 @@ -1073,7 +1073,7 @@ static void test_acpi_q35_tcg_nohpet(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_numamem(void) +static void test_acpi_piix4_numamem(void) { test_data data; =20 @@ -1087,11 +1087,11 @@ static void test_acpi_piix4_tcg_numamem(void) =20 uint64_t tpm_tis_base_addr; =20 -static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, +static void test_acpi_tpm(const char *machine, const char *tpm_if, uint64_t base) { #ifdef CONFIG_TPM - gchar *tmp_dir_name =3D g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXX= XX", + gchar *tmp_dir_name =3D g_strdup_printf("qemu-test_acpi_%s_%s.XXXXXX", machine, tpm_if); char *tmp_path =3D g_dir_make_tmp(tmp_dir_name, NULL); TestState test; @@ -1139,12 +1139,12 @@ static void test_acpi_tcg_tpm(const char *machine, = const char *tpm_if, #endif } =20 -static void test_acpi_q35_tcg_tpm_tis(void) +static void test_acpi_q35_tpm_tis(void) { - test_acpi_tcg_tpm("q35", "tis", 0xFED40000); + test_acpi_tpm("q35", "tis", 0xFED40000); } =20 -static void test_acpi_tcg_dimm_pxm(const char *machine) +static void test_acpi_dimm_pxm(const char *machine) { test_data data; =20 @@ -1174,14 +1174,14 @@ static void test_acpi_tcg_dimm_pxm(const char *mach= ine) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_dimm_pxm(void) +static void test_acpi_q35_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_Q35); + test_acpi_dimm_pxm(MACHINE_Q35); } =20 -static void test_acpi_piix4_tcg_dimm_pxm(void) +static void test_acpi_piix4_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_PC); + test_acpi_dimm_pxm(MACHINE_PC); } =20 static void test_acpi_virt_tcg_memhp(void) @@ -1223,7 +1223,7 @@ static void test_acpi_microvm_prepare(test_data *data) data->blkdev =3D "virtio-blk-device"; } =20 -static void test_acpi_microvm_tcg(void) +static void test_acpi_microvm(void) { test_data data; =20 @@ -1233,7 +1233,7 @@ static void test_acpi_microvm_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_usb_tcg(void) +static void test_acpi_microvm_usb(void) { test_data data; =20 @@ -1244,7 +1244,7 @@ static void test_acpi_microvm_usb_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_rtc_tcg(void) +static void test_acpi_microvm_rtc(void) { test_data data; =20 @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_pcie_tcg(void) +static void test_acpi_microvm_pcie(void) { test_data data; =20 @@ -1267,7 +1267,7 @@ static void test_acpi_microvm_pcie_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_ioapic2_tcg(void) +static void test_acpi_microvm_ioapic2(void) { test_data data; =20 @@ -1332,7 +1332,7 @@ static void test_acpi_virt_tcg_pxb(void) free_test_data(&data); } =20 -static void test_acpi_tcg_acpi_hmat(const char *machine) +static void test_acpi_acpi_hmat(const char *machine) { test_data data; =20 @@ -1364,14 +1364,14 @@ static void test_acpi_tcg_acpi_hmat(const char *mac= hine) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_acpi_hmat(void) +static void test_acpi_q35_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_Q35); + test_acpi_acpi_hmat(MACHINE_Q35); } =20 -static void test_acpi_piix4_tcg_acpi_hmat(void) +static void test_acpi_piix4_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_PC); + test_acpi_acpi_hmat(MACHINE_PC); } =20 static void test_acpi_virt_tcg(void) @@ -1512,50 +1512,50 @@ int main(int argc, char *argv[]) return ret; } qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); - qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); - qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); + qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tpm_tis); + qtest_add_func("acpi/piix4", test_acpi_piix4); qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); - qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_bridge); qtest_add_func("acpi/piix4/pci-hotplug/no_root_hotplug", test_acpi_piix4_no_root_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/no_bridge_hotplug", test_acpi_piix4_no_bridge_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/off", test_acpi_piix4_no_acpi_pci_hotplug); - qtest_add_func("acpi/q35", test_acpi_q35_tcg); - qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); - qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); - qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi); - qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi); - qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_tcg_cphp); - qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp); - qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp); - qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp); - qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem); - qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem); - qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_tcg_nosmm); + qtest_add_func("acpi/q35", test_acpi_q35); + qtest_add_func("acpi/q35/bridge", test_acpi_q35_bridge); + qtest_add_func("acpi/q35/mmio64", test_acpi_q35_mmio64); + qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_ipmi); + qtest_add_func("acpi/q35/ipmi", test_acpi_q35_ipmi); + qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_cphp); + qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_cphp); + qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_memhp); + qtest_add_func("acpi/q35/memhp", test_acpi_q35_memhp); + qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_numamem); + qtest_add_func("acpi/q35/numamem", test_acpi_q35_numamem); + qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_nosmm); qtest_add_func("acpi/piix4/smm-compat", - test_acpi_piix4_tcg_smm_compat); + test_acpi_piix4_smm_compat); qtest_add_func("acpi/piix4/smm-compat-nosmm", - test_acpi_piix4_tcg_smm_compat_nosmm); - qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_tcg_nohpet); - qtest_add_func("acpi/q35/nosmm", test_acpi_q35_tcg_nosmm); + test_acpi_piix4_smm_compat_nosmm); + qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_nohpet); + qtest_add_func("acpi/q35/nosmm", test_acpi_q35_nosmm); qtest_add_func("acpi/q35/smm-compat", - test_acpi_q35_tcg_smm_compat); + test_acpi_q35_smm_compat); qtest_add_func("acpi/q35/smm-compat-nosmm", - test_acpi_q35_tcg_smm_compat_nosmm); - qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); - qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); - qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); - qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hma= t); - qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat); - qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); - qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); - qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); - qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_t= cg); + test_acpi_q35_smm_compat_nosmm); + qtest_add_func("acpi/q35/nohpet", test_acpi_q35_nohpet); + qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_dimm_pxm); + qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_dimm_pxm); + qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_acpi_hmat); + qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_acpi_hmat); + qtest_add_func("acpi/microvm", test_acpi_microvm); + qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb); + qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); + qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); if (strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048769; cv=none; d=zohomail.com; s=zohoarc; b=VXvniFB9GyoQ9lk9d4qkrEcAtvUn3cNgmMQB66qoxiKlaHXJyTHuNFqWy8/JXFtpgdVVNKbQR9/fPUZQSMEaNqgqXnu7W6gmdBkInyppgP1eA6G2PnJjhDCHNpdbbiWcRYCM/gzwy4UMCR0tybrsXl0glj+o/UXSB4OEpIkDXZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048769; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=LyoTXCrKRxOQ6HWYt6T0AZz1kzEWAAnmXRDjoh7Y70k=; b=RdgJYTWXvnjbMeopt6ovfMrMoVHGBSmNRS0MSpQOyZFbT2P0Ulq5o937kAIk1u1Qcdx2QaKdmvuiIg5b7pYfJXawZUFpVbTDT8ceRPwrrqyef8oo1YYodeNbsJBxmZ7y0u2o1/9TSn9O406nl9Rp9ZMIaXyDkzPjHCwbTRIvgr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1622048769613440.2689375690842; Wed, 26 May 2021 10:06:09 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-312-foj0-XV6PXuondt3UvO_Uw-1; Wed, 26 May 2021 13:06:06 -0400 Received: by mail-wr1-f71.google.com with SMTP id a9-20020adfc4490000b0290112095ca785so599849wrg.14 for ; Wed, 26 May 2021 10:06:06 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id e8sm20905113wrt.30.2021.05.26.10.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LyoTXCrKRxOQ6HWYt6T0AZz1kzEWAAnmXRDjoh7Y70k=; b=K47aJ02/6SeaWzJrdDco6KlAn33zShben78aSySO8MYCiAQCYcsMq1ZVXeoxAUbmZ72Cx1 PKb8W+v6EThlU/xAgwWPS7d6nak/xE+fU4smMuxui8eLxQubstEzWCxK/qO15VUJ5YU2Sw pqIH9HHRNdeLYoj9qP7PWtgrq2Zmti8= X-MC-Unique: foj0-XV6PXuondt3UvO_Uw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LyoTXCrKRxOQ6HWYt6T0AZz1kzEWAAnmXRDjoh7Y70k=; b=R2UojqOuy97K9CFFN2eN1lIfuI0MSrctf7vjgtlIagy8VzMnZ8D/NaG7vw4Ahdw2Ag WxwdVJyjL8ElMSQvUCXjBIXpbMJO3kRJr36+jmpmtbs8N7AG6QdOA2KlmzFK0yITYl13 4/qWxpSwao9/hUw72FRdfWzME+7tzsKjszuSkMRCSmwk1S/dD7CsKXWsr7lZVL5+ft/T cosk9B6aKfQfw/S0CV/du7WnU9nDtBPZV/gJm3oC8JG7wwrXut85vET0Ctn0SnuBIt7u +CD6ijlsrtjAEv3gP7e7qw6XVxvpXi9eJCrUUJ2EdSXyyol15mM9FzJFAwsZgNc8YIeK bebQ== X-Gm-Message-State: AOAM533eDMID93mZ+bNNDbPQzLS13YfinpqWAAocwiot54wcA3DTAIt6 w52X+bSvw7c1jM8iib06BKxx81aqLBIX3Qfe1RRyMLpQEkG+HoG/tnEF/LX8ImwG2nQjRbC2E+j vHN0N0WZsmszZpw== X-Received: by 2002:a7b:cf23:: with SMTP id m3mr4538314wmg.24.1622048765579; Wed, 26 May 2021 10:06:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+0UcjGSNeZsFkMbbtdgTs1Yp9YNfi4sUPYUQR/FGajmBrcKGCBwRBT0ygDfmJcXItImKFJg== X-Received: by 2002:a7b:cf23:: with SMTP id m3mr4538294wmg.24.1622048765433; Wed, 26 May 2021 10:06:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Igor Mammedov , "Michael S. Tsirkin" Subject: [PATCH v8 10/12] qtest/bios-tables-test: Rename TCG specific tests Date: Wed, 26 May 2021 19:04:30 +0200 Message-Id: <20210526170432.343588-11-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Some tests require TCG, but don't have '_tcg' in their name, while others do. Unify the test names by adding 'tcg' to the TCG specific tests. Reported-by: Igor Mammedov Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ce498b3ff48..ad877baeb1b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc(void) free_test_data(&data); } =20 -static void test_acpi_microvm_pcie(void) +static void test_acpi_microvm_pcie_tcg(void) { test_data data; =20 @@ -1475,7 +1475,7 @@ static void test_acpi_oem_fields_microvm(void) g_free(args); } =20 -static void test_acpi_oem_fields_virt(void) +static void test_acpi_oem_fields_virt_tcg(void) { test_data data =3D { .machine =3D "virt", @@ -1555,14 +1555,14 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); if (strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); - qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); + qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt_t= cg); } ret =3D g_test_run(); boot_sector_cleanup(disk); --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048775; cv=none; d=zohomail.com; s=zohoarc; b=FuT/Zp1OGe9p6WEIACU1Dp9jSnauvNisTI3i5d1+kGCd6YKUlp+PGkbWXat8jiSOVVKUZfTGWREF0eMwCaPPd+1QRzqEbyUYwBiRJ5SPKCe+DQM61tQFfP2F5pKkB/49iomKxDSoH1d5dGjjonmFmXY/YGFO6C4dfm12hZGRDvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048775; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NrRlnxcfy5rfyxKOgrn4KzLZv/0uqhFPtkaZ4qrEJ9Q=; b=J53YkxPATwiJk+cKX7XEDZZXEJKf/0zkRFjE9PLzl1kCrzRd/06DqYsRMipEU1hbIK4ONIlnTqb6OkohGItMXmcITEFAaWwLVlpLz8tbPRFa2+y/StnXpMCsXxTI+ElbhNNQoatXcpzuFDfuXnSWayls9M4BPzBwqki8qz8A8ws= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048775591527.3695581975347; Wed, 26 May 2021 10:06:15 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-127-aKtrzaOTOMKqDlOD--WRlQ-1; Wed, 26 May 2021 13:06:11 -0400 Received: by mail-wm1-f71.google.com with SMTP id f141-20020a1c1f930000b029017ce5240ed6so627558wmf.5 for ; Wed, 26 May 2021 10:06:11 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id v12sm21670414wrv.76.2021.05.26.10.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NrRlnxcfy5rfyxKOgrn4KzLZv/0uqhFPtkaZ4qrEJ9Q=; b=ZX4gXhio8+qHzhRujYEqwIJKJo10oVpOXRcHK6lKx4DBf9PcTti5fIvjK337Tm3sEoYATB 6o0WDJYYLWplFV7MMbZiu+tdUL0TGOl+CWJLu557PKb6aePKve6kiWidjPrsOVzKwP9+Bl yUFvf947yU/aWT3LW4Zx/vTehHbTSt0= X-MC-Unique: aKtrzaOTOMKqDlOD--WRlQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NrRlnxcfy5rfyxKOgrn4KzLZv/0uqhFPtkaZ4qrEJ9Q=; b=hmva76Ui1dGB4l4tIXFpb+R3QjUY4NUl6Hr2yDILZNLkZwQQJ4VhNFtF2NgVxggSYn qLje/L7F025xZf+q+pyjgAM8NwbEedAmVTLH3ggXbD8/1/qmgHo23bKS7dOTy7o6u+C3 t7ElcFdkQAX2PjTse4Z8FZHVX/jdNmQn2YX3oS10M+rhZrgPEwx2h84EwT7E6y7LUJBX 1ogbsx8/rcaTA3lmVLx1/4w2A4lIKVAOaXrEikGDy+7iQobo9IBA5qEq+BL4asCBqxgY HTbg8obpZC2NY+z4r8PL4PFtcOzUJDP/FCZQDOlEU1ArfhN+c1fRDqC8b7X0nddPzSwv szvA== X-Gm-Message-State: AOAM531NQf5YzquUx2fCb11BwpIXkos13ENk/kjAXxtioPhqGU5xJfVx SC3kCvJnmDaMUtxXNZdQrJU9xd2AFI3bNV9lHrMDLhcQR6DdMa60feojKg+o7pJfRJMCGA0jhDH coKmuUUJHqVGfVw== X-Received: by 2002:adf:f9d0:: with SMTP id w16mr34874277wrr.336.1622048770500; Wed, 26 May 2021 10:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV+z6DRBd0p+if3smIv7jZFtdYDhYSb0l85mC3zaptQaPnDh5cZotIJyPt6ISQ+UF/WxRBEQ== X-Received: by 2002:adf:f9d0:: with SMTP id w16mr34874260wrr.336.1622048770307; Wed, 26 May 2021 10:06:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Igor Mammedov , "Michael S. Tsirkin" Subject: [PATCH v8 11/12] qtest/bios-tables-test: Make test build-independent from accelerator Date: Wed, 26 May 2021 19:04:31 +0200 Message-Id: <20210526170432.343588-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Now that we can probe if the TCG accelerator is available at runtime with a QMP command, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by an assertion. Reviewed-by: Eric Blake Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ad877baeb1b..762d154b340 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -97,6 +97,7 @@ typedef struct { QTestState *qts; } test_data; =20 +static bool tcg_accel_available; static char disk[] =3D "tests/acpi-test-disk-XXXXXX"; static const char *data_dir =3D "tests/data/acpi"; #ifdef CONFIG_IASL @@ -718,12 +719,7 @@ static void test_acpi_one(const char *params, test_dat= a *data) char *args; bool use_uefi =3D data->uefi_fl1 && data->uefi_fl2; =20 -#ifndef CONFIG_TCG - if (data->tcg_only) { - g_test_skip("TCG disabled, skipping ACPI tcg_only test"); - return; - } -#endif /* CONFIG_TCG */ + assert(!data->tcg_only || tcg_accel_available); =20 args =3D test_acpi_create_args(data, params, use_uefi); data->qts =3D qtest_init(args); @@ -1506,6 +1502,8 @@ int main(int argc, char *argv[]) =20 g_test_init(&argc, &argv, NULL); =20 + tcg_accel_available =3D qtest_has_accel("tcg"); + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { ret =3D boot_sector_init(disk); if (ret) { @@ -1554,10 +1552,10 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); - if (strcmp(arch, "x86_64") =3D=3D 0) { + if (strcmp(arch, "x86_64") =3D=3D 0 && tcg_accel_available) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); } - } else if (strcmp(arch, "aarch64") =3D=3D 0) { + } else if (strcmp(arch, "aarch64") =3D=3D 0 && tcg_accel_available) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); --=20 2.26.3 From nobody Fri May 17 07:47:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622048784; cv=none; d=zohomail.com; s=zohoarc; b=MP6bQaj1DZCSJWMawgj29UJr4YZqY954QYVxmfHMFAcewHh1Dsfdo5abatJryssJsQacbDa94JSI8vg0+5v6BrGFAUFYKPrmIXZA/yhl3mZKjxBf2KelhfTaGReJ3yZBgnKbwz5NfWuI6IXjGQa2S/OTq9D+HZu/RMigrsflNnc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622048784; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=W8w7RhXeFSRWGk0AutdMu5ukNCwh8itA/alKjBFfess=; b=aSEGIctBYXx13SEaHwy4xb2ysL4rsGadF54XKsSd1HNljEL+F8iaCTaarHkUsWR2LQh06n6sY6bWTRFl8zHj5gLgiaeAVoELY4V9CzHgFpUUsA0G9p9gvBTaOOaqjOZFFgnO3X2zbGzh1WiCI2FDeVnXxqvFcCrLiyU9x8NogEo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622048784251640.6497364457143; Wed, 26 May 2021 10:06:24 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-TMYsxvRwMHeLBs4vGe7Yaw-1; Wed, 26 May 2021 13:06:21 -0400 Received: by mail-wm1-f70.google.com with SMTP id n2-20020a05600c4f82b0290181c444b9f1so624084wmq.6 for ; Wed, 26 May 2021 10:06:21 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (64.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.64]) by smtp.gmail.com with ESMTPSA id h15sm15245676wmq.1.2021.05.26.10.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 10:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622048783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W8w7RhXeFSRWGk0AutdMu5ukNCwh8itA/alKjBFfess=; b=Xg/GaH1jxMC0bZA86hEzFtRD1Yg8RyNeasFFgi0XQExCCjz65QakvmBLvCIFVVknkQzQrc 85YUxUeGIwa7bR4jNWdOQ4lJivWLVWGm/PCUhNLqN7zlS9RPjQz5zKkjWReAcRuYVO9DM7 bwGYSfCUs60XaKs3tPCeC5t08f6vp4U= X-MC-Unique: TMYsxvRwMHeLBs4vGe7Yaw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W8w7RhXeFSRWGk0AutdMu5ukNCwh8itA/alKjBFfess=; b=mRjSWSyLJhhHE7JlyGlB6Xqjk/orni0kYOmSv2ZbCJBfUFBosMqmPKGlbUX7/yKwCu tC8b+vcY6Cj/y9FRq4NKjPaQDEZ7pAsMKh9LwS6iYcdP6e7w374yxndEn10fZcZ1qZ5m cNdzlco8gU5L6gOOYmb1bmnjZRR4ia3j1LGtYMIT1764X4a0kAfEFeQdYdnd+yPvPLaU K17SGvBdTHCkt1yY9HHttjwZRVNYKCFqk6ACsza0nKqf2Xl0+zRi0df5nbidKmr+KnPJ f1693cu91pbwGYvHn2zSuTRYtCKflFYY34xM1IGKQ/vYMO6BH6JmSE+sP4cWxJPBTMDg lyQQ== X-Gm-Message-State: AOAM532mv46nuzDbh8f/BXInSLMcbi3NSJ+qyXkppVY/ez3HYmYaB1Oi dYhgpyefE3rhTCdLTpEn0gu6xfxe06u/4pfA/bw3NwAvtvsCzQX4fPZGVhkgQHNNoIUb+L5s29U Vub9gcnl1bwoJhQ== X-Received: by 2002:a5d:55cd:: with SMTP id i13mr2823902wrw.128.1622048780357; Wed, 26 May 2021 10:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQUEpbGLh/42akCiHF4ChNzY8xqgXWdGOz7fzfxNbTnvC7lYyvgHeEHFwauq9NRBI684rz1A== X-Received: by 2002:a5d:55cd:: with SMTP id i13mr2823891wrw.128.1622048780168; Wed, 26 May 2021 10:06:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Eric Blake , Markus Armbruster , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier Subject: [PATCH v8 12/12] qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore Date: Wed, 26 May 2021 19:04:32 +0200 Message-Id: <20210526170432.343588-13-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210526170432.343588-1-philmd@redhat.com> References: <20210526170432.343588-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a77774 and directly run the bios-tables-test. Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index c3a223a83d6..2c7415d6166 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -176,14 +176,13 @@ 'boot-serial-test', 'hexloader-test'] =20 -# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-tes= t unconditional qtests_aarch64 =3D \ - (cpu !=3D 'arm' ? ['bios-tables-test'] : []) + = \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= test'] : []) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= swtpm-test'] : []) + \ ['arm-cpu-features', 'numa-test', 'boot-serial-test', + 'bios-tables-test', 'xlnx-can-test', 'migration-test'] =20 --=20 2.26.3