From nobody Wed Nov 19 21:00:36 2025 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=1618504401; cv=none; d=zohomail.com; s=zohoarc; b=PPyr/bzZUeXwURCuFyTUrdhZ6YmvkDDGeL7BBmmp2Hoc0cPGxYTgHnZociFtjb9+FiaPjpdjBEPlGKL9e+iwJgDnwCo//KM2LJzhKdWCXZS1BtYfPiLYj++wJ9wNx78ikFAt8lOtoyR4EWW/4RmDZVbaALYNFxEFRf4jIpFZaAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504401; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=UBTlRC9OTcPVKm7FJntznC4sA/TysO3weRQeCkv1c6s=; b=OBGjHyFLv0+ajWQpY8/cCJytIOm+Pso4jYq9WMbqp6X+qe4F2GckjzJHUjUSRL23TvEdipB5C2AGVkT9Acnm7QHOI07P4Sx4Z9CwJ8cXe7RJAHP6VzkXQYDpLzwOtU6sCmLSQBY0ahwstCLnemyleGfqnFhiSQxOVoUYzeyubGk= 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 1618504401016804.5145031707915; Thu, 15 Apr 2021 09:33:21 -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-471-C8-w92w1Ovm-9rLpZnpIMw-1; Thu, 15 Apr 2021 12:33:18 -0400 Received: by mail-wr1-f69.google.com with SMTP id j16-20020adfd2100000b02901022328749eso2986842wrh.4 for ; Thu, 15 Apr 2021 09:33:18 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id u6sm3963065wml.23.2021.04.15.09.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504399; 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=UBTlRC9OTcPVKm7FJntznC4sA/TysO3weRQeCkv1c6s=; b=VOfXkQmiIfF3GPGPJJQXpLvlxhZJl2QDGC/62mSS1ugLXQe9cvrJooOS3BUbn/XElUY8Yi 6iUdAp3HVERvMo67JzVp6AKVbCyGCknBGax6Ozf4CXuz5couzSdKEJnyvUTZYpoh640Bga N+wFP7LiX/FjZnaiM5M4b4vQxb5K9lQ= X-MC-Unique: C8-w92w1Ovm-9rLpZnpIMw-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=UBTlRC9OTcPVKm7FJntznC4sA/TysO3weRQeCkv1c6s=; b=jI346eIsDxEhnZIy6kenww0V1j7YHkJCqAj0fXStHr8xkvbLTeS2bYXOaeTy7wzYP3 tXvrKhPzY1GKqCQZCsbWnhNJS4F46xLPCl6L6d86TBYBHrOqroZvrrSNCvddOzX74gFE cR8G5cG5JvRQhIk3zUf/1aqXp5VtdrTGpUTjaK+UYt3WRHkJOq9JubHA6xM5Pc9+gfwJ wHWkeQok6afa3SwSjy52ZDNw72yEYPBGZO3jXdKj59CFiFSuoLi2SnDiO6WY9Uq/x8rT 3tvk7xhTt0CrGOUJ/1ygwQSJ3gxNzSlImakFQ7sCwwFQ0pwAms5lsHN41XwNcEqPGPpR GWaw== X-Gm-Message-State: AOAM530blkE1P3+guua8Ytjj1kmUgrS9ncy18E5ghyh2Vf5IjUzwSDQG 149jgajoylWYRZWGOGi4R6Vkrkm5Sbt6SpyEIIncQGy+NIs0YPGC3Um//+UYDp92viaqInCB5KA c/TFsqYvrozczTw== X-Received: by 2002:a7b:c5c8:: with SMTP id n8mr4006581wmk.63.1618504397055; Thu, 15 Apr 2021 09:33:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBuWtEXyK+F21u0OVkokRWbtdq2U93WqUucXas7XeUyPFnoIN53N3az3bwJUIJavWaWVV1cw== X-Received: by 2002:a7b:c5c8:: with SMTP id n8mr4006561wmk.63.1618504396927; Thu, 15 Apr 2021 09:33:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 01/12] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section Date: Thu, 15 Apr 2021 18:32:53 +0200 Message-Id: <20210415163304.4120052-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c59..d5df4ba7891 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 Wed Nov 19 21:00:36 2025 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=1618504406; cv=none; d=zohomail.com; s=zohoarc; b=E7Ug80vfLi7HDMk1+CgDZak1wg4WuyY+hEzUiunyok7OOSaITh3luxx5JH5U1skddkxTKu9aZqAqewGHV3d0sA9VMXis0MR+Lv5kjKP+uiWYVZg9ZKYggp/XEPaNnfHMXCQsn30ZyJzCJRlM7yf/zWnQlBe/0+EX6w0e7z6Gflo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504406; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NxYz1h0hu+rZ/LwuHs61u9ZCcyihVB9Q3XHDDjiOe3s=; b=XeomCbhHivLXfpHzSpvanCb6BpH+JQGOXnFSZik1RPxfguHlSM6PtpETGhZn5iLPgFx9xoMObbbYX1FmudA81ExKo7D7d2/i0yoMzRsF+avmFwp1yvJmQd1Y1iVzp/TG92oflr6BKdspQ4fTpIYZWOhZEDO21P80SFx4jtVa97U= 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 1618504406758472.73471266242336; Thu, 15 Apr 2021 09:33:26 -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-337-YWJtOwHsM3q6yeTh8J5xSg-1; Thu, 15 Apr 2021 12:33:24 -0400 Received: by mail-wr1-f69.google.com with SMTP id s9-20020a5d51090000b02901028ea30da6so2988848wrt.7 for ; Thu, 15 Apr 2021 09:33:23 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id g3sm4369989wrp.46.2021.04.15.09.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504405; 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=NxYz1h0hu+rZ/LwuHs61u9ZCcyihVB9Q3XHDDjiOe3s=; b=P3jqQsHkSVhQzGzwntqZAqbuH2tiJZXxfD9bqUWxoRCTLJqmcg4GHomdbpkyPRwGrwvRYc kdCLW1crLbIIGqEH+AO+ukjfkzA9qhXfiGZxbY1HvJNkNVfMsE0pJwQd5BA6JX8PC4mbBV UVhJqlhd3s2Bbxj9huD4PkgM6WdMTCo= X-MC-Unique: YWJtOwHsM3q6yeTh8J5xSg-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=NxYz1h0hu+rZ/LwuHs61u9ZCcyihVB9Q3XHDDjiOe3s=; b=M9/4rWU+C81/HqnRRl0VQ+i7qVA1mKQOsPJ3o4f5nkY3AI6M4SDzEUdYsWmz0ZbMQZ J1ZhjqOZR1KqF8lrt2N1hMRxke94D/jQXPFnpI1isfkL5UEH431Dc60lwn/9msCqVrPd h1ly3PcORq1s7BpQwYDZKgHnc2ORXSBsuucGCe8nILZrQDXaHOCgoliLaG7fsV1tQqvb MQwC72r8Bi6pzpxuFEf5ok9gfLbDGNFSBeg8iQZFyczUqw8hS1W/W9NkrjMZMJ8aE6KI SSdn/NWbHUa/ONCmhMhzW96PhrcmPq40sZTWOi0Mt8qN68nEA9Nzb7bdRcxVoTijeozu 7zIg== X-Gm-Message-State: AOAM5318h/EnfsyfZmjXbhtqXc7mHVT9maG1PNoR7Tn8DqWK9qHwR1n0 Vz0AjLKy5I5sg7IrWt5tVjwEWHhDvXzAL605O6Ee3gswB3Y4vbxTB9C/T+x5StemFxP1zEgmuBZ f3ervwapuLFF13Q== X-Received: by 2002:a5d:6410:: with SMTP id z16mr3523492wru.40.1618504402307; Thu, 15 Apr 2021 09:33:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7+/CDBXvuwvWMe/2DoJMFX9WGk+8Z0nFYJDUN1t/brTFYJbgMxtcWGJfKfOgm2qb32hIwlg== X-Received: by 2002:a5d:6410:: with SMTP id z16mr3523455wru.40.1618504402125; Thu, 15 Apr 2021 09:33:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 02/12] accel: Introduce 'query-accels' QMP command Date: Thu, 15 Apr 2021 18:32:54 +0200 Message-Id: <20210415163304.4120052-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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" } ] } Note that we can't make the enum values or union branches conditional because of target-specific poisoning of accelerator definitions. Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- Since v3: Simplify over-engineered AcceleratorInfo (Markus, kept Eric R-b) Since v2: @since 6.0 -> 6.1, added note (Eric) Since v1: 'type' -> 'name' in comments --- qapi/machine.json | 47 +++++++++++++++++++++++++++++++++++++++++++++ accel/accel-qmp.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ accel/meson.build | 2 +- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 accel/accel-qmp.c diff --git a/qapi/machine.json b/qapi/machine.json index 6e90d463fc9..1ef729f6f84 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1274,3 +1274,50 @@ ## { 'event': 'MEM_UNPLUG_ERROR', 'data': { 'device': 'str', 'msg': 'str' } } + +## +# @Accelerator: +# +# An enumeration of accelerator names. +# +# Since: 6.1 +## +{ 'enum': 'Accelerator', + 'data': [ 'qtest', 'tcg', 'kvm', 'hax', 'hvf', 'whpx', 'xen' ] } + +## +# @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..426737b3f9a --- /dev/null +++ b/accel/accel-qmp.c @@ -0,0 +1,49 @@ +/* + * QEMU accelerators, QMP commands + * + * Copyright (c) 2021 Red Hat Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/qapi-commands-machine.h" + +static const bool accel_builtin_list[ACCELERATOR__MAX] =3D { + [ACCELERATOR_QTEST] =3D true, +#ifdef CONFIG_TCG + [ACCELERATOR_TCG] =3D true, +#endif +#ifdef CONFIG_KVM + [ACCELERATOR_KVM] =3D true, +#endif +#ifdef CONFIG_HAX + [ACCELERATOR_HAX] =3D true, +#endif +#ifdef CONFIG_HVF + [ACCELERATOR_HVF] =3D true, +#endif +#ifdef CONFIG_WHPX + [ACCELERATOR_WHPX] =3D true, +#endif +#ifdef CONFIG_XEN_BACKEND + [ACCELERATOR_XEN] =3D true, +#endif +}; + +AcceleratorInfoList *qmp_query_accels(Error **errp) +{ + AcceleratorInfoList *list =3D NULL, **tail =3D &list; + + for (Accelerator accel =3D 0; accel < ACCELERATOR__MAX; accel++) { + if (accel_builtin_list[accel]) { + AcceleratorInfo *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 Wed Nov 19 21:00:36 2025 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=1618504413; cv=none; d=zohomail.com; s=zohoarc; b=hKgi1HoaOhB53/8LLzE5Z46xVqarekcSQYC5MlnspTioEcuhBJYud+amhILW/RV8xHux4/4J+EuVPt3PrV/WfwgoOXCBDRj6TTuU5udbaHsRN8F3nKiTGrzm1boZdRZzwAc+S8WUS3hg7DwwoVagzZfCuIRdYtUzKR/6yI7ea1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504413; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=WU1rsuPZSbiXCb5ZUrh9An1Xj0dCMP/3YS/3/3XzJFk=; b=A2+/AOWX9s+Tzsu/hSN/Yvq8qAeUiTdeYCcmpH4PkYEIRyXPUrd13rZai6PAGxIKiSGLHSorXoK3elvs30bZ4C2v6KnZBZw17oLW8IE5u2SZY7q8m/BqtE3E+PyEcBq0azU3idFa9ny7QS99Mvls6q1Fz8E0tt8MF2hXgTgIn1s= 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 1618504413066781.3141724663975; Thu, 15 Apr 2021 09:33:33 -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-254-nyLlMT2OP7GIn69rt07yzQ-1; Thu, 15 Apr 2021 12:33:28 -0400 Received: by mail-wr1-f69.google.com with SMTP id j16-20020adfd2100000b02901022328749eso2987064wrh.4 for ; Thu, 15 Apr 2021 09:33:28 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id h14sm5223708wrq.45.2021.04.15.09.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504411; 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=WU1rsuPZSbiXCb5ZUrh9An1Xj0dCMP/3YS/3/3XzJFk=; b=cZ7q2HkNbQM8Psv9JQJKqFBtJkWG7vU/IkHyZ88inkvP6FKbw0IrUBzJe/ae1fqHMzX196 3DY+BxzCjyDwKkiBVBy97prC3MsZ9c08QIXJONBnp2OpxoifzeWf7WamEfDz955HsHrmIL NrcYDile34D4Zc66HdPpMUcP/DyhlG0= X-MC-Unique: nyLlMT2OP7GIn69rt07yzQ-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=WU1rsuPZSbiXCb5ZUrh9An1Xj0dCMP/3YS/3/3XzJFk=; b=rcB+S5T23ZvOSkeTaTVcApre6N2xpqRVVjBaLfkgkhAB3ISYZ9uyu94wbN/cIFjWpe /JJ2kkWJQF4PQY5ERUGIS7p00fxOSdCVEhJ092A0VitoGjBRTOEJfpjil5ucbtJIcV5E haAYDd+3e9nxlF78Ix235O5MktZqPdVqfK2ZSAbgo9DiuO1wNjXhNeqTd59oc80FeeZJ 2KiPQtmnZwLln1nUJd4C58nZfIMf+BVB9MRcXMfZyg8KE2iBZWgk7FBgsgRyCoYs7NWw V6FbwldelBBC8KGEvkXDxzPrWyUxoQvYm0O3rREF5xGiJ2T6hJaV2v3K02R3JHJh/yHl Welg== X-Gm-Message-State: AOAM532XH0oXrLL7rMs5t2pIwjM6BATWYJ6PcEL24pwu9hgfNTJ6CroK 9kguappOqMCZKtyFYXXPN6+7RZVXh5lO4mKB6KFP/EpGh6RqNjMaZ8h87jLSrZgrkWEusIw/S4k kBSk9ZOvRiMlnTA== X-Received: by 2002:adf:dd48:: with SMTP id u8mr4409079wrm.139.1618504407276; Thu, 15 Apr 2021 09:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGrT61qSo5wj8x2/RALyibrUug64G7g5M5VObIfAAHNuKgLeVhLpqhs/2rFWfX0dQiJbNh5A== X-Received: by 2002:adf:dd48:: with SMTP id u8mr4409067wrm.139.1618504407155; Thu, 15 Apr 2021 09:33:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 03/12] tests/qtest: Add qtest_has_accel() method Date: Thu, 15 Apr 2021 18:32:55 +0200 Message-Id: <20210415163304.4120052-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e --- Since v2: - reworded (Eric) Since v1: - rename qtest_probe_accel() -> qtest_has_accel() - run with -machine none before creating QTestState --- 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 71e359efcd3..2156b7e3972 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 Wed Nov 19 21:00:36 2025 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=1618504416; cv=none; d=zohomail.com; s=zohoarc; b=SluESzQmwfM47gkUETx6nBsS4t8Je8cnqlGhgwuDuC+7sZ8JHGpIDBngAHxBWGHMoS+QM/nAhJo69sSVjplJFg2IUarO0PXyCBT6zm9isYI2p3Wu5ytqKPuOP2bavlYebljDPIOkr4Ssc3I1qUpNqWkAn6+7oXNpBu7V83i96y0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504416; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=guk+TFRH4H8npjA92ucehbcfrQY0sqYaSCHgw+fxV9U=; b=Sx6fUl4ENNMTpeorUx6ist2jwKjEcx6IhRDti8mIvc9sa1hBf6q5lPNiwvZWNf3baen0qqDH4+aK7ZQiQaMlNPlSqC3aiG+zh17V8mrvH6hW0cVDyJ/E6zU9cMQYRzg4LrvkqrD630Cvcy5Nr2aHej+sJ5QkaBvW073HvyQiC14= 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 1618504416043318.59905758951913; Thu, 15 Apr 2021 09:33:36 -0700 (PDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-410-qAMoHJaxMyy10N7DPc48Vg-1; Thu, 15 Apr 2021 12:33:33 -0400 Received: by mail-wm1-f72.google.com with SMTP id x20-20020a7bc2140000b029012bb4d2b5d6so3064110wmi.1 for ; Thu, 15 Apr 2021 09:33:33 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id c16sm4237175wrt.83.2021.04.15.09.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504415; 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=guk+TFRH4H8npjA92ucehbcfrQY0sqYaSCHgw+fxV9U=; b=Vo4iMg6NJU8uetz4dDUge4u0XtPvgiFpk4g1w6ugv++u7i/O8prFjcjJB5Q915vRvYJJoG 4DOIcKptYQ9bW82N43h7GOnJC9w8jfpDEhZswN2OXd+3lnT+nAA4qe+CLIRxGAae6uA6hT +gpRuxFP2LfESlPjDKhEZ5PgHyUAQ84= X-MC-Unique: qAMoHJaxMyy10N7DPc48Vg-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=guk+TFRH4H8npjA92ucehbcfrQY0sqYaSCHgw+fxV9U=; b=LhCzlHThFPX4VWhtmMmQiUx05ahtZD3M2Rx7cuXtaQTCMqavOvSmdM83n98Y/38KFf zMJG5TROfS3PNMicYxJTKD+6m2AYOT3uzALj1szWWM6kbWWImSRy1k8710xXMCRUar+P 02Qk1OFWKANQ7+pESV5xd8p3sAp9wSh4xbkwtIghKXSSqJYet0TvOcNN2a6Dy1ovItrR EmDDT1EbEE3bLJHAToD97zEr3nNbvP3qkYodYEA8DmLXsSR2aPa0vmopvJIBwwVJpJ8z Mvpc45R8/ElUS94FAt/Ftz0KkNTOahTT2jllCf85lHyZO8d8LSNmIzfr1FomOjwuaFeE UAZA== X-Gm-Message-State: AOAM531tupu/6vjX8uQlHomnRP/eFjNj/MnR27wgr3zIHq0v3nNK2Nax 9ujI6rCL/GTUh2MY3jQbczbXyb3Ex9fw5AIxUXhauARGh2ZVWM4TgD8VmxdtH/oX+dAGcRTaUmQ Loo+ievLIu2Yycw== X-Received: by 2002:a05:6000:1371:: with SMTP id q17mr4470098wrz.326.1618504412585; Thu, 15 Apr 2021 09:33:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz37+TLiJ4JQ19VHyKVirevCnsB+vlTF+blZaCqp9kKRqtQnTtaB5LclLfiGkLP9dSG5P/+ag== X-Received: by 2002:a05:6000:1371:: with SMTP id q17mr4470067wrz.326.1618504412456; Thu, 15 Apr 2021 09:33:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 04/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM Date: Thu, 15 Apr 2021 18:32:56 +0200 Message-Id: <20210415163304.4120052-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Andrew Jones --- 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 Wed Nov 19 21:00:36 2025 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=1618504421; cv=none; d=zohomail.com; s=zohoarc; b=oKLIl8Fa/80VVU4k7E8pNmhZHXWk5Pc+IQJwF2AFCvxBMwizVVXR/4CYCNoyi5c+UWL1T5rxURjOTPHbeihSmLme7NNl79SX9haQxKQXhtaALVw4mJiMizmv4zSjPyAqrvhJ7C3NGyUAQFe2uHimI/qWqpmPkYRJ3dHVXr9fKpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504421; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=0xuLjWIAItsNJigm6O/64309pXXRrcZWKCiQ1igybp0=; b=HbnaX2MJH/hKNNgTcCmt9m72ScaiMXHG5D1rbUbmfnKXyjZY9NMHZ/gXAZIS+4OrSBPdf3sIGm5a3DlaQqwEOHQaVP3bxPFDjtcpmgqn+O63RLbpEFb882fKPVBGk1LDvvmQM13/M2ZahXEQhE3wQ6DWmUfyxvBkSsLEGxkdGvg= 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 1618504421283887.1846940222493; Thu, 15 Apr 2021 09:33:41 -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-350-n2WaTuk6PKKBAIbaIEX43g-1; Thu, 15 Apr 2021 12:33:38 -0400 Received: by mail-wr1-f70.google.com with SMTP id h3-20020adfa4c30000b02901027da44a81so2973772wrb.19 for ; Thu, 15 Apr 2021 09:33:38 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id g132sm3769616wmg.42.2021.04.15.09.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504420; 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=0xuLjWIAItsNJigm6O/64309pXXRrcZWKCiQ1igybp0=; b=iBYx/+S/do5qxcjpPA6jZ1Ki+r6ZCHlOoPXdrNhmfSMMRnLSToDAR0jOgYh0EAmOEH5a7z hcGswja3YfQdrStwMON+zwny/Sgd76d8/bed18T+xCJ8K5hXWtWR1YF/xd2muuZxyhUOyj DPzsWBC32Ze0GsVZXX3o0ZNDpSPTr90= X-MC-Unique: n2WaTuk6PKKBAIbaIEX43g-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=0xuLjWIAItsNJigm6O/64309pXXRrcZWKCiQ1igybp0=; b=cohP4W6LPOmNQa+Xf7FA/oLkkalMmOk7zM8wnnHXMJtIX2llCu5eRs8i7ThFMfmRNn MaSruYK0SjAsC+Xx4BDtrci/Ycp3n+DxZRV8QDN57ExyMW9sbUs3f9Ou9iXke7khXntd OMDkz1HyXriFEaqQyKOP3DuT618U8UeMZXIdSr7c2N6edrxjTF4EUXluuQr2ANb0RlxL XtDHwGbvDcUmNXjMgoL4LBMnaFVrKLz4V1Z5SUZ+QUaYR8odyQGQfj5Z7BC1X/O/cBa8 NsQf95gjeUgFgYzHpxRrGBrkoKlCqkpQQtUybq0kgI2C4qTQN73Y674Mi/9QrwlitqIS 2PIA== X-Gm-Message-State: AOAM533kaovEeGdhnxAjBzQA/nEuvqK4w8knpuWpEeBpNB/feOTQUkL3 gRrs25RMtbimFDZHM7sfU3/FqzMniqp1kJB8h0sEbj9+Q9fjVDz6g0lk3AspkQ3daz4YAqY+p6h Oo/ZwI8HWjwiIqQ== X-Received: by 2002:a7b:c357:: with SMTP id l23mr3995278wmj.152.1618504417583; Thu, 15 Apr 2021 09:33:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVpUiph4IZPHckgqf/Hr+XPjj1Vc4WDu9J0pzOwrcfOm8lURVdTIwdP5PK7UMtrK+aXOn91w== X-Received: by 2002:a7b:c357:: with SMTP id l23mr3995264wmj.152.1618504417479; Thu, 15 Apr 2021 09:33:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 05/12] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM Date: Thu, 15 Apr 2021 18:32:57 +0200 Message-Id: <20210415163304.4120052-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Andrew Jones --- 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 Wed Nov 19 21:00:36 2025 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=1618504427; cv=none; d=zohomail.com; s=zohoarc; b=G8jeHGPniYvo12E2ZlxRWfl78uMktkL6QTNnUnByVJ2AmHuhKOl4sUylS2/hxLDgK5hHX9LHED3G/0ps/AhdAVD8VJ48HvZdcOLqPTTa7z6GUjro9X9ad9BELtCtCVcSrQclA2hZYDcfyLg4/PaCsuiMQs8uL08Wspp/YJciYPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504427; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=9iw76Yu1vXx1t9abc6WDL1dztK1Y+iaVuos13TsdKz0=; b=dCkwLDSEPkJiu+AmIABkodlUKNAwDmhhawAks894WzTuMJhilab89YV56pVb7cdPzct0nl59nOLsQZL7Da1uaJLG+Z9Hu9Usqu9441H2yzOgHinBZX6cgfU5vEPrV+NDrCzdhaIaKmSz5VK+qYCN+9m640k/91FABMHnKgp/iCw= 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 1618504427511310.84378580969474; Thu, 15 Apr 2021 09:33:47 -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-569-BHWnAz_sPJ2TFE6tqCyAww-1; Thu, 15 Apr 2021 12:33:43 -0400 Received: by mail-wm1-f69.google.com with SMTP id f14-20020a05600c154eb029010e7bebb623so4334319wmg.5 for ; Thu, 15 Apr 2021 09:33:43 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id n9sm4275510wrq.86.2021.04.15.09.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504426; 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=9iw76Yu1vXx1t9abc6WDL1dztK1Y+iaVuos13TsdKz0=; b=TYOCR86z+XPdbtyu1534gN9YrQFZ0BOq+J+SSVrSKyjWKTwlNb47waNRWMdotQRa1xHQys Nh5mruBNcsoeMZFSgrYCbAS+fBtqf9iLeQ/uHcBMxbiQ/UIYBnsdGO42WWZRITY7Kw1pDN vL+EOMpDwPB5UnZZVTJxu7vwOnBXcOk= X-MC-Unique: BHWnAz_sPJ2TFE6tqCyAww-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=9iw76Yu1vXx1t9abc6WDL1dztK1Y+iaVuos13TsdKz0=; b=sBJsMTr/sJE3y/b/XDShR1qOTTOrULDFQ7Dl6DdE5wwSNPXB4npdk1bFJsEceqr6Fo t5OCbV6xHYRsacKzODjH/XINx78LqUI8kFkTwjgn/lmBc6tXvM78VUWx9LSI1+WJo/0J caeSP6C36qVVE8Zp4xWLBnMUftMw4uHqNcfX+TRBQMnIhF923ySF5oqE9u/gWQgnhDgA Og57Gr/eoK1Zue6pnntxtxPHmVmk23c2LaS9sI3cI/ByGTp44S1MtkZghmh92m7Ic1Md hdjS5H4jOgsSRoTxOF62OvfUWsh2GQVLfj40GJHcHPd0MV8xYrJlRAzwGXIsWQKChwbw LjpQ== X-Gm-Message-State: AOAM530EbM/SJAfRUa27z7JwITWcFKPeq+BpQAJo40qhCBM1SZ6tve0i Hd0vr4z3wi70YfmtH0D6qdyLck4ZbribK9BMF6Gf4jdfNuO0lNEmZ8xo0fwnzhg/94/aFMQ66Hw DKr3Hv0e2PmmcRA== X-Received: by 2002:a5d:678e:: with SMTP id v14mr4516088wru.156.1618504422820; Thu, 15 Apr 2021 09:33:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRpCuhJh5Oiof4QDDUwDbRS+6qfpyhrBDxOMyHGKahiOQNTazSAYPtkOEyztEdZJWV3djAsw== X-Received: by 2002:a5d:678e:: with SMTP id v14mr4516076wru.156.1618504422714; Thu, 15 Apr 2021 09:33:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 06/12] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests Date: Thu, 15 Apr 2021 18:32:58 +0200 Message-Id: <20210415163304.4120052-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Andrew Jones --- 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 Wed Nov 19 21:00:36 2025 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=1618504432; cv=none; d=zohomail.com; s=zohoarc; b=SRku4Q9BzRCuNSuoT8PbSykvxEhAfx34nAXeHQ/anAZz5HPm9f8E7HHW9LZbqM4bgumHHZW70nQkE0SqMRoCvvr/t5iHZqCCMCal3bHFfcUriZnV8vzbNjS8zXcAlTSadPj0GMCDZAP+rHWusFeJ/vGMI4BRiYZV49NPPHHmJ7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504432; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=IKnx1UsTiNnjJfU2KcMKe9foiZqOxTrajgakDx3VSoU=; b=Hhm6gUdGmoezvy09sThe3GO92sLswkyH+33z/o8wsC8CCD2lLfp+fTufHIOlmZD9YGH82SAteeaGDoFZiWjilBqrJzNT7N4f8PeMYOVZzN6D/fReNrHYEYJY0RlaLJIHNS+ZtFbRcn8n4bNXbXzuTgrVH/EMaFwVKMjo773Mha8= 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 1618504431998239.5607763219407; Thu, 15 Apr 2021 09:33:51 -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-329-tN6iZB5HOOGC-SjN1CPlJA-1; Thu, 15 Apr 2021 12:33:49 -0400 Received: by mail-wr1-f72.google.com with SMTP id f15-20020adffccf0000b02901028c7339ccso2996544wrs.1 for ; Thu, 15 Apr 2021 09:33:48 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id e13sm4820531wrg.72.2021.04.15.09.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504430; 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=IKnx1UsTiNnjJfU2KcMKe9foiZqOxTrajgakDx3VSoU=; b=gFKOAGtoZI2eS906svXjagiV9QaXbrY8G+w/zThPczdc5Db2cPzvQ9V/6RK3lYgfyePfUM 6MVD0/FId1ETsnHjNVoVinIcVCWEpBMHkGlSJmC1AIpOC3N4Aj3+mV/PBAokZzGTEw7o40 kMCr1Tt9aSNz2Uqbp1nNS6ci4YaY354= X-MC-Unique: tN6iZB5HOOGC-SjN1CPlJA-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=IKnx1UsTiNnjJfU2KcMKe9foiZqOxTrajgakDx3VSoU=; b=i+WlxHz2yD6VXO8MoG0AhXU++txyOyQouXBlEoidcxWLQWuzB5hqKNyuhZ/QXl1cE7 7HPwl2HGfHbFAqF/5TiciBuirgwGL1+ZQs49zk+mOS+ob/U2q+JgwtxM3DeAjy3nq8vX oUu8GprMaUQ0ZepiJrT6FWEja2nNe7bkLyGJVmRzA65RCsNUC1uFHOfYHp6S74lfCOft dvvdEKtqtPkRxZWgOh79vk0HA26e5skkONF8fEvppk9VwIXpBrIFU+MFKBdgLunD4gz6 I63tcv+dRK46HrSVHiNB6nOL0yoYx77bxczgRrlA8PNq/hwIiYzRezIq4n25PwrNx6aC pHgQ== X-Gm-Message-State: AOAM532j8VKmHcHXDdNdNfdbSu1WqF9bRzv6Mz11rKmhcaQnzV/9pHEj NPptUEWyrZK4lALmG37EmXy6KMglx07dbpj3PEmwBbt7JLyHNT/imJYMl3phFKxge3A3cpFgVT4 QpZjcUeIFuOESJA== X-Received: by 2002:adf:fe86:: with SMTP id l6mr4580811wrr.390.1618504428105; Thu, 15 Apr 2021 09:33:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFVULUhOKWBrh54/W+muyqJnSUaT5CgVbHS+dWc17jz2PcfiXy9XAMSjn2ooCobSsC4UHrDw== X-Received: by 2002:adf:fe86:: with SMTP id l6mr4580801wrr.390.1618504428000; Thu, 15 Apr 2021 09:33:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 07/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG Date: Thu, 15 Apr 2021 18:32:59 +0200 Message-Id: <20210415163304.4120052-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Andrew Jones --- 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 Wed Nov 19 21:00:36 2025 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=1618504436; cv=none; d=zohomail.com; s=zohoarc; b=JppYj3l7F5Bh426+LxuIkNevwvm36WdLEQrvi3xngAfps6oHV2P27ZFw3I4sNG9hh1at4Dxwbn8I43siPsaLLC4TiGVT6J0fy/wVMmc9vSYtxXHMGvCnn/LVBWMms0bwCgn1R9EutQCOmmXMKgyZAgeYTScMWzfYLvZEZQWWgos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504436; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tOeJRHeQ91TF8arzY33TfEs4YUKLXq9d/m6dOUlZ5Uw=; b=QRqNHFRXyPE2TF01bD06dQMPAJu5EpgjPG/Rl5r7XgJEs0idT5K7grZi6uf+wY7zWXX3YPyxyWgC5RnB8gdaOm63gbGVrTJi7/a5Etoivuefb+ssH5ksgw+MKBrCaKKOqB/K+VFAe3Sw4/lJ5QlF+X8HHMcuX9KTV/CvaIeMf94= 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 1618504436917725.8132768879154; Thu, 15 Apr 2021 09:33:56 -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-46-R97CvNoTOGimFsilXr8BMw-1; Thu, 15 Apr 2021 12:33:54 -0400 Received: by mail-wm1-f70.google.com with SMTP id g21-20020a1c4e150000b0290125a227e5bbso3061322wmh.0 for ; Thu, 15 Apr 2021 09:33:54 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id c16sm5006106wrs.81.2021.04.15.09.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504435; 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=tOeJRHeQ91TF8arzY33TfEs4YUKLXq9d/m6dOUlZ5Uw=; b=EOaOVZnNwZzdvN/hLbsC4edqV8bPcd7gOVUKD4f079m0Z1059WQb4dZ7EKTxty+bq+gmm5 dRu07kJv8gXftK63avwZWcJwFgjZSUxf9Hwyiv5OSJstjq6qvMb8wpre88KIjUo+NuXtk9 KfrASdzFfyUMHXxyFSX6mdXXqb4/Y4g= X-MC-Unique: R97CvNoTOGimFsilXr8BMw-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=tOeJRHeQ91TF8arzY33TfEs4YUKLXq9d/m6dOUlZ5Uw=; b=sfqPTcetW/oqL8DtBQ7wbdLlW5gUnt8fsYcvVq9O97V35WB3rtP98HPx4b6OzpSZl2 mP8fqalF41J4y7ggx6PSEBhddwuT2nD8ThQAZ0xyEUVUm0t2W7Cq4zMDMjzw5vtK+VsL uLczwzqLWtUd8Ib9f10BvHX/zuU89o8clPEB7AbwCP97JoUa0ALfwpG3f66J0q6Za79g n/6b9U4rcBgHtVy1OXcI6AdF+5uTC/cPE3gK7jhVXnESS23fulEIyIGQml7yIce7rIp7 8P+1KCMBiT1ixr0vnPW4muZw4qDVtfzFe5jp2bgmiHVOHjfiaHgr1gmAy8ZAkaAi7bR5 +UwQ== X-Gm-Message-State: AOAM530qdoyTSnnqHmoap3RQ6R2ZQdt4U6Xa5Soyn3oc+Wwbgg9O7ZFU UdCP6+V6R89YdBR06/5RTzllWBwPFkYFLPxE2A7Ag896Iy5lfDEDeC7H7ekttI4TcFqx9b+/xP9 +pva/r2RBJbNkhg== X-Received: by 2002:adf:e650:: with SMTP id b16mr4358160wrn.273.1618504433310; Thu, 15 Apr 2021 09:33:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTEnJGAgfOYYbfp75EJI9lzAYAiDa34LpV01tzfmyLogH7af70HinwatTnkmzTYMCJxO4M2Q== X-Received: by 2002:adf:e650:: with SMTP id b16mr4358131wrn.273.1618504433114; Thu, 15 Apr 2021 09:33:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 08/12] qtest/bios-tables-test: Make test build-independent from accelerator Date: Thu, 15 Apr 2021 18:33:00 +0200 Message-Id: <20210415163304.4120052-9-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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, 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e --- Since v1: use global tcg_accel_available, call qtest_has_accel() once --- tests/qtest/bios-tables-test.c | 99 ++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 47 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 156d4174aa3..a4c7bddf6f3 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,15 +719,11 @@ static void test_acpi_one(const char *params, test_da= ta *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); + test_acpi_load_tables(data, use_uefi); =20 if (getenv(ACPI_REBUILD_EXPECTED_AML)) { @@ -1504,6 +1501,8 @@ int main(int argc, char *argv[]) const char *arch =3D qtest_get_arch(); int ret; =20 + tcg_accel_available =3D qtest_has_accel("tcg"); + g_test_init(&argc, &argv, NULL); =20 if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { @@ -1512,56 +1511,62 @@ 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/oem-fields", test_acpi_oem_fields_pc); - qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); 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/piix4/smm-compat", - test_acpi_piix4_tcg_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); - qtest_add_func("acpi/q35/smm-compat", - test_acpi_q35_tcg_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); - 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= ); + if (tcg_accel_available) { + 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/piix4/bridge", test_acpi_piix4_tcg_bridge= ); + 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_numam= em); + 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/piix4/smm-compat", + test_acpi_piix4_tcg_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); + qtest_add_func("acpi/q35/smm-compat", + test_acpi_q35_tcg_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_hmat); + qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hma= t); + 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_tcg); + if (strcmp(arch, "x86_64") =3D=3D 0) { + 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); + if (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); + qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); + } qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); } ret =3D g_test_run(); --=20 2.26.3 From nobody Wed Nov 19 21:00:36 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1618504442; cv=none; d=zohomail.com; s=zohoarc; b=XTQNOi5O7IU86v5fPB+GQOuLbGVZ88s5wS39Lfv3QekIapSpEl7ZhU9TKa6co/aR+1ajZORtAUBVuiMsH8Fy4s1oGXQw1Nncgt7PaXH2iAiNI40JJ8GawrP82vli70GHEQdusSDLb6uoZDd3tapbs6SH0EhSOYjb/AQ89FL3sfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504442; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=0Z4+nmTFRYy19cLHZMOV8ZDTm2cOXzGsPlBiJeSnJ14=; b=g+rGgyz4utvlN6dTfi4Vm/878Uqi+mi+dyWrZ0/CfuqNUooBT7CgqwowSAsqk0A7VGQdN0CoIW3h/Q/9EXW0/DBD95Lj8beGwngYU4HDZPtefohf5CS7GTN3qyd68pCZFijY0wR8srefrV/fdI/bdEEOc4CPVYLIoeh3wrkz4W0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 161850444256811.955453119246954; Thu, 15 Apr 2021 09:34:02 -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-578-MW85Qek0No-iDajNS1TgrA-1; Thu, 15 Apr 2021 12:33:59 -0400 Received: by mail-wr1-f71.google.com with SMTP id s9-20020a5d51090000b02901028ea30da6so2989412wrt.7 for ; Thu, 15 Apr 2021 09:33:59 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id p14sm4199376wrn.49.2021.04.15.09.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504441; 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=0Z4+nmTFRYy19cLHZMOV8ZDTm2cOXzGsPlBiJeSnJ14=; b=GQkFQUHXkdCy6elNwNk+PvA2O+bYEM0NV7SWP4FNJUZUjvzUOQRO0auaNl62OiACA5o5Ly zHv7zfvYeKlydsimHBIhakkJRkVDGngF9fkzcv8H2HPJDXLZmzRlNH6g22vqE3GC+WUHcL sMwYKqFcRJIKsIgFKNKizp+UAEJOpqE= X-MC-Unique: MW85Qek0No-iDajNS1TgrA-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=0Z4+nmTFRYy19cLHZMOV8ZDTm2cOXzGsPlBiJeSnJ14=; b=oDhFCeP1ZOsYCtll4yGxB1MIyT5Rh8Y0lRU3YQOCwGbug7ovToKLbnen11V90npv5H lDWMtRB0KiyOcz5dhwXsT6P9+7HQamFTSQTO3CZNMIDi/d8EKjVWzRM3rxJD/YQEANbo Fdkc9RjDKBYwnqKgGi+XhQF8V/BSvZnjzlGEngg1vkfhcqYMb4qO5M2RDSjsmsxeZ/oe dqdmDQtLwf6jCFXVkQy0CPE5Mah7bXDOPLC3+HKlYtPH8QiJiqFil0hlq+r+v3mzuIve UuTkBnf3EUv+Bu2S5pByFWufqJ5TmBLTpQ8/c27SsN+YQ+tVCHM0hDEPA8dX1FQzx/j8 LmGQ== X-Gm-Message-State: AOAM5328Wbk94uKf3NfkeNBcHZxVXxlExjZa5eNu4LuTIHEUlgo1GOF1 09F5Mt6sQsHsvqS/UNTgFTCiC2nO/i/63qyUZLouo9EqKHJ+Gli9GrkmiJn1cAgCXo6Gz8+VH9j ZI6BHXYxtHOYiiA== X-Received: by 2002:a5d:4a0b:: with SMTP id m11mr4459649wrq.418.1618504438569; Thu, 15 Apr 2021 09:33:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpuyhglUlPvakTWpHy21mJ0764Sj2G96xf+4G1NOtTlj39STYofLf6NYmV6s9CWnEhM+fUpw== X-Received: by 2002:a5d:4a0b:: with SMTP id m11mr4459620wrq.418.1618504438472; Thu, 15 Apr 2021 09:33:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson , Greg Kurz , Halil Pasic , Cornelia Huck , Christian Borntraeger , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH v4 09/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 Date: Thu, 15 Apr 2021 18:33:01 +0200 Message-Id: <20210415163304.4120052-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cornelia Huck Reviewed-by: Greg Kurz --- Cc: David Gibson Cc: Greg Kurz Cc: Halil Pasic Cc: Cornelia Huck Cc: Christian Borntraeger Cc: qemu-ppc@nongnu.org Cc: qemu-s390x@nongnu.org --- 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 3a711bb4929..c32a2aa30a2 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1408,7 +1408,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(); } @@ -1419,7 +1419,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 Wed Nov 19 21:00:36 2025 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=1618504447; cv=none; d=zohomail.com; s=zohoarc; b=fMCZrTSrk7i8R0Ho8oFWOn6ImR07B4mVwKHPZ9SDgGt/oSzpaM+ghjpQjAkTVLrkInsrkWn6+uMaq2Kl7HQxbEKcqv/yFNxIWycLg8CFqOcxMCr/wxtfBtMAKmVCdemcYD9inIzcdIPxfs/SIN+viNzJ333wAgAX1d0ol60hHkI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504447; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=gXF3I2HiTrXmapky2sFUIdU4HSA6Nendcs7h4VxHKIw=; b=EYTnrQqNiEQD5qFwjXHjhLMmHuNJhfE593cFoD1tYpRv3Ep6waQ1BzyN0mzNFweE6D0HRlSH6u44xL2dqCkdtX1qcmYUPHeGJSvmxyiIiggMKSSU71I/ljiWa9R/+sH+2I/z78gjzMvpOzltZONGzQyr0JpB6UlzLljAFv4OW5M= 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 1618504447539928.0193709626791; Thu, 15 Apr 2021 09:34:07 -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-17-iRHx3wSgMomF7FNb_N2eIw-1; Thu, 15 Apr 2021 12:34:05 -0400 Received: by mail-wr1-f71.google.com with SMTP id 91-20020adf92e40000b029010470a9ebc4so1924847wrn.14 for ; Thu, 15 Apr 2021 09:34:05 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id j12sm4126038wro.29.2021.04.15.09.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504446; 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=gXF3I2HiTrXmapky2sFUIdU4HSA6Nendcs7h4VxHKIw=; b=QpYeCch5sWLnWOI2qZR6N5609QQrppTSPFfoiFgo721HIXFXMmLNxOHy0C2vxccxQrkIaN 7ST/mjZjDgCRuaom1IH6HLF04SOjC4RsVOaXVq/iuodXjK2NZfWf0fm3bMwDWpsKs0OM9A 0pNjljSfWZmCZJZ5OgHdOiSkrc2bY7A= X-MC-Unique: iRHx3wSgMomF7FNb_N2eIw-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=gXF3I2HiTrXmapky2sFUIdU4HSA6Nendcs7h4VxHKIw=; b=YKyzJPWCnicfQWu/wbBsF02oGVvS+syvaOCwTlqYgw0+hy7z83rDQHqEINYi47Lqec eGQJu43XiR13uhg//mTspd5PW9nmbEnFO67yljhbWmBny6qRPEG2dxuOw4j2ZROoqp4u 5CAcCBSFnq8vkVKF945LS83G4x/ShDU0aYDk5Q+drq6nvRjo/AD+kMCpWV2XVbHJ5gzv LGwUbtYY0pdnYzX61BjpIsQKSsVcif9qO20QFGB57iASeGYAtWj5NyL6VGm+lWL7kPG2 UGIVxluI1zSSwRNz+HRslfGJJ63TyY1fxfWpb6SIIzbIIYUg1i3wMaobRMIGiTGgPc7s zoVw== X-Gm-Message-State: AOAM5329zrUIlCiJT5JGimaXUlhKip829kVdfDW6G6jz8RFS5/j8xxiD Nib/wPXujzukG9MLg0HTpfvNGQoeuZDO7wC8L/T0FJwDXx/JLAxmNaNp8UdLwhjmlJPVunIA5n4 qUKoSmMVlmnV2LA== X-Received: by 2002:a05:600c:2211:: with SMTP id z17mr4007989wml.41.1618504443670; Thu, 15 Apr 2021 09:34:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiFxh9zumaQT2ovO0zmmObHaJ8LmOOcmECLKoRsmflXTp/tWLdjOFpqSK1HJvzeKu63tBqYw== X-Received: by 2002:a05:600c:2211:: with SMTP id z17mr4007963wml.41.1618504443538; Thu, 15 Apr 2021 09:34:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 10/12] qtest/qmp-cmd-test: Make test build-independent from accelerator Date: Thu, 15 Apr 2021 18:33:02 +0200 Message-Id: <20210415163304.4120052-11-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by a runtime check. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/qmp-cmd-test.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index c98b78d0339..8902d2f169f 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -21,19 +21,24 @@ const char common_args[] =3D "-nodefaults -machine none= "; =20 /* Query smoke tests */ =20 +static bool tcg_accel_available; + static int query_error_class(const char *cmd) { - static struct { + static const struct { const char *cmd; int err_class; + /* + * Pointer to boolean. + * If non-NULL and value is %true, the error class is skipped. + */ + bool *skip_err_class; } fails[] =3D { /* Success depends on build configuration: */ #ifndef CONFIG_SPICE { "query-spice", ERROR_CLASS_COMMAND_NOT_FOUND }, #endif -#ifndef CONFIG_TCG - { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND }, -#endif + { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND, &tcg_accel_availa= ble }, #ifndef CONFIG_VNC { "query-vnc", ERROR_CLASS_GENERIC_ERROR }, { "query-vnc-servers", ERROR_CLASS_GENERIC_ERROR }, @@ -51,6 +56,9 @@ static int query_error_class(const char *cmd) int i; =20 for (i =3D 0; fails[i].cmd; i++) { + if (fails[i].skip_err_class && *fails[i].skip_err_class) { + continue; + } if (!strcmp(cmd, fails[i].cmd)) { return fails[i].err_class; } @@ -334,6 +342,8 @@ int main(int argc, char *argv[]) QmpSchema schema; int ret; =20 + tcg_accel_available =3D qtest_has_accel("tcg"); + g_test_init(&argc, &argv, NULL); =20 qmp_schema_init(&schema); --=20 2.26.3 From nobody Wed Nov 19 21:00:36 2025 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=1618504452; cv=none; d=zohomail.com; s=zohoarc; b=GvuFUUgIbPHs70KYXNi6d68zekbUutxivS/uwspv3P50HDzaMIc85zjsA26Yr5p/XAiyWLPS5TLVrJ6z+KzXl4/zPN3Q1E+0NH+rUJz4o9KbTe09JYnkHbNfVw/7CpmkJoPUouBU88fgOydr4GAXJTgFskYYBUh1PqxR6BaL+wY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504452; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=VGzikIBP/Z5SEBvKQqeWbm5PvQswPv/9xcZd1fSf1xk=; b=kb2dPUCoUV+v6F5/zsj4RmiljY9eLkpwyDVCJcgAa6VEdUcRr1kmErn6B0ZwJ8s+cGV7jFV9SJck/7TEciftfxUQh+6JNHBZ12IdxMbr69LUUa45yzdflgvK3N8uvsIZ+PLX0/vMvCL3NW0IbikV66lINiid00rhb75jxZfPNjk= 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 1618504452392464.0228690954318; Thu, 15 Apr 2021 09:34:12 -0700 (PDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-336-G7coUlFLOJaPqo7WdYE-yw-1; Thu, 15 Apr 2021 12:34:10 -0400 Received: by mail-wm1-f72.google.com with SMTP id j3-20020a1c55030000b029012e7c06101aso1435824wmb.5 for ; Thu, 15 Apr 2021 09:34:09 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id c1sm4236652wrx.89.2021.04.15.09.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504451; 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=VGzikIBP/Z5SEBvKQqeWbm5PvQswPv/9xcZd1fSf1xk=; b=clRhp04lPfhxJDX7xDHNWYNajvVDBonDBwk/Yh7FrzeQYfaymwBosmznl2yZ8GERAzipCB SY9dNBAyxCeP+8uaTTIuHPvrEZwzGpH9nm6S1XHQnJzH8LXuzvC5K5nRN9ZzzUGLCfoNkE d57Q4AiiT7BWr9mnA7FfYoxOcNIo5oQ= X-MC-Unique: G7coUlFLOJaPqo7WdYE-yw-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=VGzikIBP/Z5SEBvKQqeWbm5PvQswPv/9xcZd1fSf1xk=; b=V/70O9rc7tc6JJNHxhAK6N5byOzXJ8p/vBv7GAUDhLNBWTBZm/6kPO03Xu2cMASCnA 207oYkJhomyePcV7G/YCpGyVv9t2s/m8wmkYbMR/1He7dkyGMLLZu6116TFkK0mbPl0X /qavhPEVFUC3PmtvEUuuwrE8+040X3oWOKNxGT3hW9SVt2jXr6d+XTQuVAH0wRt9inkB BrZJ9qPa5UKBUv1CBF1O/X0IQjSEuQcFi02+tV7MkfWBgbC+BlQmg/DsN2EpIvSXaC/d hUaS6vceUgHc0FK8eQ5jrchWlI0zmrbSDF3cMR43/x14tnsYRXu6Uhsq765fqxn6pmtO LtTw== X-Gm-Message-State: AOAM532SdMO82Vts4Id4jWvnalq31v9A8gwWq8yy2ERTZdmrJi3YHxpe 8Zvw4CRb1ck8ziB6QyetTBS/kWmXZROiWpY7S9XATN9EukGQSGSTLvt+Ts7aDqZ3HYdGTa25IMT Cy3aG7htqPNYrCw== X-Received: by 2002:adf:9148:: with SMTP id j66mr4505320wrj.124.1618504448903; Thu, 15 Apr 2021 09:34:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7KSEZ6h11mgqXKUQcN7HUrjscZfTNVD6dvmc/kqNupzUF+B9S1FwFPwgm1RZiefT37+Qowg== X-Received: by 2002:adf:9148:: with SMTP id j66mr4505308wrj.124.1618504448726; Thu, 15 Apr 2021 09:34:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 11/12] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore Date: Thu, 15 Apr 2021 18:33:03 +0200 Message-Id: <20210415163304.4120052-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --- 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 0c767389217..46de073d155 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -175,14 +175,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 From nobody Wed Nov 19 21:00:36 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1618504459; cv=none; d=zohomail.com; s=zohoarc; b=V/t1EYxKnqFjKMPmi6nPG5YR+HzCdy3eUe0+/0wOdzEiQ0ZwVb849rfCoV+LOsZ+V0Sz/WfGREOCw4hxwnlaXzmn1XDDBpEg3AbhnBtwhj2aT3Rc6xfspskgJbl4fd/vHHSqc/I3cpxkJ8HOtt6fNFThXDTrq+65zRKOhMndRlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618504459; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sTefL8KFB03yS8Z+kdiNHNixKSuiXSG+jyZydBtqNkg=; b=JGBXWqiiT1hdj0vo1Z7zlNRH9gNlSjSzzMVJ6ZNqrvOowv1+HyPZmv2k/3h8vztHuu1YIVRPSwbq741rp0Or6iEMROlU4IttFFyQKbZNz71bLHGorBLmyQzsnjYcKVXMRui+/88UMIWqBGUM8EqPoGKt7no+DAyZ2reu4xtey0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1618504459195209.26261099606484; Thu, 15 Apr 2021 09:34:19 -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-548-uSfnK3lTM06R6MXT3OVy2w-1; Thu, 15 Apr 2021 12:34:15 -0400 Received: by mail-wm1-f70.google.com with SMTP id y82-20020a1ce1550000b02901262158f1e9so3821755wmg.8 for ; Thu, 15 Apr 2021 09:34:15 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id f11sm3552479wmc.6.2021.04.15.09.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 09:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618504457; 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=sTefL8KFB03yS8Z+kdiNHNixKSuiXSG+jyZydBtqNkg=; b=J/9/2DPR0phF51BFo4FSvHslgI31V4Qyr0ckKn/p5ZbJYQPDcgiFRDZl5mHjTbNpxBVW5x h2l6ZaTVJQ/s+nOphJC5UHreYqhFvo1gtrSVRMjnqVi65L5Ti8JJZBqMB4fVlkOc/WK7I1 zqMh8p14faLzz9nQw2cCuXuxDz8Do+k= X-MC-Unique: uSfnK3lTM06R6MXT3OVy2w-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=sTefL8KFB03yS8Z+kdiNHNixKSuiXSG+jyZydBtqNkg=; b=rKJv4aSw0v3AvlwHpBVkM2O0M3iZ4xBodEnY3Z/darZR65sJJ/+fhPJ9O8+fvCo8WQ RG53cA1qusBc9v/629YYxUyV6Dy+yCYPLvO8PbKdtdvB5MO5oVj064AhTWA2wzRSWokV vZD0mDRkC831VdCuYN5jLcZ9IU6dDOLjr94jisNfMsgg0gjwR96hjEbHFDEcyJMSOgsA Z1pbM5h602N1EKr2HB55RyslLz7m0IE7ngiAEfx1ABvDFwSy0pQmDUDmQJlu0JVqY/CH ZWO8JAQPX76H21+PvEfbnF8eUq+18dU/WjWj+0Uxx0e4QlX6lBn3Va/7ScflQkK3u6Ex TgWQ== X-Gm-Message-State: AOAM531sPSBBnl3xdgXXCoo7ijHMixhNMrywemHKL5aR+sMWW/zQxiB2 5YZwLhWEJQfVOLcLxxRywpDqh9itiW0xq09pS0cy8fC0fhZvWCTJ+BLGLZR9NrdprXFm/VyGTij Kc/+AyddnN9Lxaw== X-Received: by 2002:a5d:40c1:: with SMTP id b1mr4607872wrq.33.1618504454322; Thu, 15 Apr 2021 09:34:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1mCB1CJIwc4m4QG16DAMO2mbDNJ3r+knYlQB+Gd8Tdlp9fwrgFzh3Dre9+0E9D06QxZ9Rwg== X-Received: by 2002:a5d:40c1:: with SMTP id b1mr4607861wrq.33.1618504454205; Thu, 15 Apr 2021 09:34:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Eduardo Habkost , qemu-arm@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Markus Armbruster , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Laurent Vivier , Andrew Jones , Richard Henderson , Juan Quintela , Thomas Huth , Peter Maydell , "Dr. David Alan Gilbert" , Eric Blake , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Emilio G . Cota" Subject: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected Date: Thu, 15 Apr 2021 18:33:04 +0200 Message-Id: <20210415163304.4120052-13-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210415163304.4120052-1-philmd@redhat.com> References: <20210415163304.4120052-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) From: Philippe Mathieu-Daud=C3=A9 The previous attempt (commit f77147cd4de) doesn't work as expected, as we still have CONFIG_TCG=3D1 when using: configure --disable-system --disable-user Now than we have removed the use of CONFIG_TCG from target-dependent files in tests/qtest/, we can remove the unconditional definition of CONFIG_TCG in config_host. This avoid to build a bunch of unrequired objects when building with --disable-tcg (in particular the softfloat tests): Before: $ make [1/812] Generating trace-qom.h with a custom command ... After: $ make [1/349] Generating trace-qom.h with a custom command ... A difference of 463 objects... Reported-by: Claudio Fontana Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: Include Paolo's feedback: https://www.mail-archive.com/qemu-devel@nongnu.org/msg793872.html therefore o not include Alex's R-b tag. Cc: Richard Henderson Cc: Alex Benn=C3=A9e Cc: Emilio G. Cota --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index c6f4b0cf5e8..623cbe50685 100644 --- a/meson.build +++ b/meson.build @@ -262,7 +262,6 @@ language: ['c', 'cpp', 'objc']) =20 accelerators +=3D 'CONFIG_TCG' - config_host +=3D { 'CONFIG_TCG': 'y' } endif =20 if 'CONFIG_KVM' not in accelerators and get_option('kvm').enabled() --=20 2.26.3