From patchwork Mon May 3 21:10:09 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: 1473398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Pnh3Yqn7; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwgw02nDz9sRR for ; Tue, 4 May 2021 07:13:47 +1000 (AEST) Received: from localhost ([::1]:34132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfsw-0007d0-0c for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:13:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpp-00042B-5s for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:37913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpn-0006yN-0W for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076230; 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=Pnh3Yqn7AtMg2g4xxVNtDzbmOnoUzDa+BjqqKA8JUU7KV6hqAC/fJx5HYYxT0hZYFNDz3e aUNM1e553NDcuiA+XJ5Bi6cNcvO0fzMn6o1wBl/sQkuS5365MeFvLpUiU2k2ZhS5FybUH0 BRenbR59c2OLbTqog47cTAln7K7GL+A= 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-360-0innDAulOMmDuszqxxO9pQ-1; Mon, 03 May 2021 17:10:28 -0400 X-MC-Unique: 0innDAulOMmDuszqxxO9pQ-1 Received: by mail-wr1-f70.google.com with SMTP id 88-20020adf95610000b029010758d8d7e2so4605372wrs.19 for ; Mon, 03 May 2021 14:10:28 -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=hmN3Xe2fmEjf24waZ+6tbrYu99uwq7Y0T2OcPb8Eh3wEu/1trgn6NemLgdZhl8VZ2E UB+u6WLD2C0FWg+M+NYJdkUhzej1Vi39KzfFNp7G5QJp3Qzp4XHssML+DyPabVmLRkcq jo2NY8TR6SzPbvJ/NeMLlyFeaGzASG4Zz0R1aW1qp1zKFqf89cR/DDiQfTHvPgrNIZJI gE5x1RJug/UjR/waSEfJuxGS1FdU1jZFLOlRqNmfDyH0NRvucCqSmfAq5GHR4zr9Vegl FNeUbaMYLMJ6VW8ZzFhE3mO63G/9KCQbh1qmbreEfA808HqIdGrhfjEhfJf1gMKMOXkO qb8g== X-Gm-Message-State: AOAM531bk3nE6Iquz5h9I1N0TxVd5q9b7p1CCmPWV6jeFSwnvm5EYmft G+c/vE2DoWvmhuHkakk2PYYKxkzcw79vvAcBVxJwn6Sk3aRUcNjOlWjAS7+ZvyXDKxsw8SS8cX4 AcXZdenw9SSbT1O8E+8hhsFNBDS0PFXm/lKas12FQ35E4lXRmnO5+abFs4qHeqfBy X-Received: by 2002:a05:600c:4ecd:: with SMTP id g13mr22800415wmq.173.1620076227540; Mon, 03 May 2021 14:10:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc3ocGKGGqR6ReiCPR/OnxlCYrUP87FEBH8F93ACKARjFtmy8P4DBVXawgxUi9tIE9eQckcQ== X-Received: by 2002:a05:600c:4ecd:: with SMTP id g13mr22800386wmq.173.1620076227278; Mon, 03 May 2021 14:10:27 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id a15sm13328777wrr.53.2021.05.03.14.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 01/12] MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section Date: Mon, 3 May 2021 23:10:09 +0200 Message-Id: <20210503211020.894589-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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: Thomas Huth , Andrew Jones , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:10 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: 1473395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SsRd0xJp; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwcw2cCmz9sSs for ; Tue, 4 May 2021 07:11:12 +1000 (AEST) Received: from localhost ([::1]:54218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfqQ-00049S-8r for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:11:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpv-00045e-Aw for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfps-000710-LC for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076235; 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=SsRd0xJpSMuxl9QWf0XyYcqSzgL7Ou79kcuV/0x13y7MzLDF7vyGo2fALZX4gdVATjksxQ bM8awBfasp7uH0ydJeSTmKS92SsfccOPiEYp1XVry++AO3Er6aDTNJoWijJloKsUjauCUO OX3JJuHJfF3PGcwWSIiMBO0vZIdld7g= 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-159-kJVPEGf_M0S1ULOeZnNMRQ-1; Mon, 03 May 2021 17:10:34 -0400 X-MC-Unique: kJVPEGf_M0S1ULOeZnNMRQ-1 Received: by mail-wm1-f69.google.com with SMTP id r10-20020a05600c2c4ab029014b601975e1so65853wmg.0 for ; Mon, 03 May 2021 14:10:34 -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=B02oQ2KfwBio+CZyeyf7yroB15ann/FDi8Js4CanEptUdtRS+OFVgOYOmwVtutuKZP Ff9iJI2jEk2n1jfaZH47X52siYBYPij2Gt3ap06NLhmbqHemrebtRJAakdcm3538E0E7 /+TbK8uuu1W4zDIbGq4deE+Y+0BTZgBx58vx/R4HigqDPALesMilfqAtU78pFmDMgD+g o2LoK5zofjGsqh5i1+qijDLTONpFPF/lptXCiY0qCjyLRPF/2l9oc060tU1i6PxMoO+8 DpSgWqpc9s6W5xkgvRhtMlrarYUMbCx1Cm7U0xKY9GADMq9fywFNeZbJW4Cv7WrWEZsh lo6A== X-Gm-Message-State: AOAM531QCQhHRj91cugacVtLUZn3XET3xZpL48woyEoyci7qqNKityFF zObxrY6drDdlw7LU7e6vXCBCmkSWhgcv2NUBoLXVPfiL31ySM4Y1wP+THP5uDB46YGZEjOIusuP l0s9/QjBoHQQxnGhapW2HFZKXdr7D0U29bP4LdvF31C/MGFU2ssNblGXk1K2C/xJ3 X-Received: by 2002:a05:600c:4f4d:: with SMTP id m13mr504254wmq.133.1620076233092; Mon, 03 May 2021 14:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfC74+KBGj0iZP4yjF1Dlg6WZlocMh6ZsUPwF8xTZut77i2zQIa8DTsdf5gINFQkwHobpJQw== X-Received: by 2002:a05:600c:4f4d:: with SMTP id m13mr504226wmq.133.1620076232859; Mon, 03 May 2021 14:10:32 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id o17sm14529602wrs.48.2021.05.03.14.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 02/12] accel: Introduce 'query-accels' QMP command Date: Mon, 3 May 2021 23:10:10 +0200 Message-Id: <20210503211020.894589-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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: Thomas Huth , Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:11 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: 1473396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=c6GMeflL; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwdJ1W4qz9sSs for ; Tue, 4 May 2021 07:11:32 +1000 (AEST) Received: from localhost ([::1]:55928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfqk-0004wO-4M for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:11:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpz-0004He-I8 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpx-00073u-BP for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076240; 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=c6GMeflLwgBNh5HJfnkv6yD7lw9puZf5hYbELqST3Ii1ajxG0/26l8H3q/KD0bpvlaeTSy ws29l8QcaPlh+ryeIh+2Y56gZ/EOY1cIUPMO/0NoBSSRdEw+X3F+t9vJdzqF27AzpWYUHl T46URzg68NUI6Z5Bcs2TR/8PWhnIJCk= 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-177-L8axM1evM-iyU-pfLitjOA-1; Mon, 03 May 2021 17:10:39 -0400 X-MC-Unique: L8axM1evM-iyU-pfLitjOA-1 Received: by mail-wr1-f69.google.com with SMTP id 63-20020adf84450000b029010dd0171a96so4075587wrf.21 for ; Mon, 03 May 2021 14:10:39 -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=g42LQSwYDGgwRLuCMpn/4SZx7cOiE3/siiCYH6MajyeCpk8oZ9vnkDuetCJJ6f4Zse jGS2JQ/W6BjSApgvpR1paOagH25az2mWwA04PxvP80836GnufEQo2nsPTw8o+GblNFOX IbL6LHbzET193+b/zYQRyQ7saOQtRDp5lqx0QDQfqFFqlyfL3oAMSh3utWx9y8iTu1n6 cDMmEximyn2KGgrhHFJgLQUSAFFzTzil9BvloWYdr8UwImzvC6MayYdz01b2GsCLJJZs XnmHsPpyJd1l24u+5/7oUPynNtmQ+vpJaOqAakr/ndgicp8Jl6Sot5Y2QkpJBDbDcfrG j4Hw== X-Gm-Message-State: AOAM533vXoXgEdf8gFJ/hzwWMK06kCnuaOury2gLknw3ikj8tWeXzHAh MHsd99SKP0arMTEXwJEZ4+GJjTSeRUXDRKgIIKoY6xr8fWUrsqncD6qIZ3sIxNzVC56YyMXRlXM KLMVUf9kjKXarWGdB/lRRzkGMhYISiSkvKmLr7mEn2zdte+bM2lxP/NKNe1b9pUUX X-Received: by 2002:a5d:6e85:: with SMTP id k5mr10219327wrz.384.1620076238231; Mon, 03 May 2021 14:10:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuFuYQ+2aP43smcZO0RPFinXpgl5R5Rb9NrBdPc/+OyGvOVf1asvLGJgxgU7Km23ul2B+CzA== X-Received: by 2002:a5d:6e85:: with SMTP id k5mr10219301wrz.384.1620076238038; Mon, 03 May 2021 14:10:38 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id c2sm742764wmr.22.2021.05.03.14.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 03/12] qtest: Add qtest_has_accel() method Date: Mon, 3 May 2021 23:10:11 +0200 Message-Id: <20210503211020.894589-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:12 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: 1473399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VFTdd9Jf; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwgy1849z9sT6 for ; Tue, 4 May 2021 07:13:50 +1000 (AEST) Received: from localhost ([::1]:34354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfsy-0007iD-5A for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:13:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfq6-0004Zs-41 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfq3-00078P-Am for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076246; 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=VFTdd9Jfbiilco3BtLdysJVjZx1cBKi5PE+OeGUV3GDXfwHz59edbkhnxX6id56bJcPo+k jLNk4seteNbnjVUkQRrC0Reh6cYDBBEvIbWk9iPSpGDB7z4BBXfHs+ENgf7WCcpBTjqtmM 7hA9d+N+e2EID3EjG0jQlsAgPmGQJe0= 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-394-fCxj2sQSOy6jCICP2CyN-Q-1; Mon, 03 May 2021 17:10:45 -0400 X-MC-Unique: fCxj2sQSOy6jCICP2CyN-Q-1 Received: by mail-wr1-f72.google.com with SMTP id 67-20020adf81490000b029010756d109e6so4614583wrm.13 for ; Mon, 03 May 2021 14:10:44 -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=l7sGwrT7/n1ApW6klCYmruYJZGiNH/h1nInSphekxCGQIqhTFz9o29y1Ov+EJAQPCk c80tz1k1TrLJEZ4HHDoTAHXz/QzqvKti3/TgskVamFk3Z9uQBKExadaedSTD6I48AIoK lAakarr760Vu2fXAlzVR5LEwOKBjKjeYTWcxqnOQKjiOgF8xxGDUibldlzGjPvArlZXb GoAOpuSmsLDNH+qVj9FVSgayWSJq0+smUMKu6yKaPc8dN8HFgbcuy50g6BqVtBT6C9qe 4nGMhpHSFkKQ4yFNgZnvpcbUu0R0Zw+vz1F/VucogxD72YkOxuFNW+TvI8etTk0K4KeK F6Jg== X-Gm-Message-State: AOAM532OR8dXYNnwN3qAd5NGRRcXeRC+yOykYxyBlzxLpSnUsLIpWjkh 0SR/KqhP+xJ9pdLboUH9s1AudxgrRy85BHU8Txj+VpT9KtXFEOQ9O9vPeHT4zouYLAotRrhUy+2 mMylMxpDrn6BBLLwWnjsnrEW9zymD0b+ng1qcgh2QSjpbbJFozAFGcCoVKORQqU0k X-Received: by 2002:a1c:f313:: with SMTP id q19mr23187076wmq.142.1620076243739; Mon, 03 May 2021 14:10:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOHD1J8jmajrMm02z2PmNvoKrNsvyzY8tUAE1Mo70lt9r9leeAZmmXa6X9jqGXZ2uwZqj/pw== X-Received: by 2002:a1c:f313:: with SMTP id q19mr23187054wmq.142.1620076243591; Mon, 03 May 2021 14:10:43 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id q10sm729846wmc.31.2021.05.03.14.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 04/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM Date: Mon, 3 May 2021 23:10:12 +0200 Message-Id: <20210503211020.894589-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , Andrew Jones , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Claudio Fontana , Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:13 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: 1473401 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FA0HY/uF; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwk80kXQz9sRR for ; Tue, 4 May 2021 07:15:44 +1000 (AEST) Received: from localhost ([::1]:41746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfuo-0002Fe-4K for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:15:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfq9-0004jE-NH for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfq8-0007Bd-6d for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076251; 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=FA0HY/uFn4nQJsYqCZRUtQq4TEMHXswUkQMh3XrvAM4zhYBtG3eo/m4kEezzyeEcgEuJYS 603TGzb2hXs1r/WT06bXh3Zyp8l9143awc5UBHSjC1zZeNt8fG+8WSOj6zgChDFOzz8KJg F//uotQG8Wglq3+uSOdypnCq7nUkSz0= 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-97-6sosKfi0MSSKFnrIoYLKxQ-1; Mon, 03 May 2021 17:10:50 -0400 X-MC-Unique: 6sosKfi0MSSKFnrIoYLKxQ-1 Received: by mail-wr1-f70.google.com with SMTP id s7-20020adfc5470000b0290106eef17cbdso4629901wrf.11 for ; Mon, 03 May 2021 14:10:49 -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=lhckjAW7Ucr5PeYdtq7mxaEnWEHqBlpcFizH/cg4HmlJ0DV+apBtJTgLN3SGS699rj G9Ufx/5r2TU4NGmoRE0SadTv8AEVo/4hYgZ1eSGSm53D1j+vuXjFi+JJwtpT5voz8H1q qt5pQhpSS173pAqwQAso7VHnBECAU4bpCyBKTCJDeTOyyw7i0tdssjVZH2ocy4nG1adw ZYE3gcnZnsGMzezsp7UyTre3ssex4DNioTIoHKItUIjARcA0ucdUtGVNNYvJ/GSa+o4w sO4ao4OACUP9H74UUvzXsDX21ZkALX2W3YaG5wmZUYEZct/4xNk0+Uiyev9V/J2zoXze 0FSA== X-Gm-Message-State: AOAM530xGhbu+XBEha8chcNO52K8etv0pZR8/CUQPyuNVf5xIsykEqp7 AvKNFUKr9SgBVA3V9YjHdKlxHc9rJrdiqXWsNUDxO7bmzUbFGGB6Me9muLcGLrmqnHPpDEDOeph ePVmGC09mrCd9OKTdAh5cPY9VagGIxodsEsy+c5k2luFvqkPcSH0URolR2iwIYxQc X-Received: by 2002:adf:da4f:: with SMTP id r15mr26790903wrl.411.1620076248806; Mon, 03 May 2021 14:10:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKADve4uiI3fZhyPEQmvuyXhh7UdPqySvney1fuD3yH0f2dYaGIfUQ1yCpNxX73M5CspIDCQ== X-Received: by 2002:adf:da4f:: with SMTP id r15mr26790882wrl.411.1620076248618; Mon, 03 May 2021 14:10:48 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id m11sm13666910wri.44.2021.05.03.14.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 05/12] qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM Date: Mon, 3 May 2021 23:10:13 +0200 Message-Id: <20210503211020.894589-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , Andrew Jones , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:14 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: 1473402 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GgJLcYM/; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwl839m6z9sRR for ; Tue, 4 May 2021 07:16:34 +1000 (AEST) Received: from localhost ([::1]:42462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfvb-0002XF-ON for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:16:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqF-0004v0-Ay for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqC-0007EH-St for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076256; 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=GgJLcYM/yRqLHQIeUZF9eDaxe0o61Vq8mi/trw7s46EHhoNCxvLmwh5bBZb6Wcx8aQotuX 65Jzqd7BIQgOnYF4FQu982I2usDyajRf8J/YcfVybebNLeUMt32RqvwnnoI2/rKkAZIS28 hho2cYeA1K4rET4hhgzP40F9DlUbUMU= 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-186-OtbllRNJPa65MMCoIMH_qA-1; Mon, 03 May 2021 17:10:55 -0400 X-MC-Unique: OtbllRNJPa65MMCoIMH_qA-1 Received: by mail-wr1-f70.google.com with SMTP id 4-20020adf80040000b029010cab735fdeso4645623wrk.14 for ; Mon, 03 May 2021 14:10:55 -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=Er1SiDZtcwuI9NxR/fIEhU/osY/Z2LmiK69Qfz0gQVT55qSAQ1AxwdV3bl/NIQnJ2b 9OAHlOf53PWQp4z0g+ak+hNVYtKuc9X+6o3Y0PcUN24EVDGUfFiX0+o/sgoE2xlTCouv uJtsTXSa2jVOT/x5/aIhplpaFwlBUodE+/YJmuqBeiCVGODZ3B1oqaa67nOaGQe80FIV 3v7tgAwnKFy+8qHzQJmreSjQYOxkBTFt2t4jgS1Qxu1okV90l/fawZjFMvWZRCjIV8Fv OpSJImuJkd78G7saiNe3ePtFB3Ap9uWhf/baSa/ibeKC2mrEqlfdh8BBwLx9tonERVVf SaSw== X-Gm-Message-State: AOAM5333hpzvRVsgeQzjAix7dSFJlAonoYwbWn1jJG/MwA1oCQlsfF3g pmBA7E+VAfmOQ8OXg6s2CzfPN5T8dqCACMd9LrV0+RobCk4A61MAyZfnBr5cyYejL7meSNDHKX0 PmZYZE9TqbwoOkHg5yrK5gUa94rOS19Fx0sc8pc9m5I1edaNyuAqO9dFd3cOs2rdJ X-Received: by 2002:a5d:408f:: with SMTP id o15mr26434709wrp.89.1620076253783; Mon, 03 May 2021 14:10:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyopwmZ7cduJ9B12KZ3WX74MWbnK8TNXlLxn09RVIm12tApSJhIF4QeWpEV4md/yG0+B4PPWg== X-Received: by 2002:a5d:408f:: with SMTP id o15mr26434684wrp.89.1620076253590; Mon, 03 May 2021 14:10:53 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id h8sm667607wmq.19.2021.05.03.14.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 06/12] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests Date: Mon, 3 May 2021 23:10:14 +0200 Message-Id: <20210503211020.894589-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , Andrew Jones , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:15 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: 1473400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=F5FXOlmP; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwjG6Hctz9sRR for ; Tue, 4 May 2021 07:14:58 +1000 (AEST) Received: from localhost ([::1]:39698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfu4-0001QV-UH for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:14:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqL-00051k-2O for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqI-0007Hv-54 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076261; 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=F5FXOlmPK2fgT6VLjCs1MRfWS5JKZUfiileU/oNvFT1HQj3+TCZL14mxAqkMQNeRQtqf5E a/wrsSDQ8eDSUgQtttlMtf4ZfKrnipmndioCtSYauo8v40Fg4thPlBARzIFHwi75ba8c1p 5UkVgN8yCI1F4o0lAxS+IrWw29Rv91c= 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-591-PNTe8jtiNwifXvBdYdAY6A-1; Mon, 03 May 2021 17:11:00 -0400 X-MC-Unique: PNTe8jtiNwifXvBdYdAY6A-1 Received: by mail-wr1-f69.google.com with SMTP id i102-20020adf90ef0000b029010dfcfc46c0so1415117wri.1 for ; Mon, 03 May 2021 14:11:00 -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=Ih8gthRvq3wyF9U3QZB0hgGAVnTac/gzvUGeDxkIhPBVj+Rj6oM4U71FjET+UiPs3v WyQ+2KuKL+tzI78xk0qw7dixvi6ItX7rigO7Wg6MigSoxxk65aN2segsD9j7y+Kaoe66 9rwMP+YcQwxmCcACKdpn2N/xKz92LyAkd81+ZuBIHSO7vbwTu6x3dBXMJWN0k5a6ToRG dKgFE9YXcUa33vfKSfl9yCq3VufG5IGTsG1n5Ggus1ZmrViMF+DunhGb76ey10ZMHC4F Br2yXO0qOAdSTz7i321AYw1wo6iHiIhXRUzlba+SxfG0HqUwxVRlGnqE1FOv6XMpyG/a iSog== X-Gm-Message-State: AOAM532TNQsIhTLPziY78uFsPld6Ietv+y2Drj/ng/qIq4fBsmxLYsSE TXiViF2MKbP3enktVRPBvtPyB/BvOOEMSC3kBZk4U/4D+yj7A/6C9gO+huDkXrvDaMeufSe1e8u gf8zOKeZoWA0O5gtZmQ6JF3TskSlmv6hVDtGFhdQCWfMtkSkTrbgD/VMU2+16EQSG X-Received: by 2002:a05:600c:4a19:: with SMTP id c25mr23190389wmp.94.1620076258928; Mon, 03 May 2021 14:10:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJAwBOXgq1yit/bRg+VltP7Pim7vlOp5vhcOsW+PMcjOuFA2L9Y3GNm/C1sqLVSMIAgEhFNQ== X-Received: by 2002:a05:600c:4a19:: with SMTP id c25mr23190359wmp.94.1620076258718; Mon, 03 May 2021 14:10:58 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id c2sm743435wmr.22.2021.05.03.14.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 07/12] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG Date: Mon, 3 May 2021 23:10:15 +0200 Message-Id: <20210503211020.894589-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , Andrew Jones , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:16 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: 1473411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=LVDWjrr6; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwng6ntDz9sSs for ; Tue, 4 May 2021 07:18:47 +1000 (AEST) Received: from localhost ([::1]:49752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfxl-0005bm-W4 for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:18:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqR-0005GT-1W for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqP-0007Of-4k for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076268; 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=LVDWjrr6M4pA70l3kcvK3B7VbJ5ynwrgYg32551vVSlI4z7TOy/Z0YgcWoxpq9AAOuR4Ck XWRpTWKJXVqsIRx9kHJjFRdNU0aML+CWv5jmSPFfKmdQ3Ff0zDBAaaSv5hl6RwnBpS/YD7 oGNaU5JSoEEp5BQmfqhRcjCCGruqI0U= 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-214-0aAWhiazOtacL3yKxaoVGQ-1; Mon, 03 May 2021 17:11:05 -0400 X-MC-Unique: 0aAWhiazOtacL3yKxaoVGQ-1 Received: by mail-wr1-f69.google.com with SMTP id u5-20020adf9e050000b029010df603f280so1704835wre.18 for ; Mon, 03 May 2021 14:11:04 -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=A5Gelpj+NYSM4yVLmYnd+ox3RYGv16hirr6hlLoCD2D8Rct+7AWyK/DizquPH4TDWd Pcz5fMk0RMAJgCVD/6XwOjMLqP0lpIacMIFN6J93j5SyKlyuBvOwGih5c8MuB6cR9wjG 0sah8oNPpEQVZ9oaPEhYGeOXVZ+Qd3kJBiyu/IWaeCEQ/LZKW/3Gc8E+wb0GLXfru6et yjUCDry6DixAq4jJRhMApPLqEthnx6NsLTE6+Vhedf+JPGWnV8t5l6Vsbu3pIyOJ9Exf 5hDecJkrI8ZrlXECLYqNBPqt5Vsclt1z/jyhSSI3d3mUZXiQd6GeYllAm529kvmHjds6 EB4g== X-Gm-Message-State: AOAM531cATnpCht+wMKNSrOnydZQo2ieZZ17Dnlqw5yyd0+3oNcsPLAG 8fu/MxBEg+bmaop+4/YyxdTgJK9P/XlKpn4MsWOFWhADU1/1OwjHlKVqLkliHsoZROrM3duDBFO wGUmMf6pijGkJ1EEcouHsHuT+HwuSdZT+u2cuKYnQwL0bJLckHG+l+IALiY1jrF/b X-Received: by 2002:a5d:694c:: with SMTP id r12mr19922325wrw.224.1620076263908; Mon, 03 May 2021 14:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXk4Rp8nF47WJi79SR59M5qxQEDP2BRMqT6EjyDdtaDzjU4XNikQMnT5N9foAzrLq4441Ueg== X-Received: by 2002:a5d:694c:: with SMTP id r12mr19922293wrw.224.1620076263712; Mon, 03 May 2021 14:11:03 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id f18sm549071wmg.26.2021.05.03.14.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:11:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 08/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 Date: Mon, 3 May 2021 23:10:16 +0200 Message-Id: <20210503211020.894589-9-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Cornelia Huck , Markus Armbruster , Greg Kurz , =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini , "Dr. David Alan Gilbert" , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Mon May 3 21:10:17 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: 1473409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EAYtfd35; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwn02T51z9sRR for ; Tue, 4 May 2021 07:18:12 +1000 (AEST) Received: from localhost ([::1]:47100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfxC-0004Wi-A9 for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:18:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqW-0005Q4-2x for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqS-0007Ta-Ks for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076272; 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=JRPk/6A8ss7eJYrQYwmPODA5RE5ch0tA+RiuLup7F7c=; b=EAYtfd35X04YfAAvOpMeaLG0XvNkjH2i2iXp//K30JJ0WyqhZ0L/adCUBiSHBUvfyTFU7i gyZtnnWZhoZ7P3qCqAbRXOswXUhaXRGCqQQptBzwPl7qi2RNSrVfcasHAF5lAkjklrtfqS PfGQJHrVf9V+xqbDDPVSDSpuobFOWO0= 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-468-I6hqf16iOQyrDkmqSt--zg-1; Mon, 03 May 2021 17:11:10 -0400 X-MC-Unique: I6hqf16iOQyrDkmqSt--zg-1 Received: by mail-wr1-f69.google.com with SMTP id 91-20020adf94640000b029010b019075afso4631418wrq.17 for ; Mon, 03 May 2021 14:11:10 -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=JRPk/6A8ss7eJYrQYwmPODA5RE5ch0tA+RiuLup7F7c=; b=m03oKfDp+5O5MjlOWAXz8NsGuG7ZINVVATRmM/N94/UkuYbsTH7QR0EIBl/2HL+UdR c/unBs5mbsOAsbrPwYFyuqu6KhatM4ItnMGx/DgXDgurHWj7hg10Tfm1qakKnpYmQu0d piXUIp4cKVyNv5SIZbe/lrE5tCghsmP5PEbNZzkh2IUDMb3NiTm6pwLmKp8M2sUi8q2e 1VDGLdeFwg/jxE0+tVhQuq3/dsefhtLeLST0/ESuuUBsaQXdgTc+PTyrkGwCWOdII/Ix DHTMjonrP33Zse1aYKJswzyczRIhR9uidZh/YxfOSYcS9jo/TCUD5/Zw8d4sdSN4TPez zhZw== X-Gm-Message-State: AOAM530PhIRzTGzRcYgns+4tqEDlplkMg9LZcxZ3rD17mGGpONsOQg7f ++b6CSUROV+JdomElr4lDXUxPsVl2pZUgZaAvE73x+T2fG2nMN4NZ6lz5gAZdziTy5a+ZyKFhMr IbnlLBuCoWsHmVpvFa17UkcEkqaqQvBhO3X6KMM8iu7jlM+eewftH310zO0yW+591 X-Received: by 2002:a5d:6087:: with SMTP id w7mr14118064wrt.136.1620076268932; Mon, 03 May 2021 14:11:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZuaBdok0Se9gAXqO6qAHh5e+IcZicA04YGzf6kyEqDiQzmnFSbdQLyCIAhCYxtrPdS3Vc7A== X-Received: by 2002:a5d:6087:: with SMTP id w7mr14118035wrt.136.1620076268695; Mon, 03 May 2021 14:11:08 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id g13sm9225003wrd.41.2021.05.03.14.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:11:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 09/12] qtest/bios-tables-test: Rename tests not TCG specific Date: Mon, 3 May 2021 23:10:17 +0200 Message-Id: <20210503211020.894589-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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: Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Various tests don't require TCG, but have '_tcg' in their name. As this is misleading, remove 'tcg' from their name. Reported-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 142 ++++++++++++++++----------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 156d4174aa3..ce498b3ff48 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -753,7 +753,7 @@ static uint8_t base_required_struct_types[] = { 0, 1, 3, 4, 16, 17, 19, 32, 127 }; -static void test_acpi_piix4_tcg(void) +static void test_acpi_piix4(void) { test_data data; @@ -768,7 +768,7 @@ static void test_acpi_piix4_tcg(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_bridge(void) +static void test_acpi_piix4_bridge(void) { test_data data; @@ -824,7 +824,7 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void) free_test_data(&data); } -static void test_acpi_q35_tcg(void) +static void test_acpi_q35(void) { test_data data; @@ -841,7 +841,7 @@ static void test_acpi_q35_tcg(void) free_test_data(&data); } -static void test_acpi_q35_tcg_bridge(void) +static void test_acpi_q35_bridge(void) { test_data data; @@ -855,7 +855,7 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } -static void test_acpi_q35_tcg_mmio64(void) +static void test_acpi_q35_mmio64(void) { test_data data = { .machine = MACHINE_Q35, @@ -872,7 +872,7 @@ static void test_acpi_q35_tcg_mmio64(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_cphp(void) +static void test_acpi_piix4_cphp(void) { test_data data; @@ -888,7 +888,7 @@ static void test_acpi_piix4_tcg_cphp(void) free_test_data(&data); } -static void test_acpi_q35_tcg_cphp(void) +static void test_acpi_q35_cphp(void) { test_data data; @@ -908,7 +908,7 @@ static uint8_t ipmi_required_struct_types[] = { 0, 1, 3, 4, 16, 17, 19, 32, 38, 127 }; -static void test_acpi_q35_tcg_ipmi(void) +static void test_acpi_q35_ipmi(void) { test_data data; @@ -923,7 +923,7 @@ static void test_acpi_q35_tcg_ipmi(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_ipmi(void) +static void test_acpi_piix4_ipmi(void) { test_data data; @@ -941,7 +941,7 @@ static void test_acpi_piix4_tcg_ipmi(void) free_test_data(&data); } -static void test_acpi_q35_tcg_memhp(void) +static void test_acpi_q35_memhp(void) { test_data data; @@ -957,7 +957,7 @@ static void test_acpi_q35_tcg_memhp(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_memhp(void) +static void test_acpi_piix4_memhp(void) { test_data data; @@ -973,7 +973,7 @@ static void test_acpi_piix4_tcg_memhp(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_nosmm(void) +static void test_acpi_piix4_nosmm(void) { test_data data; @@ -984,7 +984,7 @@ static void test_acpi_piix4_tcg_nosmm(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_smm_compat(void) +static void test_acpi_piix4_smm_compat(void) { test_data data; @@ -995,7 +995,7 @@ static void test_acpi_piix4_tcg_smm_compat(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_smm_compat_nosmm(void) +static void test_acpi_piix4_smm_compat_nosmm(void) { test_data data; @@ -1006,7 +1006,7 @@ static void test_acpi_piix4_tcg_smm_compat_nosmm(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_nohpet(void) +static void test_acpi_piix4_nohpet(void) { test_data data; @@ -1017,7 +1017,7 @@ static void test_acpi_piix4_tcg_nohpet(void) free_test_data(&data); } -static void test_acpi_q35_tcg_numamem(void) +static void test_acpi_q35_numamem(void) { test_data data; @@ -1029,7 +1029,7 @@ static void test_acpi_q35_tcg_numamem(void) free_test_data(&data); } -static void test_acpi_q35_tcg_nosmm(void) +static void test_acpi_q35_nosmm(void) { test_data data; @@ -1040,7 +1040,7 @@ static void test_acpi_q35_tcg_nosmm(void) free_test_data(&data); } -static void test_acpi_q35_tcg_smm_compat(void) +static void test_acpi_q35_smm_compat(void) { test_data data; @@ -1051,7 +1051,7 @@ static void test_acpi_q35_tcg_smm_compat(void) free_test_data(&data); } -static void test_acpi_q35_tcg_smm_compat_nosmm(void) +static void test_acpi_q35_smm_compat_nosmm(void) { test_data data; @@ -1062,7 +1062,7 @@ static void test_acpi_q35_tcg_smm_compat_nosmm(void) free_test_data(&data); } -static void test_acpi_q35_tcg_nohpet(void) +static void test_acpi_q35_nohpet(void) { test_data data; @@ -1073,7 +1073,7 @@ static void test_acpi_q35_tcg_nohpet(void) free_test_data(&data); } -static void test_acpi_piix4_tcg_numamem(void) +static void test_acpi_piix4_numamem(void) { test_data data; @@ -1087,11 +1087,11 @@ static void test_acpi_piix4_tcg_numamem(void) uint64_t tpm_tis_base_addr; -static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, +static void test_acpi_tpm(const char *machine, const char *tpm_if, uint64_t base) { #ifdef CONFIG_TPM - gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXXXX", + gchar *tmp_dir_name = g_strdup_printf("qemu-test_acpi_%s_%s.XXXXXX", machine, tpm_if); char *tmp_path = g_dir_make_tmp(tmp_dir_name, NULL); TestState test; @@ -1139,12 +1139,12 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, #endif } -static void test_acpi_q35_tcg_tpm_tis(void) +static void test_acpi_q35_tpm_tis(void) { - test_acpi_tcg_tpm("q35", "tis", 0xFED40000); + test_acpi_tpm("q35", "tis", 0xFED40000); } -static void test_acpi_tcg_dimm_pxm(const char *machine) +static void test_acpi_dimm_pxm(const char *machine) { test_data data; @@ -1174,14 +1174,14 @@ static void test_acpi_tcg_dimm_pxm(const char *machine) free_test_data(&data); } -static void test_acpi_q35_tcg_dimm_pxm(void) +static void test_acpi_q35_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_Q35); + test_acpi_dimm_pxm(MACHINE_Q35); } -static void test_acpi_piix4_tcg_dimm_pxm(void) +static void test_acpi_piix4_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_PC); + test_acpi_dimm_pxm(MACHINE_PC); } static void test_acpi_virt_tcg_memhp(void) @@ -1223,7 +1223,7 @@ static void test_acpi_microvm_prepare(test_data *data) data->blkdev = "virtio-blk-device"; } -static void test_acpi_microvm_tcg(void) +static void test_acpi_microvm(void) { test_data data; @@ -1233,7 +1233,7 @@ static void test_acpi_microvm_tcg(void) free_test_data(&data); } -static void test_acpi_microvm_usb_tcg(void) +static void test_acpi_microvm_usb(void) { test_data data; @@ -1244,7 +1244,7 @@ static void test_acpi_microvm_usb_tcg(void) free_test_data(&data); } -static void test_acpi_microvm_rtc_tcg(void) +static void test_acpi_microvm_rtc(void) { test_data data; @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc_tcg(void) free_test_data(&data); } -static void test_acpi_microvm_pcie_tcg(void) +static void test_acpi_microvm_pcie(void) { test_data data; @@ -1267,7 +1267,7 @@ static void test_acpi_microvm_pcie_tcg(void) free_test_data(&data); } -static void test_acpi_microvm_ioapic2_tcg(void) +static void test_acpi_microvm_ioapic2(void) { test_data data; @@ -1332,7 +1332,7 @@ static void test_acpi_virt_tcg_pxb(void) free_test_data(&data); } -static void test_acpi_tcg_acpi_hmat(const char *machine) +static void test_acpi_acpi_hmat(const char *machine) { test_data data; @@ -1364,14 +1364,14 @@ static void test_acpi_tcg_acpi_hmat(const char *machine) free_test_data(&data); } -static void test_acpi_q35_tcg_acpi_hmat(void) +static void test_acpi_q35_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_Q35); + test_acpi_acpi_hmat(MACHINE_Q35); } -static void test_acpi_piix4_tcg_acpi_hmat(void) +static void test_acpi_piix4_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_PC); + test_acpi_acpi_hmat(MACHINE_PC); } static void test_acpi_virt_tcg(void) @@ -1512,50 +1512,50 @@ int main(int argc, char *argv[]) return ret; } qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); - qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); - qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); + qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tpm_tis); + qtest_add_func("acpi/piix4", test_acpi_piix4); qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); - qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_bridge); qtest_add_func("acpi/piix4/pci-hotplug/no_root_hotplug", test_acpi_piix4_no_root_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/no_bridge_hotplug", test_acpi_piix4_no_bridge_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/off", test_acpi_piix4_no_acpi_pci_hotplug); - qtest_add_func("acpi/q35", test_acpi_q35_tcg); - qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); - qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); - qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi); - qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi); - qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_tcg_cphp); - qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp); - qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp); - qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp); - qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem); - qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem); - qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_tcg_nosmm); + qtest_add_func("acpi/q35", test_acpi_q35); + qtest_add_func("acpi/q35/bridge", test_acpi_q35_bridge); + qtest_add_func("acpi/q35/mmio64", test_acpi_q35_mmio64); + qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_ipmi); + qtest_add_func("acpi/q35/ipmi", test_acpi_q35_ipmi); + qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_cphp); + qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_cphp); + qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_memhp); + qtest_add_func("acpi/q35/memhp", test_acpi_q35_memhp); + qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_numamem); + qtest_add_func("acpi/q35/numamem", test_acpi_q35_numamem); + qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_nosmm); qtest_add_func("acpi/piix4/smm-compat", - test_acpi_piix4_tcg_smm_compat); + test_acpi_piix4_smm_compat); qtest_add_func("acpi/piix4/smm-compat-nosmm", - test_acpi_piix4_tcg_smm_compat_nosmm); - qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_tcg_nohpet); - qtest_add_func("acpi/q35/nosmm", test_acpi_q35_tcg_nosmm); + test_acpi_piix4_smm_compat_nosmm); + qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_nohpet); + qtest_add_func("acpi/q35/nosmm", test_acpi_q35_nosmm); qtest_add_func("acpi/q35/smm-compat", - test_acpi_q35_tcg_smm_compat); + test_acpi_q35_smm_compat); qtest_add_func("acpi/q35/smm-compat-nosmm", - test_acpi_q35_tcg_smm_compat_nosmm); - qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); - qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); - qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); - qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_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); + test_acpi_q35_smm_compat_nosmm); + qtest_add_func("acpi/q35/nohpet", test_acpi_q35_nohpet); + qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_dimm_pxm); + qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_dimm_pxm); + qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_acpi_hmat); + qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_acpi_hmat); + qtest_add_func("acpi/microvm", test_acpi_microvm); + qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb); + qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); + qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); if (strcmp(arch, "x86_64") == 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); } } else if (strcmp(arch, "aarch64") == 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); From patchwork Mon May 3 21:10:18 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: 1473410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=APHVwvOW; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwnb3wJYz9sSs for ; Tue, 4 May 2021 07:18:43 +1000 (AEST) Received: from localhost ([::1]:49448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfxh-0005UM-75 for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:18:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqa-0005aJ-Q8 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49014) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqY-0007Wx-4e for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076277; 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=lmsGdAeXnbzcEUQtPxKNfenyqUfv4M7E039KtK+jd+o=; b=APHVwvOWNXnwZQEPkumPTUi+uXZlNkXNNjrCpdgtjJIS1Vig3qwRbrvlsjauZTeE1nc3kw X9N1OvriKHPGo4zHO9jV/v568tgS0Mw/AdUlvnqo8mthuww1PobWxqmKMPbY1qmuaM+U0B ghfhBWUILtuLBEaXUor2oBN74u8Hako= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-US6lSkCmNZ64tomjyphDCQ-1; Mon, 03 May 2021 17:11:16 -0400 X-MC-Unique: US6lSkCmNZ64tomjyphDCQ-1 Received: by mail-wm1-f71.google.com with SMTP id d9-20020a1cb4090000b02901494f55f719so526030wmf.9 for ; Mon, 03 May 2021 14:11:15 -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=lmsGdAeXnbzcEUQtPxKNfenyqUfv4M7E039KtK+jd+o=; b=gjDM1x84YXXcz50ioodt0cyF2MKl3n8MEOXyy5KLcgg8Ohs4kTaVIA4ribexdQsKhI yA6V9ZJ6x1hQGGLGBL6AT5HGORKYFgEpYipGPXzM6bFsHGpd/N/xu15dlQ0f8IpkExVD LZdltdJGO189ITq6Z9+VdVb//5fSTLY40sCnQUm3eIno4V6l16u+9ZiNHXL6boDnbD7s MQBbqtWD1LW7A9wS7QNoHyhsS1EysreBorJNX8tzOy8YZIpukhXahNzF6MpFcli1VoMO KoxMtE+mmVVl7rkGPYgCOO8hQUBE+EHSEIdq5T9Nlb2hpbgApHg6kjjyIgRx6+asxfpi L70Q== X-Gm-Message-State: AOAM532QpEPAyERJLb19Yf1yxAJk6sMK6WFOOA82RPkSIDsCKYQ4fR8f SE7Z5VZhnxfOYcQSKZTmC2ExnfNf3pZqntdupR7g+dO4fOopfqeMZJb8l7C9kjFFL9jiCFJU/Jl HTrxZyqMmGk4xfkJOJQGxIeCFjVnICd1RiB5UcSdaBciK3x8Qd4+aEPL4W8n5BTsX X-Received: by 2002:a05:6000:1a41:: with SMTP id t1mr27173556wry.265.1620076273916; Mon, 03 May 2021 14:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzCovPDjxNrmplILnOlRHQ5+ryzIomT1pj36iIqeQ5U3Fc2o577r73dCZ66u6cwAo0v9sy7w== X-Received: by 2002:a05:6000:1a41:: with SMTP id t1mr27173524wry.265.1620076273664; Mon, 03 May 2021 14:11:13 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id b12sm13765763wro.28.2021.05.03.14.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:11:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 10/12] qtest/bios-tables-test: Rename TCG specific tests Date: Mon, 3 May 2021 23:10:18 +0200 Message-Id: <20210503211020.894589-11-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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: Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Some tests require TCG, but don't have '_tcg' in their name, while others do. Unify the test names by adding 'tcg' to the TCG specific tests. Reported-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ce498b3ff48..ad877baeb1b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc(void) free_test_data(&data); } -static void test_acpi_microvm_pcie(void) +static void test_acpi_microvm_pcie_tcg(void) { test_data data; @@ -1475,7 +1475,7 @@ static void test_acpi_oem_fields_microvm(void) g_free(args); } -static void test_acpi_oem_fields_virt(void) +static void test_acpi_oem_fields_virt_tcg(void) { test_data data = { .machine = "virt", @@ -1555,14 +1555,14 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); if (strcmp(arch, "x86_64") == 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } } else if (strcmp(arch, "aarch64") == 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); - qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); + qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt_tcg); } ret = g_test_run(); boot_sector_cleanup(disk); From patchwork Mon May 3 21:10:19 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: 1473397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BCUuH9Ls; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwdz0SSNz9sRR for ; Tue, 4 May 2021 07:12:07 +1000 (AEST) Received: from localhost ([::1]:57956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfrJ-0005pK-0T for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqf-0005kh-J6 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqc-0007Zg-RB for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076282; 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=55DSOQd/Ti/CUKuyk0Cp1QnVj2/mT8NrttR0T4lOw2k=; b=BCUuH9LsKviJ2kl8FsUhJwGtzfNh8/AXZZSsTMGMPQcjy75q/Vv1tWhf+afsU9SN1CmIa/ vwxeMSQdOa1xnlfsFUdErOmPzYu5VdbWb8yeYMgdDevL1JStAwGhm6SnQh/IOlVHbEBY/S 1Kwhu3loA4tY4+CtIpxc8PDtvatPVeU= 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-308-bFe5Qg65Me-aETnDO9dj-Q-1; Mon, 03 May 2021 17:11:20 -0400 X-MC-Unique: bFe5Qg65Me-aETnDO9dj-Q-1 Received: by mail-wr1-f71.google.com with SMTP id t18-20020adfdc120000b02900ffe4432d8bso4664024wri.6 for ; Mon, 03 May 2021 14:11:19 -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=55DSOQd/Ti/CUKuyk0Cp1QnVj2/mT8NrttR0T4lOw2k=; b=Q2d7rY8twy0R6OajpHuf7xsWDYAXkpXMsYjt3E3phojjx4Pkn8QpD9E21Jle9oTItg V28megBvct8KD2EIJFhrpX4rgi74euIcmdgKDo0xvOhN3fZcEPIxi9XM3eY18FAjvoVb 3cF4jvlvqgRQTP3EUEbWrqGhF7lMKW2Sm+PX9amwQbGtXiAOk6GAl73JsIC5zB4oUqMP IRKID/Ykrajgims5xiq62LRlTrGIa3qC5fDnSmjPpitXimHqXB5yr8Q74YNqEdBQn7cB 3eCB8UE4j6fdvuude+QMThNLc3WJXuTaAT6c3GN+yTneg8rzinw6j8Ke4Bqh7Q7AIa6V XGtQ== X-Gm-Message-State: AOAM532mF+fFJDKmDU/L1NWETcDs6mmyQIGP8PnvpbahcFMc4ax/Hyrk MgpJAQy/Jhx2n0k5s8NqGunL4wS1BHo2rVw3Ny8Moret2K3a3cEcEy1LtWSDdFiZJLbTRtZILuW Gp31xQhMParC0e/FH72qpIlsAMABx936hdNIn+72lcUP8dNsRg1wgnBxp6KslXkyr X-Received: by 2002:a5d:590a:: with SMTP id v10mr27356372wrd.306.1620076278666; Mon, 03 May 2021 14:11:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV1qhTF/cSFGi6edJcm6U39w2RXor4odw2skyISAbixSE9bV3i2oLRbybHHM5Z1O7CgeQAjQ== X-Received: by 2002:a5d:590a:: with SMTP id v10mr27356350wrd.306.1620076278480; Mon, 03 May 2021 14:11:18 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id y5sm721079wmj.25.2021.05.03.14.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:11:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 11/12] qtest/bios-tables-test: Make test build-independent from accelerator Date: Mon, 3 May 2021 23:10:19 +0200 Message-Id: <20210503211020.894589-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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: Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Reviewed-by: Igor Mammedov --- v5 had: Reviewed-by: Eric Blake Reviewed-by: Alex Bennée v6 is simplified and keeps the same logic, however since it is different, I'm not keeping the R-b tags. --- tests/qtest/bios-tables-test.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ad877baeb1b..762d154b340 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -97,6 +97,7 @@ typedef struct { QTestState *qts; } test_data; +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,12 +719,7 @@ 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); @@ -1506,6 +1502,8 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); + tcg_accel_available = qtest_has_accel("tcg"); + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { ret = boot_sector_init(disk); if (ret) { @@ -1554,10 +1552,10 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); - if (strcmp(arch, "x86_64") == 0) { + if (strcmp(arch, "x86_64") == 0 && tcg_accel_available) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } - } else if (strcmp(arch, "aarch64") == 0) { + } else if (strcmp(arch, "aarch64") == 0 && tcg_accel_available) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); From patchwork Mon May 3 21:10:20 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: 1473412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=GCIzfmrA; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4FYwsJ6kfXz9sRR for ; Tue, 4 May 2021 07:21:55 +1000 (AEST) Received: from localhost ([::1]:56958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldg0m-00008j-75 for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:21:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqi-0005sZ-UP for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfqh-0007bn-27 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:11:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076286; 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=GCIzfmrAAB7NZyClscJDsPurW1/JxJdgWTai5LiHfxF6SMx/dKYp3Yz6ogVtjeMzeD4t6/ Hn+Z36Acsje3mk4HxQQYdGkQrvtFkCyQ93cLCReBeFV9FEpX8iagVBZmNTZ59VrhbiCS2E Jq1HAkcebsB1UrhDAwO5UZslxWjAuFY= 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-572-3YleP1drO8WrSxSvqWIBuA-1; Mon, 03 May 2021 17:11:25 -0400 X-MC-Unique: 3YleP1drO8WrSxSvqWIBuA-1 Received: by mail-wr1-f70.google.com with SMTP id 4-20020adf80040000b029010cab735fdeso4646272wrk.14 for ; Mon, 03 May 2021 14:11:24 -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=eCykLPOIp79ij6Tgpn5P3YOsKcRcBjdN+HKf+adB8caxOPKtcXL/Qi9zyj007Tn76k 1okDFVzwsVh6oib+WnB1npd1p1IDK1Ugkes75xvM3lKSYrYXF4vweSVpURwi+vye7x3W 4c2qQYnLs4PCaF/g/u5eDyESJvogh0iHqpEoH+F9P9n15GaTvaqxz416w51ORxN3dvce 6n4bU7Er3p7se96z40UyBTipyJaqh+6ar7+H+4NrEBHzDcOIt96UDJDrLkyXAuH8AmFQ OB8n8inglbUR5XN5+YS34oWIcuRVj5cgA6qP0jOaLPOBIA9TVrXFfTlgE5DQ7RJ/kOAW huBg== X-Gm-Message-State: AOAM533sWYSI90PvGSNJta/yaSqz6Er0tFJ0g+ir1lej+GMqFksC7fZ0 prvmyk3qdqvte06Ud+BtkPxV6/t08I8nMKIzBxNwuXnqzHYShwj1dPKXppq24bhrbPbeA+0bNGK VZ9M8WaeAPO6fdbLTZvo2mry8gCNBWbg7PrUmYqMo+5DSaib+vOcLnlCDees4g3QN X-Received: by 2002:adf:f205:: with SMTP id p5mr18206960wro.170.1620076283704; Mon, 03 May 2021 14:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynziO9W07375ur1IXn0hlkC4Sug+UJ2gkHku/DXA/E/UX7wzftbA88fG0vF0Wn1SY/2dWasA== X-Received: by 2002:adf:f205:: with SMTP id p5mr18206939wro.170.1620076283523; Mon, 03 May 2021 14:11:23 -0700 (PDT) Received: from x1w.redhat.com (anancy-651-1-208-144.w109-217.abo.wanadoo.fr. [109.217.237.144]) by smtp.gmail.com with ESMTPSA id g13sm9225576wrd.41.2021.05.03.14.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:11:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 12/12] qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore Date: Mon, 3 May 2021 23:10:20 +0200 Message-Id: <20210503211020.894589-13-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210503211020.894589-1-philmd@redhat.com> References: <20210503211020.894589-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, 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 , Thomas Huth , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Markus Armbruster , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-arm@nongnu.org, Igor Mammedov , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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']