From patchwork Sat May 1 22:36:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D928DC433B4 for ; Sat, 1 May 2021 22:38:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91EAF61221 for ; Sat, 1 May 2021 22:38:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91EAF61221 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyFm-00061k-Lk for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:38:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEG-000494-6O for qemu-devel@nongnu.org; Sat, 01 May 2021 18:36:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyED-00087p-IB for qemu-devel@nongnu.org; Sat, 01 May 2021 18:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908608; 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=Q6/hT/PIJKMoFbY2PhDO/rAVfPgYfzeV9gjOhaljcfU=; b=Zy39JdQIqBoZxGXQsfoARkliH8D7S8iE2XufsrJU/trAqScw7HSr42XoZnS6gnYZfrZOtE xHqM5pfVte/uyZwrcxmlE/W23M8EzROg/9Z4PZIg5fXRkZhdtJsVTPk2d/CH/fdM5LbUpe m2gk0BYHsKYnlmcSjmJOnZcB+8uz4mo= 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-345-6bT0zKreM1Gbi3OC7tsb2w-1; Sat, 01 May 2021 18:36:47 -0400 X-MC-Unique: 6bT0zKreM1Gbi3OC7tsb2w-1 Received: by mail-wr1-f70.google.com with SMTP id h60-20020adf90420000b029010418c4cd0cso1285825wrh.12 for ; Sat, 01 May 2021 15:36:47 -0700 (PDT) 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=Q6/hT/PIJKMoFbY2PhDO/rAVfPgYfzeV9gjOhaljcfU=; b=b8sB8eVgzittu6s5DJrGjPugRE38rT7xjOFX49ZgmbNFeS9a5k6FP5iBOyiCKldSWp E8HFYrsgpe+sm6TmnMBlJt8pbOOT4jsj3vuYSSEPzGGxRDbtf2D6ej0rilsL6K4IiXoL 5sUAm4VAcSAqwcVF4dlioCcyYNav9BKyVWItuXG2rGPYnz83yYduW669gQst5wxap1qZ CusAZK2wwKmk7CAd+hxYvjMobcHYeHiUjimHQWtnJW2GfjdhlCXauzxWxphUHZmFVeZX By/GuST/o1gxsmmwbzq4y/FhmT3J4a+Lg3gEhpSENNt46ABjkusCNzmp0K0+50V/dS+2 f9rQ== X-Gm-Message-State: AOAM533dpQjRoceVWmgiViXRXBlfBNhaldibrF4FzijxFnp7fJm9kfAM 7ZeEtxLQUpmuysGrxfvMZg3i6zq/pt2MUaemT+nYu0fYQblJ94WGpU5d7mdRAPcRiRDu1aIjd8h C8pDFNQQuPmJwArHYH1AzRpY+fSCHgheooeBvcOV/MCLHTDjW2VMsA4AGgwh3W8zC X-Received: by 2002:a1c:5945:: with SMTP id n66mr13739570wmb.139.1619908606074; Sat, 01 May 2021 15:36:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRtwoaKF09JBQQTEcLGM34cADJCYOJwykKT5bzZk0b65Zgjykd4tZQTMH/+gnxeSogNnFeAA== X-Received: by 2002:a1c:5945:: with SMTP id n66mr13739542wmb.139.1619908605850; Sat, 01 May 2021 15:36:45 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id z7sm7154737wrl.11.2021.05.01.15.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:36:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 01/10] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section Date: Sun, 2 May 2021 00:36:29 +0200 Message-Id: <20210501223638.510712-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4c05ff8bbab..5f1f59f9b3c 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 From patchwork Sat May 1 22:36:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34C6BC433B4 for ; Sat, 1 May 2021 22:40:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8CADF61221 for ; Sat, 1 May 2021 22:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CADF61221 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyHT-0008Gb-KW for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:40:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEK-0004Ih-AW for qemu-devel@nongnu.org; Sat, 01 May 2021 18:36:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEI-0008Dq-EN for qemu-devel@nongnu.org; Sat, 01 May 2021 18:36:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908613; 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=P/JwIaYRijlIKIuvZy1yv4gicsUV0JiEB0BppIoUwQc=; b=hD8/sTsMzM6w6BlcGs9qHF6TQ10h9/8DIKCBiTVJ+gejDaToRxU/Xrpk6ZARAxHtq2eIx6 xlCIQH+Iz4qSGlrx6eX8ntudxjvxKDTXVFwz409UYIVIXwJKEB5zFudW4f2yDKt/OoWRiQ YdMjlizht0kToQjeVpvpyn/f/QgOTW0= 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-528-2Lsiqz24MWqJ0t-ss1OorQ-1; Sat, 01 May 2021 18:36:52 -0400 X-MC-Unique: 2Lsiqz24MWqJ0t-ss1OorQ-1 Received: by mail-wr1-f72.google.com with SMTP id i32-20020adf90a30000b029010d9e6b3833so1278814wri.18 for ; Sat, 01 May 2021 15:36:52 -0700 (PDT) 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=P/JwIaYRijlIKIuvZy1yv4gicsUV0JiEB0BppIoUwQc=; b=cSrdL6yXQh/RF0jd4WCs4dtmB3keVKgVgY4vlbFQQXBQ6cBVm0IFVzFsgfrJHeezJ5 4V8nNboaDblxwTbcsvZQ4HuUjW87wpIdecaamZM0dYUENLzy5KVAzy3Pp2g7kv28QB+r vw0xtE3tNazwR0VNSDoN1gV5Uct/iuwJ37ytsL+0Vkg1FCg9wAXYSQtfHtcsGSWXdma2 uWet5FGR8UyUxwtytW4kOZq3eT8tUlNakjfQzSm1eA33PDaBROO9tmiRwjIJVPtFoZDW LobkSvSUYb/NCNa6E5duiDoUdUuVQZWG9L3lBv/voDkLw7X1UQfVhLZVdeI4o8/OGMU7 sQkQ== X-Gm-Message-State: AOAM532EWwoCG1Dx0WvbAkWhxrpr2HitOQDV/3BKNj6CAU2jpOeY9uq+ UVlwzB2YFDxp7U9EohwNLl24Tdn96wp/aW9O7Q+5zUxyVBItCWOSoH5Ff4p+lbVBsz6CGiWj6EW gMAm9DlcBkdfEluc5u+UT6dHdtCi+cs9w4bCt1fia5JRn1YYpuaV12zPMsQLgOdXC X-Received: by 2002:adf:e412:: with SMTP id g18mr16077769wrm.205.1619908611221; Sat, 01 May 2021 15:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM4BHt2yyU8i4o9rA/zpuVv9duUDrB5qs1XT5dWGU9kZEph9GZHIhMZGhXT7DqSFr7rZ4t6A== X-Received: by 2002:adf:e412:: with SMTP id g18mr16077724wrm.205.1619908610815; Sat, 01 May 2021 15:36:50 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id l14sm6220149wmq.4.2021.05.01.15.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:36:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 02/10] accel: Introduce 'query-accels' QMP command Date: Sun, 2 May 2021 00:36:30 +0200 Message-Id: <20210501223638.510712-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Eduardo Habkost , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- 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..6dd3b765248 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': [ 'hax', 'hvf', 'kvm', 'qtest', 'tcg', '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] = { + [ACCELERATOR_QTEST] = true, +#ifdef CONFIG_TCG + [ACCELERATOR_TCG] = true, +#endif +#ifdef CONFIG_KVM + [ACCELERATOR_KVM] = true, +#endif +#ifdef CONFIG_HAX + [ACCELERATOR_HAX] = true, +#endif +#ifdef CONFIG_HVF + [ACCELERATOR_HVF] = true, +#endif +#ifdef CONFIG_WHPX + [ACCELERATOR_WHPX] = true, +#endif +#ifdef CONFIG_XEN_BACKEND + [ACCELERATOR_XEN] = true, +#endif +}; + +AcceleratorInfoList *qmp_query_accels(Error **errp) +{ + AcceleratorInfoList *list = NULL, **tail = &list; + + for (Accelerator accel = 0; accel < ACCELERATOR__MAX; accel++) { + if (accel_builtin_list[accel]) { + AcceleratorInfo *info = g_new0(AcceleratorInfo, 1); + + info->name = 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')) From patchwork Sat May 1 22:36:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B341DC433ED for ; Sat, 1 May 2021 22:42:46 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FD3361409 for ; Sat, 1 May 2021 22:42:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FD3361409 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyJx-0002aI-G9 for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:42:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEO-0004R9-HK for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEM-0008Hj-W8 for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908618; 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=KvNHYhxkAqUqa9h+Qg11UCChxb8z3nuwgPPE3IGPHzY=; b=VlsltCOxyJRbch0PLwvgEEZfoKSOkyzKik8jtv6xws9St1R0+enZozBv5CY2YrlkYRtifU zvCSLKfQZ+is95hbVQMKo/KtiGvGXVUEWUviXQ0gZwo0jd5XhOEFRJZ8QY4yqyAIyrhb6q Do9lQgf/ZTIDZezG4RDY2lbAYHnBq4w= 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-586-KxmcaGUdNROAui3tJjQ41Q-1; Sat, 01 May 2021 18:36:57 -0400 X-MC-Unique: KxmcaGUdNROAui3tJjQ41Q-1 Received: by mail-wr1-f72.google.com with SMTP id s7-20020adfc5470000b0290106eef17cbdso1282562wrf.11 for ; Sat, 01 May 2021 15:36:56 -0700 (PDT) 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=KvNHYhxkAqUqa9h+Qg11UCChxb8z3nuwgPPE3IGPHzY=; b=M3FF4iZ+u9/1rstmGp+PCUo2nQVDCrHdkg0gvcank1DOSieKI9mHAqRybDE9DqjY0+ HMILeGlVSIb541+UB9cvNYafAFxRIw0MQutV1Ir3BNZeo7PJ9wDxwN9cuhXWo1F8g9WI aJdUfGBegoR7Woxzi8v9gcSx7rw12zSkqUYI5AHeZh9NoplyO6CceTxO7mPmQGLxVwCc fJrew/XXUUOZGYYaxxEvuqt7TMthhvW9xYss5XbPOz/9CKQ85TaB0IVeQKBICSgWKfIS DSOX3Ge7ablrbIlXP6fOLOQu1PFetzwka8Qquk1pJp/fnRo2UjLgRF9cWe6Cz4esZFF2 nizA== X-Gm-Message-State: AOAM531xv4dQ0FwHdqJqq+buiaNK/Yyyuvsz/UaPf7FoKkNVUK7wkIFs Fse9NLaRepXe0SwUJJpRXVMesG9uk4ZZ9ztEJKyXLGuLF9pGv/0z0o3QN1SryMwmpo+MKDY0gYn N0Wbc8HudKfI3+XGEq0YGAw4eWLCzht8P+105SQHOwupReePx/mzwl81V2EWj1Ni5 X-Received: by 2002:adf:fd0c:: with SMTP id e12mr3860681wrr.111.1619908615742; Sat, 01 May 2021 15:36:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn0mNPqpviMBqvwGpey6yvYbioi6rCsf3OxMpCVr2STxoQww3bFfq9mE8/L++4wHSsFlqTfA== X-Received: by 2002:adf:fd0c:: with SMTP id e12mr3860658wrr.111.1619908615597; Sat, 01 May 2021 15:36:55 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id s16sm16600778wmh.11.2021.05.01.15.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:36:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 03/10] tests/qtest: Add qtest_has_accel() method Date: Sun, 2 May 2021 00:36:31 +0200 Message-Id: <20210501223638.510712-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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); +/** + * 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_args, int *sock_fd) return qts; } +bool qtest_has_accel(const char *accel_name) +{ + bool has_accel = false; + QDict *response; + QList *accels; + QListEntry *accel; + QTestState *qts; + + qts = qtest_initf("-accel qtest -machine none"); + response = qtest_qmp(qts, "{'execute': 'query-accels'}"); + accels = qdict_get_qlist(response, "return"); + + QLIST_FOREACH_ENTRY(accels, accel) { + QDict *accel_dict = qobject_to(QDict, qlist_entry_obj(accel)); + const char *name = qdict_get_str(accel_dict, "name"); + + if (g_str_equal(name, accel_name)) { + has_accel = true; + break; + } + } + qobject_unref(response); + + qtest_quit(qts); + + return has_accel; +} + + void qtest_quit(QTestState *s) { qtest_remove_abrt_handler(s); From patchwork Sat May 1 22:36:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C63EC433ED for ; Sat, 1 May 2021 22:38:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD9F16139A for ; Sat, 1 May 2021 22:38:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD9F16139A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyFo-00066D-Or for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:38:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEU-0004Z1-S8 for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyES-0008Kd-0Z for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908623; 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=XYuomF3RVr2ArVkgFPo682BONif8uR+qP5NkayUoAU+thLb/4lBoABmSzq+KCzXctpxvBx 7qd1y0yJUtc+MVzJRu+AtFrQVDgGjvX/Hlw/aI2jG5EhRzdyuvY+qMpwkEoMaxBjxZ7lLG poEW/DnRxZL5pYuPJh+wVN64Edk5q5s= 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-203-xEvtQ6y6NY-xkgUJu6yxsA-1; Sat, 01 May 2021 18:37:02 -0400 X-MC-Unique: xEvtQ6y6NY-xkgUJu6yxsA-1 Received: by mail-wr1-f71.google.com with SMTP id t5-20020adfb7c50000b029010dd0bb24cfso654814wre.2 for ; Sat, 01 May 2021 15:37:01 -0700 (PDT) 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=YzCVHY1WGlQyWWdpbpQir1l8FfxaJfQctGerpDdTH3wlsPOWPPvmMv0w1oh513Nobh tMQjhMyo0EXwEIWxRzgMv53ZkqAaL3zKIrmYcKTjK5B9cjaj7BrsDf2oYOh1iU0/a2Nc h2BHcvcP8A8+AvhYVk1lFsC4C5Ax1OuAPUiU4deyl34RC2f2piQhmqo+IX/VtNpH0iNL HN4qAAKYtdzlOaIuAbIWQXYc0xxIpUj3Wt7fUo+aLl1xkvJVDbP5cXPzfihmpk6O5W/l dPyfVO/CqqdNowasrYxur6S7p/M2Q7qHsrGvOUjXFNfPvDLpdAsxgyvVeE5JLCS8elMx 1MyQ== X-Gm-Message-State: AOAM530+X7Fqo4WvVr/0y6ah6THrrBMcHvPP1sQ60L9N6NbSpqEaNZJs rUWfwxVUCOcQfJk+4eE0D/F+yqMOCyttUlEaWqEQ80aDgeJfl26cT/DDqgJkyz+jCPwPITMR+7W WC09kiHGue0OgILVEfbahsW4Vq6KX5CsxwSFhUnH6X7BfTgtNXCa41Qdyzn46tn2Y X-Received: by 2002:a5d:6402:: with SMTP id z2mr15766599wru.7.1619908620819; Sat, 01 May 2021 15:37:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydHkF1nFsD6v3ghTqvjA382j+7drkcbTObCLa6Zz57LeItnKKqwKxleO0Ej/I7nKecQq1eiQ== X-Received: by 2002:a5d:6402:: with SMTP id z2mr15766570wru.7.1619908620603; Sat, 01 May 2021 15:37:00 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id t206sm6797726wmb.11.2021.05.01.15.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 04/10] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM Date: Sun, 2 May 2021 00:36:32 +0200 Message-Id: <20210501223638.510712-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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 "}}" -static bool kvm_enabled(QTestState *qts) -{ - QDict *resp, *qdict; - bool enabled; - - resp = qtest_qmp(qts, "{ 'execute': 'query-kvm' }"); - g_assert(qdict_haskey(resp, "return")); - qdict = qdict_get_qdict(resp, "return"); - g_assert(qdict_haskey(qdict, "enabled")); - enabled = 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 void *data) qts = qtest_init(MACHINE_KVM "-cpu max"); - /* - * 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); } From patchwork Sat May 1 22:36:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8370BC433ED for ; Sat, 1 May 2021 22:41:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16D9D61221 for ; Sat, 1 May 2021 22:41:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16D9D61221 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyIP-0000vm-7c for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:41:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEY-0004Zx-IE for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEX-0008Nb-0N for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908628; 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=eHIAeIWbqj0astnoA60gFDaDFnuwXOxrXGW0Emt5WWW8q4y3qxbl+5FBptTy/RdRDnNL4b fR96/w0OLIdQ8hA4JRiDN8P4//6i+HAxBAfW0Sqq/dGHyMTjSsHTRP+uUR6sTiMo0Sfv5y oUSxxcEJ5sK/QRsuSv0RpORFgmmvW1Q= 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-533-k6sN0xOWPPuq-nL-14RbGg-1; Sat, 01 May 2021 18:37:07 -0400 X-MC-Unique: k6sN0xOWPPuq-nL-14RbGg-1 Received: by mail-wr1-f69.google.com with SMTP id 67-20020adf81490000b029010756d109e6so1277103wrm.13 for ; Sat, 01 May 2021 15:37:06 -0700 (PDT) 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=MUOL4FbXBFSdm2GUPmL8Z40baAuGnU6HAs+5D+kKm1m2GeQxaGVJfFZTdIb8bIttmT VoIpaK4g9BbFqbH8pAvAHiU9OKoi5QDSAzmj650lJuZir2DZzAAvudJRO7XQ/Z3IsRh0 SEjeJnX16sW11BoD6oPOvowzxg2AaHKH/DL1EkJMFJlsmK46UHWpzEaS+zBpe5nu0mU6 fz7zfYt1X8iFT0RwtIKmUUg4UPq/I8syuj/MhYWIBmkCqQ7b19XhUr2g2yjsANT6Q8Me ZjOi+pgcOJrwmfTQlB34mlzu9q/Wl6A+HbYAeOPvU4a9kqEPZZFk4IxzXGohx7QDhTIb kgmw== X-Gm-Message-State: AOAM5322tYL4o6TV0hofdGgrUi63vBCWPBI0ICPjTQVOknx1HEPa4hKl eILUNEePcOtrvmhRFwQi3WjXagJKAAZTbIZZ8d+5mGX9r1NQtIfTIPtmPBMzkcnhygPzKJj+svV oiVcSZZryANk+jBx0mHR1jJFWZvmcacu2ceiyFZgJFzdXL+DtbapEClqHn3CQpqOK X-Received: by 2002:a05:600c:1907:: with SMTP id j7mr13076088wmq.158.1619908625589; Sat, 01 May 2021 15:37:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtvJ574OASz8WHsavoBlG4k6JyZrbSbGZFkzQvshH+3tEyGuCJ6yV+mAQOLN9RQAC6Rw8dyQ== X-Received: by 2002:a05:600c:1907:: with SMTP id j7mr13076065wmq.158.1619908625457; Sat, 01 May 2021 15:37:05 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id d5sm7408486wrv.43.2021.05.01.15.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 05/10] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM Date: Sun, 2 May 2021 00:36:33 +0200 Message-Id: <20210501223638.510712-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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); } 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); } return g_test_run(); From patchwork Sat May 1 22:36:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91BCBC433B4 for ; Sat, 1 May 2021 22:40:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30B2261221 for ; Sat, 1 May 2021 22:40:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30B2261221 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyID-0000e0-Aj for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:40:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEg-0004kK-BZ for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEb-0008QQ-R9 for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908633; 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=heipv+jjCUKC/pGkJX+IvuEUqOwA2t0cp5r+acuG0vwo0HKmSG7cW/4+YibXth1mccIQqT gyjcF9hMyxDzgL53oh6m4iqYlGUC1XjqcoyD9nkEgNWCgILwKwNbOxGOKFlnAusBUDa57+ Mi2ZMnNzPn9akS/btCZAh4sR19TcEgA= 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-406-lgT5DAd9PeyKCBkBX6DsVA-1; Sat, 01 May 2021 18:37:11 -0400 X-MC-Unique: lgT5DAd9PeyKCBkBX6DsVA-1 Received: by mail-wr1-f70.google.com with SMTP id j72-20020adf914e0000b02901073cdd9d65so1330735wrj.0 for ; Sat, 01 May 2021 15:37:11 -0700 (PDT) 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=L6bLBuGIhwBM/ngn+F0SCNvlCcbnJ/BItc3XT8eQotH0PXGpVx9ZJGFF5YkdjyAC++ 5PRh+Epxhh/FrnKUrH/iU+oUiqcg1yYsVAdaOqozIWd9USqj1EyxpasSijLCvTN6eX9M HvtdBHqCifxMo5ekx5SnrUY1hrGuahi3peqCcUcdYgpQbMWQabeWO7TvqlSFwwQ20F8I 6HDzMf3jiOufFx54fjoVIIwgn3cVVtQ73TsydJPZ1RLK81q95Pgp5kUBa0+mdOYGVhQ1 y+FsDV2ay0NvMNeYfZWPGCHa6wnMsAAWxFgnCze9PZrI3DzqqzF0SXPGNGszZfQ7mUO6 Jy+w== X-Gm-Message-State: AOAM532+mmQF/NFf19K6hJdS4T8A40mpELtqn5kBCRp7LLcBLr8gj7rl BpOR23givVCBENjdokgbQul6SvOeW5T6QZw1zzbGhEHYO17TenU5Tl85n0Y7Le21oQaGgx5tj2B Jl0s2UhVoE53YgBEQ8rOhrpJmthk1CacJkGOnFlhJz9smeWWcncvdQ0J5UI+Fqhtd X-Received: by 2002:a5d:6207:: with SMTP id y7mr14238818wru.39.1619908630433; Sat, 01 May 2021 15:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9v5mswuMzteBCTgaVe2vlEq7AxFtWvYuq70E2LGx7bEUYBWXWPDrDLwZCnIyKLfshUbHP0g== X-Received: by 2002:a5d:6207:: with SMTP id y7mr14238787wru.39.1619908630241; Sat, 01 May 2021 15:37:10 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id c2sm6658948wmr.22.2021.05.01.15.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 06/10] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests Date: Sun, 2 May 2021 00:36:34 +0200 Message-Id: <20210501223638.510712-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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 #define MACHINE "-machine virt,gic-version=max -accel tcg " -#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel tcg " +#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" From patchwork Sat May 1 22:36:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6BB9C433B4 for ; Sat, 1 May 2021 22:43:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B53D613B1 for ; Sat, 1 May 2021 22:43:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B53D613B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyKg-0003w4-FN for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:43:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEi-0004oo-1D for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEg-0008T3-Cn for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908637; 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=Kes9IhcAMri53EjkEFfkJQwONdUrJnm6FUaQ7RrFrhjhh2v1l14jqQTZFcWtkIjCslvA93 GDZypI/Li29kAEM+WuIwOBf0kf2K2CI4y1OLRlKzTNfyd//iAVcZ44Jdbuo+nDLIPAoEpQ JpBCUbukm/gb/kW/GpstByi9mLu3bvc= 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-169-qg0VmrcOOweOMU3WAiPiZA-1; Sat, 01 May 2021 18:37:16 -0400 X-MC-Unique: qg0VmrcOOweOMU3WAiPiZA-1 Received: by mail-wr1-f69.google.com with SMTP id 4-20020adf80040000b029010cab735fdeso1284076wrk.14 for ; Sat, 01 May 2021 15:37:16 -0700 (PDT) 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=ildg51m3iCFmmFJUGNbeiZve5DSvxVElxROsGZ2UE1sw35nZxvQ3/7k4qYkNpDOC1p SzZhjiCngdkQVjOPYOLu4MXvUKEtgszyISVjTXt0ENmlDvmp4xJkZSg2tUNe49dCOofT CkYa20R/7aDxKQMl0MkXFXTcyIjXibBRgpwD8LEbq1a7EIVL9dhc/NqNlT0xIufw43Tx 43rbqgNpQDDg0Xo84XakezCg/fIVc6I70i31uVTTSRkXr7MrY7Hq3bY7OECC655Kxgg3 ZhQoFkbJaNjyE3mmDc6kh+pMM6OC9TvK1pdcNoT1RCllLDokIpbbjDqe6xO0BCVezMii AeLQ== X-Gm-Message-State: AOAM533S2A8vKqjNOkXoQ2BGpTliRhGv7wtPJwI6mEcqXe3+21dNT8O0 cFPjYGSuzG02kuMgMsF3jtbu8/5Ff6iBgVbvpYoqM9X9MU/J0DXwYP3Eelo3Nto5iFT+eLsUfCa 05NGN1uLwNL/pHav9u2WEZHEQStaoctQWc9nTLu7KGyHJG19LnOmBwJhzWQHaYv5v X-Received: by 2002:adf:e0c8:: with SMTP id m8mr16218269wri.349.1619908635214; Sat, 01 May 2021 15:37:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhEm3Q0zbT6QHH8bk2hsUBj23M3IfMikdiIAJcFHZOA2rqBIb2YrHrBiXxu+a+w/pdk3rR/Q== X-Received: by 2002:adf:e0c8:: with SMTP id m8mr16218244wri.349.1619908635070; Sat, 01 May 2021 15:37:15 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id g10sm15134871wmq.25.2021.05.01.15.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 07/10] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG Date: Sun, 2 May 2021 00:36:35 +0200 Message-Id: <20210501223638.510712-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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 -#define MACHINE "-machine virt,gic-version=max -accel tcg " +#define MACHINE_TCG "-machine virt,gic-version=max -accel tcg " #define MACHINE_KVM "-machine virt,gic-version=max -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; - qts = qtest_init(MACHINE "-cpu max,sve-max-vq=8"); + qts = qtest_init(MACHINE_TCG "-cpu max,sve-max-vq=8"); assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL); @@ -372,7 +372,7 @@ static void sve_tests_sve_off(const void *data) { QTestState *qts; - qts = qtest_init(MACHINE "-cpu max,sve=off"); + qts = qtest_init(MACHINE_TCG "-cpu max,sve=off"); /* 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; - qts = qtest_init(MACHINE "-cpu max"); + qts = qtest_init(MACHINE_TCG "-cpu max"); /* 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); - 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); + } /* * 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); } - 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", From patchwork Sat May 1 22:36:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3272C433ED for ; Sat, 1 May 2021 22:43:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EACE613EC for ; Sat, 1 May 2021 22:43:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EACE613EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyKK-0003MG-9P for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:43:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEn-00052t-CD for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEl-0008Vu-He for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908642; 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=/QexIH/VTNKxOuVblouGzmBuPgjBWLL7wx7SLN7JtrI=; b=ENeYPdc6rba3mL2XulpWCMnx4Sv9AjHeBNZZE3hNeUjlgqGNUYHNoI4dfro68t4G/grBnt 0jUh6jujOXZA6ChiJ+nu5npyZ2AIdV9ayxmwovwkBScp4TIfFlhQWoAA3orPdfAf88w4vU 2Bj7bEP6AMzVN6LzcK62be11f9rqSrU= 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-463-xvV2BEoOOfeHPxfc42sdSg-1; Sat, 01 May 2021 18:37:21 -0400 X-MC-Unique: xvV2BEoOOfeHPxfc42sdSg-1 Received: by mail-wr1-f72.google.com with SMTP id 88-20020adf95610000b029010758d8d7e2so1266631wrs.19 for ; Sat, 01 May 2021 15:37:21 -0700 (PDT) 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=/QexIH/VTNKxOuVblouGzmBuPgjBWLL7wx7SLN7JtrI=; b=pHpTWTa6OH/E4AaCfobQctwVLXFGGDWQ+67+rfu1GBwZAFvYC6BKrJfvi8q8jsPKmo IZzplf4DIIM7jPKpuGTLgRbc1DKDsvO7ME/W2+r4D6lNd6LXIRQBfYirEAXjZ0VAfpul +8Xah0Z1CsQs5bVmTqU3IZppvya6RWkXXYD5H38j5ZUYL8vA5V95EzrdBMdWkzAIMuI7 BzLd7XEJqqKv34UZEy6x6u54jG29grJslXuiAX1KOo4s7hmOdGYoDVIev2ITckabqfN9 jY7kljnDo9OveRL61JQUz0+TBIOq/s38YCZQB7R7x4gS5wxnJmUVxPSYDUbo5gGaXDfM H05A== X-Gm-Message-State: AOAM531HsNY606Zy1Pqop+IFpETHH8HqP2eAnkf4wlXPtJurdjXGcUdU 9GKcTR1U0p+lzbrraX6doDCm6RGVfkLePgO4MNN0gj0jgm4llR4BaUK2FvnVjoKBkC2q3PaCG8r DvKlusytkgvz+oTm1M3Z0yFNAwbpPVFDGD/9VG2EB0eVvOY46Z642MZLVEOrNmOr8 X-Received: by 2002:a7b:c382:: with SMTP id s2mr9239121wmj.75.1619908640294; Sat, 01 May 2021 15:37:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfH+8IfuCWS4C80siMbM4CRyn1o7/pTPOyHVuWmCT4uwbcWqFgSop1wAWwfA2cuLdKdEB3wQ== X-Received: by 2002:a7b:c382:: with SMTP id s2mr9239092wmj.75.1619908640083; Sat, 01 May 2021 15:37:20 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id t17sm6524586wmq.12.2021.05.01.15.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 08/10] qtest/bios-tables-test: Make test build-independent from accelerator Date: Sun, 2 May 2021 00:36:36 +0200 Message-Id: <20210501223638.510712-9-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Claudio Fontana , Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- 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; +static bool tcg_accel_available; static char disk[] = "tests/acpi-test-disk-XXXXXX"; static const char *data_dir = "tests/data/acpi"; #ifdef CONFIG_IASL @@ -718,15 +719,11 @@ static void test_acpi_one(const char *params, test_data *data) char *args; bool use_uefi = data->uefi_fl1 && data->uefi_fl2; -#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); args = test_acpi_create_args(data, params, use_uefi); data->qts = qtest_init(args); + test_acpi_load_tables(data, use_uefi); if (getenv(ACPI_REBUILD_EXPECTED_AML)) { @@ -1504,6 +1501,8 @@ int main(int argc, char *argv[]) const char *arch = qtest_get_arch(); int ret; + tcg_accel_available = qtest_has_accel("tcg"); + g_test_init(&argc, &argv, NULL); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 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_microvm); 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_hmat); - 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_tcg); - qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); - if (strcmp(arch, "x86_64") == 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_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_hmat); + 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_tcg); + if (strcmp(arch, "x86_64") == 0) { + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); + } } } else if (strcmp(arch, "aarch64") == 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 = g_test_run(); From patchwork Sat May 1 22:36:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14EA8C433ED for ; Sat, 1 May 2021 22:45:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1E15613EC for ; Sat, 1 May 2021 22:45:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1E15613EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyM9-0005p8-Ng for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:45:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEs-0005Em-6Y for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEq-00007v-Ms for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908648; 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=NSr0ATvoVPT94Kw0PlP2HcPHUZbWsmv1leCf95/HD08=; b=MO1xT4mVSLlQLG9pWhhnYcisPVqyBjlnujVph3nPvkCTRmtlKxc1pQjjvXETb0q3efO8bt aO3r8s/Mk4QBudRCAacQuKdeIA5XJF41Yk7vEyC4PQCxTw/vzDshuHxHTx4rfkPbPvsNUr zZwsyysVatSGlNDadUSZwXS0YYcK76I= 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-393-3X4nQ5tEOY2bXv3KLe9ALg-1; Sat, 01 May 2021 18:37:26 -0400 X-MC-Unique: 3X4nQ5tEOY2bXv3KLe9ALg-1 Received: by mail-wr1-f71.google.com with SMTP id a7-20020adfc4470000b029010d875c66edso1264523wrg.23 for ; Sat, 01 May 2021 15:37:26 -0700 (PDT) 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=NSr0ATvoVPT94Kw0PlP2HcPHUZbWsmv1leCf95/HD08=; b=Ou7HuKNadNwZwSC1WU4evZTy/VSDs/eEvRb/HRst+e8jCaWNe3nSwE77hLeiaS2Vwm w4RK0UGLAHcp1OQiBcVb5+NPXbmeGqJkXTr2SS3VdWbQlV/Ob+Cq1HF6Ej+IQCEmnFN0 QY2oCbs6co/bmsmmCy6PuaElCEr5i9vkXBAX2cgN7F70LFSJymMsWIVj6WC7qPaXN0OZ 4sCOIY2EgngsgHAd9+aCMwJiLqpwN9CAbo6boGZwfAg/wALslqpkqyJOKvEy5IlO2jy0 lbXndk30Utn9iYExMw2Vhkoxl5ltLz6lO1XQjidHel6yDlYrUg8PDmkuPFKpZjv9/NFu cF0g== X-Gm-Message-State: AOAM531610npFY54hNrNGvG4R/gQDWzPkxFzCqP5+ZyYzj4kyZsZ64uK vp2qtQ5Kq2ngaFmne8kvumkYUtASpO2NkI8aM4MQNwso5XE6RSNWKw43oQn3oCCuZ4A6B9odvkI 0mkqzZin26QlztrHf+owF+h0POdxpfMH+XyFCJbjn9T7M7fYmpJt1OpTACXa6hVBI X-Received: by 2002:a5d:6d48:: with SMTP id k8mr15615936wri.93.1619908645445; Sat, 01 May 2021 15:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHlDmMb/Hu2EcSuWjOkP9gCFn8An4aP1VyRAf3WRmO5rwvrL7se7YiZsfzpfi6wQhgecdN1w== X-Received: by 2002:a5d:6d48:: with SMTP id k8mr15615905wri.93.1619908645226; Sat, 01 May 2021 15:37:25 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id n2sm8024960wmb.32.2021.05.01.15.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 09/10] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 Date: Sun, 2 May 2021 00:36:37 +0200 Message-Id: <20210501223638.510712-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Andrew Jones , Cornelia Huck , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , Greg Kurz , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Philippe Mathieu-Daudé --- 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(); } From patchwork Sat May 1 22:36:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12235087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64453C433ED for ; Sat, 1 May 2021 22:46:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3A00613EC for ; Sat, 1 May 2021 22:46:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3A00613EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcyNW-0006k9-TP for qemu-devel@archiver.kernel.org; Sat, 01 May 2021 18:46:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEz-0005Xl-HT for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcyEx-0000Dz-VN for qemu-devel@nongnu.org; Sat, 01 May 2021 18:37:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619908655; 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=piFQVJLRgYVAQ8rwlcVYLrCWu2jTvSW2z8Zq+W/DVsE=; b=Yb1QH1qSwsdbp2fzuR6iKWMk//t9lRqN75igNtay/69Slpr3WmWuCYFNJAUyyfxF7P6YgX DszwRfLjkOOr81H7HW4OV5Sy9CJHG/SFHy31WRgUSJacPpQWvTXNk7aIeNI59GcpYnvSxy Eq0QgNivuWZFOzS+tGHNG5IEqQUf558= 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-517-27VZa760Psm6MaVyLXkJvw-1; Sat, 01 May 2021 18:37:31 -0400 X-MC-Unique: 27VZa760Psm6MaVyLXkJvw-1 Received: by mail-wr1-f72.google.com with SMTP id q18-20020adfc5120000b029010c2bdd72adso1288902wrf.16 for ; Sat, 01 May 2021 15:37:31 -0700 (PDT) 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=piFQVJLRgYVAQ8rwlcVYLrCWu2jTvSW2z8Zq+W/DVsE=; b=kbEl580qx/sMfRSO8J5oyH1+ko7rNAo5hea8fDeayAmZjr/5vkrzK+8CVYUTwRCgeR yc8N0RxbyoD+1Vc4eAzc5lmSjxn8btLCrSZP914hT50Q3wuLz1dQXQTrDtCGhjkpR9Bh xrx66gs+243HyNuIF7D4pVMWzbZa7C2s9SNgl2GwNcASrhITqoNcZo11zaLV2EAXA6nI y7S+cgXwqitqe8p3SzPtV5A37gWMr9Au4t5e/l2z2ciq8pb2FJh6ZKG9Ros5AJ1wigi2 7/J6VPxoiQ8wa7rmdAI7FwhzfFLrgEC6ckCcU8OOt3kcM2QZigVFC+AH12axETusiZ2x cttA== X-Gm-Message-State: AOAM530uOUjbjSK46XTPlILmbMi/gTSYh0FfYR+g07M2jY/fQuiByAXP cxifb+0DPQf/D3ktC008XVvsgZvnJndjtpqGZYszq+TE8vnGxn0SqZIuxejj4UOYzeUIrwsi0uA BAPgS4H3jhFZ6NCSdD8aof1qulAn6iSUNXLOTG6lblVAkAlf+WnPNV8Q9OwK/OADt X-Received: by 2002:a5d:6b50:: with SMTP id x16mr15538122wrw.379.1619908650331; Sat, 01 May 2021 15:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFwrlaHEA237JOmKCBgcp6IzvH/BdWKY2+dp6D/AQCA6n/m/0lyvqUoX3ovM0rbtoqtFQCVg== X-Received: by 2002:a5d:6b50:: with SMTP id x16mr15538086wrw.379.1619908650140; Sat, 01 May 2021 15:37:30 -0700 (PDT) Received: from localhost.localdomain (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id m11sm44785wmq.33.2021.05.01.15.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 15:37:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 10/10] qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore Date: Sun, 2 May 2021 00:36:38 +0200 Message-Id: <20210501223638.510712-11-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210501223638.510712-1-philmd@redhat.com> References: <20210501223638.510712-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 Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.22, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Andrew Jones , Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , "Dr. David Alan Gilbert" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Tested-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- 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'] -# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional qtests_aarch64 = \ - (cpu != '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']