From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076230; cv=none; d=zohomail.com; s=zohoarc; b=PjVJ0pb1NQEAwKKPXVqcty+NZkeaRZflJLnlEvTh4fLosEiWzhCIWNVPIwvYQZ0a3+Y2SzLwX1WRjs2ENFi9giFM5hs4yg4CYg7b1aA0SLzLYjb9IeXncLjPNgxd4GkgheIIgZZLSzqVlNa0x0XeG9KiZX9pnAqWykFJQVujTME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076230; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Q6/hT/PIJKMoFbY2PhDO/rAVfPgYfzeV9gjOhaljcfU=; b=NADa5CTVKDMmB6zpiveQLroWqcF/Koux04OUPSu1SOZQjt1I9+TtF2nUM1C4OzLq64jTzGurAnY9Wd7CdXhf+YQXQorauQOXRiXgVALh/OOGTWropiHaru+aaxwIPumgQVS5gM/NzYkU+qIdNbrR8uMZ0NkHUB4zbUCqMxRtI+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620076230700107.18939152723692; Mon, 3 May 2021 14:10:30 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-B-3BiQgaNEiU1deI6g56gw-1; Mon, 03 May 2021 17:10:28 -0400 Received: by mail-wr1-f69.google.com with SMTP id 91-20020adf94640000b029010b019075afso4630279wrq.17 for ; Mon, 03 May 2021 14:10:28 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076229; 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=foOMzHQ6ijK1s+dOYc2H/uLK0Y4MQX5x2CY07jAHXSjLOFggkF6NZlDtr4rCghXcivPRvR yCjWFU9yCUj8koEgKcKLvpexwdSuZEWBDzA1du3FZTjn3HHkh26MVJzBETgQ6SuylrY94p osp7g944ZYSPLDZdetfli0LRc4zdQig= X-MC-Unique: B-3BiQgaNEiU1deI6g56gw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q6/hT/PIJKMoFbY2PhDO/rAVfPgYfzeV9gjOhaljcfU=; b=H2y1D9lk28HqhMS74UtowMoxYUqLGIm8mJx3flu6UeYiMBKciXJSoCLXoSNGiuScww Wx/h79eBCi2gXobLm/p9GROsY5O98cas9zel5J4TG4e7eJ2pkef1n2kGmQ3C61e+AWDW 6G4gFZHd2HfYpbXwKsJOi1RKSLSYXMicyGPF7L8OgX01u0cNvD+PlOAzSlzHOHHCNSza T48vIpxRhuHIJsob9CaVpX9Pjodwa+YrDghtZ1oKSfWsr0T4xhPUaSNH9Fgo+Z/1O1DC EP8BjgE5XozGZd6YSb+hZ8TjqMJ7oq+RR5U45mjghabpxTDNhSWXYHGlCBwXLF4+cuIj gJJg== X-Gm-Message-State: AOAM533DqnU6lTpGgAkyYLYcQG94GgJJFxPahNqS6syi2Tzkpb3P+lSj 3emIRgbg1OpCboz4dovVv1Lof12Xuse30bOUwxqAXP9deLbU220R3zGA3wd9HHyutaXlVye092b 3sI6AD4Ceoy/wJQ== X-Received: by 2002:a05:600c:4ecd:: with SMTP id g13mr22800403wmq.173.1620076227386; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We want the ARM maintainers and the qemu-arm@ list to be notified when this file is modified. Add an entry to the 'ARM TCG CPUs' section in the MAINTAINERS file. Acked-by: Andrew Jones Reviewed-by: Thomas Huth Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 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 --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076236; cv=none; d=zohomail.com; s=zohoarc; b=eIhpd15zpuOuai/qcEWBHJpXLtLbQ+U3gLTACKgUUoz87HRpoFmrKO5KC351j0ACrX6fzSvSl0SBmSnHh/+lIObA+WOtLP/8Q+KQhjIfRvm5VdM6x28w5mI2schE1DeMluOYTbIaoIoBjy07krisfKpAsAKW8UrtPN596GhS/Gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076236; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=P/JwIaYRijlIKIuvZy1yv4gicsUV0JiEB0BppIoUwQc=; b=fYAPsz0tR/n+WesZDcuBsCt/B+r4kFqssl1jdotMvECMW+tYw6nzlVhWog3w9KePosfK8I/SuQhKhBEGLu5kx7Ex3uI3eJ22ZlDUHE8PvRORuUWlnKzUJKO3vqROhwOgKME+aVWjNMzF3dl5VXz1vwfltwyS07qNQ424Z/5nbVI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076236795560.7026194303029; Mon, 3 May 2021 14:10:36 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36-FPJF3F1_MlGujLu5yO756Q-1; Mon, 03 May 2021 17:10:34 -0400 Received: by mail-wr1-f71.google.com with SMTP id v2-20020a0560001622b0290106e28f8af8so4625579wrb.9 for ; Mon, 03 May 2021 14:10:34 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: FPJF3F1_MlGujLu5yO756Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P/JwIaYRijlIKIuvZy1yv4gicsUV0JiEB0BppIoUwQc=; b=LwkEj3NJpXxOesSxZpkHoKD8c+zQQS2kqmJNjOSigDRU/t40HhnN1/Vh9qK1DNEMyM yr6uLLcpP34xaOHDQ8e90DRUeEuAKNbdLZywd+AK3U1IS2jvBEpIifcw28CAJgJNvigR bEVIHhL6MXKkrVZO8XEBAn+b1Q+87T7YljoisNFWPJrP7K2ev7AcyLV/8PJMvkwQVIB9 7lYUXM4pXEUJjWMwFEjPhWFqDedmniJnBHnHOlm5aT8FYFXIAAaUgpNBKzHxt19LNgbn vM4bYcVaP2D/bIva3BohT3AEHs4R3/Mf5LPWkNMNu2vlvrnQuW99QOZEeS3Un5rDKGuq YB6g== X-Gm-Message-State: AOAM532MT5xv69wRntEl7jKRJTqRyRaVq0YaAkFBzQMKN9GLVMSdJXYs cxGJRyhCHl3zciRkYhh1b3GQCjPbwwCgYIAr+1oVw+d1XH1N6MnsINg5hxURt+e448PiQBwwrjg V6eXiJjzoJfZ1Qw== X-Received: by 2002:a05:600c:4f4d:: with SMTP id m13mr504238wmq.133.1620076233049; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Introduce the 'query-accels' QMP command which returns a list of built-in accelerator names. - Accelerator is a QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Currently the common structure base provides the name of the accelerator, while the specific part is empty, but each accelerator can expand it. - 'query-accels' QMP command returns a list of @AcceleratorInfo For example on a KVM-only build we get: { "execute": "query-accels" } { "return": [ { "name": "qtest" }, { "name": "kvm" } ] } Note that we can't make the enum values or union branches conditional because of target-specific poisoning of accelerator definitions. Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- 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] =3D { + [ACCELERATOR_QTEST] =3D true, +#ifdef CONFIG_TCG + [ACCELERATOR_TCG] =3D true, +#endif +#ifdef CONFIG_KVM + [ACCELERATOR_KVM] =3D true, +#endif +#ifdef CONFIG_HAX + [ACCELERATOR_HAX] =3D true, +#endif +#ifdef CONFIG_HVF + [ACCELERATOR_HVF] =3D true, +#endif +#ifdef CONFIG_WHPX + [ACCELERATOR_WHPX] =3D true, +#endif +#ifdef CONFIG_XEN_BACKEND + [ACCELERATOR_XEN] =3D true, +#endif +}; + +AcceleratorInfoList *qmp_query_accels(Error **errp) +{ + AcceleratorInfoList *list =3D NULL, **tail =3D &list; + + for (Accelerator accel =3D 0; accel < ACCELERATOR__MAX; accel++) { + if (accel_builtin_list[accel]) { + AcceleratorInfo *info =3D g_new0(AcceleratorInfo, 1); + + info->name =3D accel; + + QAPI_LIST_APPEND(tail, info); + } + } + + return list; +} diff --git a/accel/meson.build b/accel/meson.build index b44ba30c864..7a48f6d568d 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -1,4 +1,4 @@ -specific_ss.add(files('accel-common.c')) +specific_ss.add(files('accel-common.c', 'accel-qmp.c')) softmmu_ss.add(files('accel-softmmu.c')) user_ss.add(files('accel-user.c')) =20 --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076241; cv=none; d=zohomail.com; s=zohoarc; b=QE/YMiyjAUlTZa4Tqfhkmtl8EmOBb3diCDX6ekhRgt6kKaz9dnsoQdgiC5F9HydOvgXFZaVJkcUBKB13xFcmJy1zpccUnXv951aq6HMkTnzLVxa6j6mvwPBk+YEV7++Lp9VqiIUSjGkJtvLi/dZntbR1AwhDAlUIZ2OX3NbzsNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076241; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=KvNHYhxkAqUqa9h+Qg11UCChxb8z3nuwgPPE3IGPHzY=; b=MDAzJ07QxV+9i5jhL+/Ektz6SYm+RhBPWcCrkQHQ334fqq/a+r2UINyUhvfj7X/GBJx/2YAOuzxF+gZ2AvoYpg7Yim6jg8PcIf3rR3vIn+jVjFJlsZVjA8jZlucvmJ7vWcAh8dtDYRUCNgX2S+bPhogyBopz5EDrpi55VnYFzwc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076241944815.0611068083593; Mon, 3 May 2021 14:10:41 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-552-47L3ORA1MI2E4pzXBInyrg-1; Mon, 03 May 2021 17:10:39 -0400 Received: by mail-wr1-f69.google.com with SMTP id a12-20020a5d6cac0000b0290109c3c8d66fso4640036wra.15 for ; Mon, 03 May 2021 14:10:39 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: 47L3ORA1MI2E4pzXBInyrg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KvNHYhxkAqUqa9h+Qg11UCChxb8z3nuwgPPE3IGPHzY=; b=fv0VmitqKkaUSm0RcrS4R8QpHZa/YmnWcL6vqW0Xdn4s+ishqlrJGy8AjnQV1/Xxzm 6ZVIDcda2OZRcs1GsSohgD0JalxCrLHgZaKLbj9PGFWnJmcE2wJlC+sle3WJTPr8v6gw hrjs5mSnjOA5VksP1O+s2TbcFMVBUhHOdQ6OxMRnT4FITg0ILDPVfgTDK2paOI4kDnna FR/Mli8ygQUdIjEeX4P9rLsjbdAf077N6xZOCbD2K4Y/G4oU0ri9fA8D1Sl0oG0NVi04 idQgL8QMhs01ANF1xrL4SyaKAKMQiegQ8/LHOAywTj/3AofYAavN/mfBu0L3OnO/1+EB 3U0w== X-Gm-Message-State: AOAM533dUXKKgqJkEK1AViT2EFIAoNtA+J+nc6f+PUHIhzwgSk0p9qM7 Uko1gRKoGYFsY+gWcOFgAnRtoxiMQS0vs5K2HujfMVbf1q577C4/ZQndkx0IWmoy30dPr6W9jcX Doo8UUZQAQZRhLg== X-Received: by 2002:a5d:6e85:: with SMTP id k5mr10219311wrz.384.1620076238146; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Introduce the qtest_has_accel() method which allows a runtime query on whether a QEMU instance has an accelerator built-in. Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/libqos/libqtest.h | 8 ++++++++ tests/qtest/libqtest.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h index a68dcd79d44..d80c618c18d 100644 --- a/tests/qtest/libqos/libqtest.h +++ b/tests/qtest/libqos/libqtest.h @@ -763,6 +763,14 @@ void qmp_expect_error_and_unref(QDict *rsp, const char= *class); */ bool qtest_probe_child(QTestState *s); =20 +/** + * qtest_has_accel: + * @accel_name: Accelerator name to check for. + * + * Returns: true if the accelerator is built in. + */ +bool qtest_has_accel(const char *accel_name); + /** * qtest_set_expected_status: * @s: QTestState instance to operate on. diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 71e359efcd3..2156b7e3972 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -393,6 +393,35 @@ QTestState *qtest_init_with_serial(const char *extra_a= rgs, int *sock_fd) return qts; } =20 +bool qtest_has_accel(const char *accel_name) +{ + bool has_accel =3D false; + QDict *response; + QList *accels; + QListEntry *accel; + QTestState *qts; + + qts =3D qtest_initf("-accel qtest -machine none"); + response =3D qtest_qmp(qts, "{'execute': 'query-accels'}"); + accels =3D qdict_get_qlist(response, "return"); + + QLIST_FOREACH_ENTRY(accels, accel) { + QDict *accel_dict =3D qobject_to(QDict, qlist_entry_obj(accel)); + const char *name =3D qdict_get_str(accel_dict, "name"); + + if (g_str_equal(name, accel_name)) { + has_accel =3D true; + break; + } + } + qobject_unref(response); + + qtest_quit(qts); + + return has_accel; +} + + void qtest_quit(QTestState *s) { qtest_remove_abrt_handler(s); --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076247; cv=none; d=zohomail.com; s=zohoarc; b=LddO9tDwAaiiMnTyQ1Db37KI9qylJ3Gp+5f4VZg5BJuJnEjM7vnSULD4kxwOSyXmycmVffvblrSS1TsdZ3E3FWV3hYYKhttoxncO7NLypS1k0u+Wkr+HPf4AcuycJtRZ+Pnb9YDk/c5qop/8jyt2UAPN9n6HVBiNRdZlYsr/Twc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076247; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=MeNb2Atwfh/sX8kxLzvRexJijoqF1JUDJOimaLT3mRk=; b=eVNONHYusUmnAQfJZ31IG9x0kJQHBeWzpGxwTRx/V9G7E3KD/42gg3ABXOfBn0Fxy+dgFxax1MJgIrwtitvHaEJdC+TtyYOCPLtfa9LbdIwrqG9NoGDhtLzju6I6qHgZtcw2P2loUT8hZ6OYJ1nSCXRhkoxlcorYCHHDLoBFzAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076247294115.38208685361997; Mon, 3 May 2021 14:10:47 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-g-AdGP5JN2q9-MnrWyqkVQ-1; Mon, 03 May 2021 17:10:44 -0400 Received: by mail-wr1-f69.google.com with SMTP id a7-20020adfc4470000b029010d875c66edso4626015wrg.23 for ; Mon, 03 May 2021 14:10:44 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: g-AdGP5JN2q9-MnrWyqkVQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MeNb2Atwfh/sX8kxLzvRexJijoqF1JUDJOimaLT3mRk=; b=uMuBBLIoHhnn/iahvzSQpcakfhheslPN/uZD+rYgVKR/hSEbutpTxHqST0sM4GxCXr B5qQmR/pevOGr6P8aEPwF2u9ClBdEePzag41ZGu0w4V/3FZjXmdczWpZ6fS5/xHvIld+ 4/kpK3oLdF1ICooIVqmX4CFdmv4NHujl2NUHr5v0JqGMyiDtUCTn9fDRWelIbMgFFszE 20qdfQjsEEGsLATVMmM2yYaZ7FzF//0TYjPCQRJsajkor0+sTutAx2ZY9P3rYxW5EL6y a8h4OajwfKK6Kx447zsMgTOgsZx4D4N3pYhxkMyxiydlKAPyy0Z1O6vQXdS+E6rhQPmL uiHw== X-Gm-Message-State: AOAM530T8zNfVX4En3pPtKeSecrCGsQzATXSavLXQRL2LVLZsNtlo6m5 IQeDbCR5/FpgDLujq99ttnFDBUOZZiFu8Fnvrgt+SRyVihrInzGm+WALLF5u+AYEPBb95KxoQXJ YQzkmy8EFyPqOmA== X-Received: by 2002:a1c:f313:: with SMTP id q19mr23187061wmq.142.1620076243708; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Claudio Fontana , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Use the recently added generic qtest_has_accel() method to check if KVM is available. Suggested-by: Claudio Fontana Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 8252b85bb85..7f4b2521277 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -26,21 +26,6 @@ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" =20 -static bool kvm_enabled(QTestState *qts) -{ - QDict *resp, *qdict; - bool enabled; - - resp =3D qtest_qmp(qts, "{ 'execute': 'query-kvm' }"); - g_assert(qdict_haskey(resp, "return")); - qdict =3D qdict_get_qdict(resp, "return"); - g_assert(qdict_haskey(qdict, "enabled")); - enabled =3D qdict_get_bool(qdict, "enabled"); - qobject_unref(resp); - - return enabled; -} - static QDict *do_query_no_props(QTestState *qts, const char *cpu_type) { return qtest_qmp(qts, QUERY_HEAD "'model': { 'name': %s }" @@ -493,14 +478,6 @@ static void test_query_cpu_model_expansion_kvm(const v= oid *data) =20 qts =3D qtest_init(MACHINE_KVM "-cpu max"); =20 - /* - * These tests target the 'host' CPU type, so KVM must be enabled. - */ - if (!kvm_enabled(qts)) { - qtest_quit(qts); - return; - } - /* Enabling and disabling kvm-no-adjvtime should always work. */ assert_has_feature_disabled(qts, "host", "kvm-no-adjvtime"); assert_set_feature(qts, "host", "kvm-no-adjvtime", true); @@ -624,7 +601,7 @@ int main(int argc, char **argv) * order avoid attempting to run an AArch32 QEMU with KVM on * AArch64 hosts. That won't work and isn't easy to detect. */ - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")= ) { qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", NULL, test_query_cpu_model_expansion_kvm); } --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076252; cv=none; d=zohomail.com; s=zohoarc; b=gR7a2LGHD7fWxCetDlvPP2ER2CzhT87QFwlndQLeQjLnPMeMwQl6bE3G1HvILZJTk4KkqLUDIlt+NiZ9MLke/8fxyAi+U3gYdJXaFx0T7J76pjjYqQd2rURedWR5ZgnnFO1P9P5rzwqAdLiCy91JJsjklcfFyoq6d28pP8SGdZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076252; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=YUwsAY7j/ecV1UbnP3UC7xEIyUmH3VJq/XNOQQ4OyUg=; b=CDWmm+cTXXRoUcXY3Wd52E2AcY78uxe0dTpIB8G0gS5E04XhqYvkgX6+g4exdg4WbWtWZ5YdnZ/7ePZPk+jWwKiHenUUpP5BPnqUrl006pOqHcKMyrTQHvC+ecvtScNkhfsJrX6XNyOnJx6C0VQjt0VKC+k2OnUiNBVDIgQ8rdg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076252169603.4546959962518; Mon, 3 May 2021 14:10:52 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-wZBxYUWoPqihjhd2QStvWg-1; Mon, 03 May 2021 17:10:49 -0400 Received: by mail-wr1-f72.google.com with SMTP id 4-20020adf91840000b029010d9c088599so4661004wri.10 for ; Mon, 03 May 2021 14:10:49 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: wZBxYUWoPqihjhd2QStvWg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YUwsAY7j/ecV1UbnP3UC7xEIyUmH3VJq/XNOQQ4OyUg=; b=lqFZOByuAvYcmGbHetRuwRkPZgn3CowyREmk9TPjbZMPc1qkZUyv3GjbqaMZYTNioK nott0M45vHGnm+6fGp1G3d3rjfiGUFuB4Tw9rGZeTlvAs+1MfHzPM4zLf+mH3PXmPKJ1 fmMIOVCDmwm7248CjxXsxIIhgW5ruXyB0nTiOALibCM4cgeHp4pMsq1t33ZcIuj29mdh sQptuGAyGUn5ao2GMTyvgm/jaQArKQbc+WNoWntght2RiPqsYtA2fNaews4vtAI/YuN1 720rLqz/nTckwmzSSW+GJRLUoiAtsAFq7p7G8FOM8RRSwlwzAodAUIpG1ItA0Dyk/iiQ nISg== X-Gm-Message-State: AOAM530HodOfIRpJtusCfSSfZeSwPVCwlI7E0vYRFVv6ZVdF1lxOYnzW tw8onsipyN9IdEw9/yl1lzTSnwDLCWHh7kDIfN/ub1C2oKIv9t2egMp0mGPtMM4F/iS3N8TOHEp eyBLUBvCJo+p/lA== X-Received: by 2002:adf:da4f:: with SMTP id r15mr26790902wrl.411.1620076248727; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The sve_tests_sve_off_kvm() test is KVM specific. Only run it if KVM is available. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 7f4b2521277..66300c3bc20 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -604,6 +604,8 @@ int main(int argc, char **argv) if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")= ) { qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", NULL, test_query_cpu_model_expansion_kvm); + qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off", + NULL, sve_tests_sve_off_kvm); } =20 if (g_str_equal(qtest_get_arch(), "aarch64")) { @@ -611,8 +613,6 @@ int main(int argc, char **argv) NULL, sve_tests_sve_max_vq_8); qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off", NULL, sve_tests_sve_off); - qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off", - NULL, sve_tests_sve_off_kvm); } =20 return g_test_run(); --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076257; cv=none; d=zohomail.com; s=zohoarc; b=TRG12qAFufJeCUPHMTwPX9HDrSUov0EZQklj2g1cGre5IyHD6rb0g/O+tGXiFYrLAe9FOJej2DxDOo61cGIE7SKlFxTBTYhRg8s9QSBMyq6EJx/jbpCLdgIg8NM9w2mLFNWbxRtnB3FZD+xF9Z+LeW2nra/jSKmmj5lkh5MV3Fk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076257; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cVrcRnyBOkjPEo/icx3S79OKNawcTbdRmhevRRnT37M=; b=kX9IC/w0RIRLWH00VhWMkjUjhTVBeIP3zOrTkCdxptVQAGCjL7ejY7QvONpme7DpvsvovG47CYORpzRwvynLUX23gcEqc2ZE8qi2ptqmjUd94MEQ7qJ1JxIwfkWUYF1StANvG3wL0PSWOBN9VPEF3RhKKwO6FZ4PX/2XvhPMFBA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076257090385.7776347434899; Mon, 3 May 2021 14:10:57 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-AofSo9-AOjyNBfTWKGZdvA-1; Mon, 03 May 2021 17:10:54 -0400 Received: by mail-wr1-f72.google.com with SMTP id 91-20020adf94640000b029010b019075afso4631012wrq.17 for ; Mon, 03 May 2021 14:10:54 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: AofSo9-AOjyNBfTWKGZdvA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cVrcRnyBOkjPEo/icx3S79OKNawcTbdRmhevRRnT37M=; b=oBqcqx8UeqRHMYCwsqDzSgYe4pjfv7vpdRtUv7E6wBd0O7PHL8SG5gFMEZhwDq/dPz BpG7HrqIEk62gbe6vCkPXk/r/ryimr6qunIHiQzNohz41ZH2qMFiKpwIc8YcAbL9fjb4 Eeh3oWtGtpekdk8iVv/W6BhC4EHI4ysM2rOJqPze68XxGoggy1I/1WvyFIu1zvpx4+Vy 2xBRPwBHhlB0adYKBH5onEkv6btfxJIR608NdVwZkRHsE2K8PsHwbApQNnyYfpHsqHKp iCDc91kxoiSPwMAJAbwriYf/m84hRsRlJzZcHcoX0HeIaBqtr/WHpFj9azZTXBxylYwn CnWw== X-Gm-Message-State: AOAM531IOaNlL+yIODQSlCq7iKqiYRPf6I9V+ZTg3cruprHJ6q1qvuIE 0rM+yYxxNCtC7vCeym2fwBSDUbiJK8hPb2Kb1KBpYVuoxXTX4a7dXewnf64OwE5B3mIGHxH7tWy pTKxDiTYuFZkKsw== X-Received: by 2002:a5d:408f:: with SMTP id o15mr26434701wrp.89.1620076253699; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) sve_tests_sve_off_kvm() and test_query_cpu_model_expansion_kvm() tests are now only being run if KVM is available. Drop the TCG fallback. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 66300c3bc20..b1d406542f7 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -21,7 +21,7 @@ #define SVE_MAX_VQ 16 =20 #define MACHINE "-machine virt,gic-version=3Dmax -accel tcg " -#define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm -accel tcg= " +#define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " #define QUERY_TAIL "}}" --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076262; cv=none; d=zohomail.com; s=zohoarc; b=Wr11zOtLsl6rxBxxHmX0A7umeevoeVyWIRFJPWKhdYFz/De9RjbJZT/rKxzlnFe+3rQ4NfafUC093Tnw9QDXWHrdQpyLPqI1gcKkUylqcv8+VjUlblJvv2k2ZNxKfdeCSwCb6Nr1VWb4tkyk7i3cdYkaK1x7RXsTeOFPm82TwlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076262; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JLhAw7XD7qIOrjXaghuSYUyF7i2GShMvrYawRB6AMVs=; b=gn6rfN4SDqUHrUe7qXxpHwMQ0PUNez6b+rxcOTb3JF8v0u2ZxKq0hYzY3m7uKYVCtfd6EiU83wXx6+59PHKULl26GFJ1j7ARw59VkajxML7epKIRE8gbpPtaRLJLMMSj3qBp4NCsj0TF2uyxTmfjRIEDR8BwHahW2NFNJ2A5MXc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 162007626224230.11658960528905; Mon, 3 May 2021 14:11:02 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-qm2AtLVcNriH5-BF2s-0NQ-1; Mon, 03 May 2021 17:11:00 -0400 Received: by mail-wr1-f69.google.com with SMTP id 93-20020adf83660000b029010d6b1e0949so4639537wrd.3 for ; Mon, 03 May 2021 14:10:59 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: qm2AtLVcNriH5-BF2s-0NQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JLhAw7XD7qIOrjXaghuSYUyF7i2GShMvrYawRB6AMVs=; b=HKVwjXkbs5EA8+rd1kw14tYzxj2VRG5QeQw22LDS+Dns6ILz7pvOl9EWqCooYHPwCI bccE0jM/GfDx38g8inku5RRJ6qzmaZBomzcDSbtUnOerlBYZvs48tPVipHImDCTAQbeb 5/0TKyRtNsBXTNF4mAvZQ10DIN4OT8SgQ2XkF0ey/NX/sUUNdvkq2SBIUI7f9NU3j2UX o1ecmeUwUuxwIwThVIC7OBh/8jh+z0on569UCA9Lw4hxBZD37yiZqRCN17sj36ar5BpC J3iqqH6LXk+pJj3GtUbHLQ4Vf12MmmVlsKvsHPnrtFmGJnJOmEJ/NIT8j3nxwDGAi+SS Argg== X-Gm-Message-State: AOAM532fMO71mMltwg6mOOHv6Zf41rYihXWKM1iqVAD3JOMATFOP269O 8MuWkacCNyRV4JavryTiNIfzZobNOb5HmCRYjHvoM3OwUCsSqGInbApriDxqhR5I9p7ZLZ4yjRK Csz1ulc+XZxOoZg== X-Received: by 2002:a05:600c:4a19:: with SMTP id c25mr23190384wmp.94.1620076258844; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Jones , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Now than we can probe if the TCG accelerator is available at runtime with a QMP command, only run these tests if TCG is built into the QEMU binary. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/arm-cpu-features.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index b1d406542f7..0d9145dd168 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -20,7 +20,7 @@ */ #define SVE_MAX_VQ 16 =20 -#define MACHINE "-machine virt,gic-version=3Dmax -accel tcg " +#define MACHINE_TCG "-machine virt,gic-version=3Dmax -accel tcg " #define MACHINE_KVM "-machine virt,gic-version=3Dmax -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " @@ -337,7 +337,7 @@ static void sve_tests_sve_max_vq_8(const void *data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max,sve-max-vq=3D8"); + qts =3D qtest_init(MACHINE_TCG "-cpu max,sve-max-vq=3D8"); =20 assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL); =20 @@ -372,7 +372,7 @@ static void sve_tests_sve_off(const void *data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max,sve=3Doff"); + qts =3D qtest_init(MACHINE_TCG "-cpu max,sve=3Doff"); =20 /* SVE is off, so the map should be empty. */ assert_sve_vls(qts, "max", 0, NULL); @@ -428,7 +428,7 @@ static void test_query_cpu_model_expansion(const void *= data) { QTestState *qts; =20 - qts =3D qtest_init(MACHINE "-cpu max"); + qts =3D qtest_init(MACHINE_TCG "-cpu max"); =20 /* Test common query-cpu-model-expansion input validation */ assert_type_full(qts); @@ -593,8 +593,10 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 - qtest_add_data_func("/arm/query-cpu-model-expansion", - NULL, test_query_cpu_model_expansion); + if (qtest_has_accel("tcg")) { + qtest_add_data_func("/arm/query-cpu-model-expansion", + NULL, test_query_cpu_model_expansion); + } =20 /* * For now we only run KVM specific tests with AArch64 QEMU in @@ -608,7 +610,7 @@ int main(int argc, char **argv) NULL, sve_tests_sve_off_kvm); } =20 - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("tcg")= ) { qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq= -8", NULL, sve_tests_sve_max_vq_8); qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off", --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076269; cv=none; d=zohomail.com; s=zohoarc; b=cmmaIEN9BVG5YsUkp39V+ugWvIzp+votfzp+L+IzDkaR2CaomBqHHqDXcPntAJhAf7qViSEcpXXIUfvaNDUlyJALiyefhvAVlAmVdjzL7AHHLqku1WA3nFqUKJ5Opj+7jqCdmR/W5qZgLpJC8SJ/zsYb/zOyzxTDUcR7BiYO/fg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076269; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NSr0ATvoVPT94Kw0PlP2HcPHUZbWsmv1leCf95/HD08=; b=mmIbgDyqwblG2v/DZ3ysuNfDxI26dREQMw4YlSpTAo9u2Z2oU9S2GXhR1P9xCAO7231XObr7KTH84MCQi+i8R4wYoaDfJXRvuITtKAHdwmFQEqIsAEwLOqJf2ChwCG04aW5HZr15hI7/tslGVu17S6cQJGx8vMLlBD2OCFCNKcE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076269563709.4219112530075; Mon, 3 May 2021 14:11:09 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-LCMR4ub7PYCrbjfB1VJtmw-1; Mon, 03 May 2021 17:11:05 -0400 Received: by mail-wr1-f69.google.com with SMTP id 65-20020adf82c70000b0290107593a42c3so4667456wrc.5 for ; Mon, 03 May 2021 14:11:04 -0700 (PDT) Return-Path: Return-Path: 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) 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= X-MC-Unique: LCMR4ub7PYCrbjfB1VJtmw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NSr0ATvoVPT94Kw0PlP2HcPHUZbWsmv1leCf95/HD08=; b=I4AKGABDIxLOMhn0JltLchi940/mTjLebtxsbBnY6l8pwtY+xXY/7SLvdOW7f0hT05 ooRGnYOMeXmsXuDTZCehqS7NZ0JK+K1wS8B12j6l+tMxzlGIdRi4c1SIiS2mk6TYoo+r BrNha7+//uN1Qw8M5IQpEcNLHrtf761QGP24TYiMn6MvArZva2kOxkW6Xb9ihhWAj8fk iO38NgfRE2fxUAeYoqSdRn/663ZkRciplfbkiQDmrpxD3hwbCXtmOrpaX/d8CZsqE6mK q+KPMCZDDmJBDRPz01zPDE6aL0SlhePtn49o3c3K9W50HBTdZVO28rdCbuWdxGaneeow 5sGw== X-Gm-Message-State: AOAM530Bdue6fA7SGOPvH7qVBa2ss/hFLQ1XXR/HUwqGDqSa3dSeZ5l5 86S6oxWONz9DMJ9dioln34QHcE9ZGwTF2DXgyMtIMgLNU/KHtW4WF1iaDRfBvmQ8gz3C2uwxKjx 5JwVj1ahbXpO/Ng== X-Received: by 2002:a5d:694c:: with SMTP id r12mr19922314wrw.224.1620076263875; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , David Gibson , Greg Kurz , Cornelia Huck , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Juan Quintela , "Dr. David Alan Gilbert" , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We might have a s390x/ppc64 QEMU binary built without the KVM accelerator (configured with --disable-kvm). Checking for /dev/kvm accessibility isn't enough, also check for the accelerator in the binary. Reviewed-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: Cornelia Huck Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/migration-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 3a711bb4929..c32a2aa30a2 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1408,7 +1408,7 @@ int main(int argc, char **argv) */ if (g_str_equal(qtest_get_arch(), "ppc64") && (access("/sys/module/kvm_hv", F_OK) || - access("/dev/kvm", R_OK | W_OK))) { + access("/dev/kvm", R_OK | W_OK) || !qtest_has_accel("kvm"))) { g_test_message("Skipping test: kvm_hv not available"); return g_test_run(); } @@ -1419,7 +1419,7 @@ int main(int argc, char **argv) */ if (g_str_equal(qtest_get_arch(), "s390x")) { #if defined(HOST_S390X) - if (access("/dev/kvm", R_OK | W_OK)) { + if (access("/dev/kvm", R_OK | W_OK) || !qtest_has_accel("kvm")) { g_test_message("Skipping test: kvm not available"); return g_test_run(); } --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076273; cv=none; d=zohomail.com; s=zohoarc; b=FydqEX+xSHjKIrMWDvUwQUMtujfb4SgCGg3nspfgI8qiSLwkGLjYrMQKvzNaam9LdEzCoMrvV4RWxrEpnIqQCwMwo8A2C7BiDqn+OT28zWdtMlaQM5RoUD7STz5QxQDhPinzKJA3HySMd0TVO9IE0lAQVlguki0p84DMrOONXNI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076273; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JRPk/6A8ss7eJYrQYwmPODA5RE5ch0tA+RiuLup7F7c=; b=efQA8Z9noAoVlRs9WGWx0w+pPijGr7AEdYbxMmvM6Q0+Cjw2GskmhTZ1gwIPNYo/9yYwXtlWBj0PH5V/AcPqz3h+HCiygzA8AalUUIY0MYu2zxLkRfjEQNIXEMQk6rQiTm6i/n7aZJQp5vC0a54wUKxXNG0Izx+Hi6pCwi8TdYU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620076273137785.1024369737744; Mon, 3 May 2021 14:11:13 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-i6jga6z8PR2a6bGdQTGdAA-1; Mon, 03 May 2021 17:11:10 -0400 Received: by mail-wr1-f71.google.com with SMTP id r12-20020adfc10c0000b029010d83323601so4609698wre.22 for ; Mon, 03 May 2021 14:11:09 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076271; 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=FoPieQKDp5o6TAUmQtsNGJ29kylnsns1VTTYHuafKCPLnMFtZFlbP+R/STzADqzE3zLNlG wIEsquFaNwoOzajJAtnrcRzhRs/krUukGRMJmp3m4QN8lQZa6GB7KrlE0xVuHT1XVKmfP0 yCkP2IYdshwZjJC7/i2kFul2yIE3XLE= X-MC-Unique: i6jga6z8PR2a6bGdQTGdAA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JRPk/6A8ss7eJYrQYwmPODA5RE5ch0tA+RiuLup7F7c=; b=eHcGvJ2DtLOAewm6zpKNzYo7hjs5aKYUIE7uGOC0t7mzzUkHySdI0qd3vNEyIAAfQa 0Z54RCr1DCfHvWflx92ip4bI6TxXaJYVQD0sQOUB+3EIks1i7WGgt2pYndADDVf0Cc4v R7P225oYEtFc350wPk74ZPvCwl9UKDLK7yABEUGzwIo173j0yja7771A3pQcV9G04pZO Nl1ZXmeOXKc+zYWTuKGKsENlyiINLup0lJcvflPisOV5ugW+biFDhorKlIcLU00y/PBb dmwljXn9d+ygLyzWp0FyWY5uXJtumABWSxdsoRVDE3FAWiSU4qbL6bBnNZstAsdgNPDi xEwQ== X-Gm-Message-State: AOAM531QPmQb+I7KbKqWTUTfKHv8EzvWebDlfXdVpCDVm2aa0G2f8OiD L4hdO93F+9vuQmj1BoieIz3mn3GRzS+1ye522Wa6Ka7gYpXUIbHQLS4PZm3DzX9AI6o6M+8Rk8l hO2w887g2G3yeAg== X-Received: by 2002:a5d:6087:: with SMTP id w7mr14118056wrt.136.1620076268845; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Various tests don't require TCG, but have '_tcg' in their name. As this is misleading, remove 'tcg' from their name. Reported-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 142 ++++++++++++++++----------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 156d4174aa3..ce498b3ff48 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -753,7 +753,7 @@ static uint8_t base_required_struct_types[] =3D { 0, 1, 3, 4, 16, 17, 19, 32, 127 }; =20 -static void test_acpi_piix4_tcg(void) +static void test_acpi_piix4(void) { test_data data; =20 @@ -768,7 +768,7 @@ static void test_acpi_piix4_tcg(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_bridge(void) +static void test_acpi_piix4_bridge(void) { test_data data; =20 @@ -824,7 +824,7 @@ static void test_acpi_piix4_no_acpi_pci_hotplug(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg(void) +static void test_acpi_q35(void) { test_data data; =20 @@ -841,7 +841,7 @@ static void test_acpi_q35_tcg(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_bridge(void) +static void test_acpi_q35_bridge(void) { test_data data; =20 @@ -855,7 +855,7 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_mmio64(void) +static void test_acpi_q35_mmio64(void) { test_data data =3D { .machine =3D MACHINE_Q35, @@ -872,7 +872,7 @@ static void test_acpi_q35_tcg_mmio64(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_cphp(void) +static void test_acpi_piix4_cphp(void) { test_data data; =20 @@ -888,7 +888,7 @@ static void test_acpi_piix4_tcg_cphp(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_cphp(void) +static void test_acpi_q35_cphp(void) { test_data data; =20 @@ -908,7 +908,7 @@ static uint8_t ipmi_required_struct_types[] =3D { 0, 1, 3, 4, 16, 17, 19, 32, 38, 127 }; =20 -static void test_acpi_q35_tcg_ipmi(void) +static void test_acpi_q35_ipmi(void) { test_data data; =20 @@ -923,7 +923,7 @@ static void test_acpi_q35_tcg_ipmi(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_ipmi(void) +static void test_acpi_piix4_ipmi(void) { test_data data; =20 @@ -941,7 +941,7 @@ static void test_acpi_piix4_tcg_ipmi(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_memhp(void) +static void test_acpi_q35_memhp(void) { test_data data; =20 @@ -957,7 +957,7 @@ static void test_acpi_q35_tcg_memhp(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_memhp(void) +static void test_acpi_piix4_memhp(void) { test_data data; =20 @@ -973,7 +973,7 @@ static void test_acpi_piix4_tcg_memhp(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_nosmm(void) +static void test_acpi_piix4_nosmm(void) { test_data data; =20 @@ -984,7 +984,7 @@ static void test_acpi_piix4_tcg_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_smm_compat(void) +static void test_acpi_piix4_smm_compat(void) { test_data data; =20 @@ -995,7 +995,7 @@ static void test_acpi_piix4_tcg_smm_compat(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_smm_compat_nosmm(void) +static void test_acpi_piix4_smm_compat_nosmm(void) { test_data data; =20 @@ -1006,7 +1006,7 @@ static void test_acpi_piix4_tcg_smm_compat_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_nohpet(void) +static void test_acpi_piix4_nohpet(void) { test_data data; =20 @@ -1017,7 +1017,7 @@ static void test_acpi_piix4_tcg_nohpet(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_numamem(void) +static void test_acpi_q35_numamem(void) { test_data data; =20 @@ -1029,7 +1029,7 @@ static void test_acpi_q35_tcg_numamem(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_nosmm(void) +static void test_acpi_q35_nosmm(void) { test_data data; =20 @@ -1040,7 +1040,7 @@ static void test_acpi_q35_tcg_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_smm_compat(void) +static void test_acpi_q35_smm_compat(void) { test_data data; =20 @@ -1051,7 +1051,7 @@ static void test_acpi_q35_tcg_smm_compat(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_smm_compat_nosmm(void) +static void test_acpi_q35_smm_compat_nosmm(void) { test_data data; =20 @@ -1062,7 +1062,7 @@ static void test_acpi_q35_tcg_smm_compat_nosmm(void) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_nohpet(void) +static void test_acpi_q35_nohpet(void) { test_data data; =20 @@ -1073,7 +1073,7 @@ static void test_acpi_q35_tcg_nohpet(void) free_test_data(&data); } =20 -static void test_acpi_piix4_tcg_numamem(void) +static void test_acpi_piix4_numamem(void) { test_data data; =20 @@ -1087,11 +1087,11 @@ static void test_acpi_piix4_tcg_numamem(void) =20 uint64_t tpm_tis_base_addr; =20 -static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, +static void test_acpi_tpm(const char *machine, const char *tpm_if, uint64_t base) { #ifdef CONFIG_TPM - gchar *tmp_dir_name =3D g_strdup_printf("qemu-test_acpi_%s_tcg_%s.XXXX= XX", + gchar *tmp_dir_name =3D g_strdup_printf("qemu-test_acpi_%s_%s.XXXXXX", machine, tpm_if); char *tmp_path =3D g_dir_make_tmp(tmp_dir_name, NULL); TestState test; @@ -1139,12 +1139,12 @@ static void test_acpi_tcg_tpm(const char *machine, = const char *tpm_if, #endif } =20 -static void test_acpi_q35_tcg_tpm_tis(void) +static void test_acpi_q35_tpm_tis(void) { - test_acpi_tcg_tpm("q35", "tis", 0xFED40000); + test_acpi_tpm("q35", "tis", 0xFED40000); } =20 -static void test_acpi_tcg_dimm_pxm(const char *machine) +static void test_acpi_dimm_pxm(const char *machine) { test_data data; =20 @@ -1174,14 +1174,14 @@ static void test_acpi_tcg_dimm_pxm(const char *mach= ine) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_dimm_pxm(void) +static void test_acpi_q35_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_Q35); + test_acpi_dimm_pxm(MACHINE_Q35); } =20 -static void test_acpi_piix4_tcg_dimm_pxm(void) +static void test_acpi_piix4_dimm_pxm(void) { - test_acpi_tcg_dimm_pxm(MACHINE_PC); + test_acpi_dimm_pxm(MACHINE_PC); } =20 static void test_acpi_virt_tcg_memhp(void) @@ -1223,7 +1223,7 @@ static void test_acpi_microvm_prepare(test_data *data) data->blkdev =3D "virtio-blk-device"; } =20 -static void test_acpi_microvm_tcg(void) +static void test_acpi_microvm(void) { test_data data; =20 @@ -1233,7 +1233,7 @@ static void test_acpi_microvm_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_usb_tcg(void) +static void test_acpi_microvm_usb(void) { test_data data; =20 @@ -1244,7 +1244,7 @@ static void test_acpi_microvm_usb_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_rtc_tcg(void) +static void test_acpi_microvm_rtc(void) { test_data data; =20 @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_pcie_tcg(void) +static void test_acpi_microvm_pcie(void) { test_data data; =20 @@ -1267,7 +1267,7 @@ static void test_acpi_microvm_pcie_tcg(void) free_test_data(&data); } =20 -static void test_acpi_microvm_ioapic2_tcg(void) +static void test_acpi_microvm_ioapic2(void) { test_data data; =20 @@ -1332,7 +1332,7 @@ static void test_acpi_virt_tcg_pxb(void) free_test_data(&data); } =20 -static void test_acpi_tcg_acpi_hmat(const char *machine) +static void test_acpi_acpi_hmat(const char *machine) { test_data data; =20 @@ -1364,14 +1364,14 @@ static void test_acpi_tcg_acpi_hmat(const char *mac= hine) free_test_data(&data); } =20 -static void test_acpi_q35_tcg_acpi_hmat(void) +static void test_acpi_q35_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_Q35); + test_acpi_acpi_hmat(MACHINE_Q35); } =20 -static void test_acpi_piix4_tcg_acpi_hmat(void) +static void test_acpi_piix4_acpi_hmat(void) { - test_acpi_tcg_acpi_hmat(MACHINE_PC); + test_acpi_acpi_hmat(MACHINE_PC); } =20 static void test_acpi_virt_tcg(void) @@ -1512,50 +1512,50 @@ int main(int argc, char *argv[]) return ret; } qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); - qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); - qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); + qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tpm_tis); + qtest_add_func("acpi/piix4", test_acpi_piix4); qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); - qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); + qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_bridge); qtest_add_func("acpi/piix4/pci-hotplug/no_root_hotplug", test_acpi_piix4_no_root_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/no_bridge_hotplug", test_acpi_piix4_no_bridge_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/off", test_acpi_piix4_no_acpi_pci_hotplug); - qtest_add_func("acpi/q35", test_acpi_q35_tcg); - qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); - qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); - qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi); - qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi); - qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_tcg_cphp); - qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp); - qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp); - qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp); - qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem); - qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem); - qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_tcg_nosmm); + qtest_add_func("acpi/q35", test_acpi_q35); + qtest_add_func("acpi/q35/bridge", test_acpi_q35_bridge); + qtest_add_func("acpi/q35/mmio64", test_acpi_q35_mmio64); + qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_ipmi); + qtest_add_func("acpi/q35/ipmi", test_acpi_q35_ipmi); + qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_cphp); + qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_cphp); + qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_memhp); + qtest_add_func("acpi/q35/memhp", test_acpi_q35_memhp); + qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_numamem); + qtest_add_func("acpi/q35/numamem", test_acpi_q35_numamem); + qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_nosmm); qtest_add_func("acpi/piix4/smm-compat", - test_acpi_piix4_tcg_smm_compat); + test_acpi_piix4_smm_compat); qtest_add_func("acpi/piix4/smm-compat-nosmm", - test_acpi_piix4_tcg_smm_compat_nosmm); - qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_tcg_nohpet); - qtest_add_func("acpi/q35/nosmm", test_acpi_q35_tcg_nosmm); + test_acpi_piix4_smm_compat_nosmm); + qtest_add_func("acpi/piix4/nohpet", test_acpi_piix4_nohpet); + qtest_add_func("acpi/q35/nosmm", test_acpi_q35_nosmm); qtest_add_func("acpi/q35/smm-compat", - test_acpi_q35_tcg_smm_compat); + test_acpi_q35_smm_compat); qtest_add_func("acpi/q35/smm-compat-nosmm", - test_acpi_q35_tcg_smm_compat_nosmm); - qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); - qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm); - qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); - qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hma= t); - qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat); - qtest_add_func("acpi/microvm", test_acpi_microvm_tcg); - qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); - qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); - qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_t= cg); + test_acpi_q35_smm_compat_nosmm); + qtest_add_func("acpi/q35/nohpet", test_acpi_q35_nohpet); + qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_dimm_pxm); + qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_dimm_pxm); + qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_acpi_hmat); + qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_acpi_hmat); + qtest_add_func("acpi/microvm", test_acpi_microvm); + qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb); + qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); + qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); if (strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076278; cv=none; d=zohomail.com; s=zohoarc; b=BfJRzCk+ibUwXC59C5ThMScK7/kTDBKEnHT49VT2G9qe9zlCK9sY2AD8V4d5LqnpjJu9+ibRndnsHeiIsdaV49cV8fu+yaYQmKX5lVKzMKo2p6gMbHt5P7H0qSb60jdS1PMHpXqIhJ/s/QkrlCtTfS4ddp09RF08UjHH0P1Z09M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076278; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=lmsGdAeXnbzcEUQtPxKNfenyqUfv4M7E039KtK+jd+o=; b=lKrhN9drCDBl1cRjN/dZXoK3+7PR+0UpTI/cHkITpHVpSwt7eKQkAb06YNJZaMAtynsFkjkSL6o2wEo/KY126SAzdseaRVXExqaXbogWanKNkNreRcAtl2BfnlvM60TGN4LeIOV7WRCEwRjH0C0BWuHnT4dMgaL4SIyrTUNInqI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076278143749.0473169668253; Mon, 3 May 2021 14:11:18 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-498-UsMKEHFsPZuGe9DQF1Iipw-1; Mon, 03 May 2021 17:11:14 -0400 Received: by mail-wr1-f72.google.com with SMTP id 4-20020adf80040000b029010cab735fdeso4646066wrk.14 for ; Mon, 03 May 2021 14:11:14 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076276; 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=VGNCJzh6F1SJQW4nF5yGnjbz6Y/2CoVelxrxVcbdi9UrbJJymsCUmukkfEgpUGhz6ulBsK 8KMFBVl8Xz1PQkKxSlWJ9hePq7ZjxQaUVLeAxk6YI5N9AfSu2Ao//MaJgBEuIsaaoYgOZM IKhv1Tpb6Ht78P1WNgAlDBqEuyx0vNo= X-MC-Unique: UsMKEHFsPZuGe9DQF1Iipw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lmsGdAeXnbzcEUQtPxKNfenyqUfv4M7E039KtK+jd+o=; b=rZvayUgQkoL1GBxRocNb7MMvf6IHE1o3q0/vSY2A7TX23AGWwIM+NU+yz+0LkrCsxi cDbv5f5I0JOu0+BUOzhoAKECMjqhlcHsrGXmpMphHO6oIwqIorYePcaorGGR/XDE6ljj NrEGBBUKIXvX+SBRO5bKolXUO1Sdf5sSfTIcUkwwg4s3RVSkr/DRvbwdaM/BHu1NDtIq iTOgmbp4v4b9mmFGt/+e92hFcwdJUy1yKhC9mn3wncN0HRinlNbotjl5++1gI5BTGwcH 84Wx++z5y8X/fwqtzY78aOSLDrcOJ+xXrlHfLZpd5iPUU/CWA7mltL/0UC5aZbAxSk3f MtXw== X-Gm-Message-State: AOAM530uBVD5r8T1Qg75kdNuXkONk+R7tKlNPaKRgAoJgL9oDPelIekV T1mu8pz1enkPwpfMVqwCYvVHpLTtHLEZceQw9gzDa6iNN8RMtS+ppZFfkoUKtCW8az/kzJyO6BL n3HjkYiRBtj2OAw== X-Received: by 2002:a05:6000:1a41:: with SMTP id t1mr27173538wry.265.1620076273828; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Some tests require TCG, but don't have '_tcg' in their name, while others do. Unify the test names by adding 'tcg' to the TCG specific tests. Reported-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ce498b3ff48..ad877baeb1b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1255,7 +1255,7 @@ static void test_acpi_microvm_rtc(void) free_test_data(&data); } =20 -static void test_acpi_microvm_pcie(void) +static void test_acpi_microvm_pcie_tcg(void) { test_data data; =20 @@ -1475,7 +1475,7 @@ static void test_acpi_oem_fields_microvm(void) g_free(args); } =20 -static void test_acpi_oem_fields_virt(void) +static void test_acpi_oem_fields_virt_tcg(void) { test_data data =3D { .machine =3D "virt", @@ -1555,14 +1555,14 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); if (strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie); + qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); } } else if (strcmp(arch, "aarch64") =3D=3D 0) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); - qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); + qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt_t= cg); } ret =3D g_test_run(); boot_sector_cleanup(disk); --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076291; cv=none; d=zohomail.com; s=zohoarc; b=bzwUFo6+wJoogQhgOMZjySyarFuTNZqD9aOZh9236JAY3IHaxslHuibWP/xMTMz8xA7QT44o8iLGRC0dSmlaCYizxtPN/nt+QRwR/9D5ULy2qaAYa6SxfXRvHht78ciE3k7werqTyPklq0Cs79qbpWqPFdI/kkhGDRJxiy+dkOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076291; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=55DSOQd/Ti/CUKuyk0Cp1QnVj2/mT8NrttR0T4lOw2k=; b=hb1rzViqQ8JV91nuJqo2lU0RCma6tSGXGS42mxD/w9ja7Bf6r2sy56NZgaAw7wquz8bZaoveK2OuZGaD+W+yd7uN4YHvjzBSvSwxyyHlcMO9pH5U8f8AhJDJsJEgeQ1XY2dDjGlXPHD69bFyEc4BHw78fFRxk5PIdZrOR93rr/I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 162007629146015.523745000297026; Mon, 3 May 2021 14:11:31 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-241-L_JbTu2xMWu5zjcWU5YXDw-1; Mon, 03 May 2021 17:11:19 -0400 Received: by mail-wr1-f69.google.com with SMTP id t5-20020adfb7c50000b029010dd0bb24cfso4007375wre.2 for ; Mon, 03 May 2021 14:11:19 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076290; 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=SuK/m+f3i4ullLCDceh72hqDiZYi6ND9LQtJQs0k4htliGgWQ1azVoFA6IHlVIvg/M+M+O wo1UKKJq6XaeWxPS4afxfqXDhgzFyyLKaP1nQFqCoUfFBUgejzDRPF4xxByXEYKbCqdGKo T8U1hNFOBK574nIQNgBD4b4CWobpmew= X-MC-Unique: L_JbTu2xMWu5zjcWU5YXDw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=55DSOQd/Ti/CUKuyk0Cp1QnVj2/mT8NrttR0T4lOw2k=; b=Oss54BBVPnnxPA51U8kvOX2gVSoBL4saYR7ztFt4rPxJ/ANAOIXyyqytApN1OFx8fE qV1DaHGbYTaIzSOpIdKsKI4YyTOl8r8lFXcoq7xyig2dzFNFZHOjDLJF1h8dVq6JOpL6 EMbjXP86EJ3N2XCutnZaz3+BNU6P3wTBufuwNKaKp/jQKhahKGK6NcAUB3zI4fJu1Hk9 5GDnmrjCX48EcXcDEJMt+PGzj2XKZc28A08Key8rJdnkSa5mmqJtv2Mw2dbrF5MBgPUX p3rQHm8jV93lAR/CGIEbC46trTZ3DuwRT8TCmkvPUORDxAvufDarp0VKKXJC+Iljb7xJ O3Vw== X-Gm-Message-State: AOAM5336UZ/+c+/ycMgIUuR5Xwz9RlmzwD+AflVXgUbzfbbSAEDbTWXk VcwMn29B69mxL4PbYMJ2+IGHUlQa2fQs3AODhl6NqvB9YdjCPERjANiXgTechJGpnDBQeQMoTYS e/PXJ3AzOO7m5+Q== X-Received: by 2002:a5d:590a:: with SMTP id v10mr27356366wrd.306.1620076278575; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Now than we can probe if the TCG accelerator is available at runtime with a QMP command, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by an assertion. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Eric Blake Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- v5 had: Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e 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; =20 +static bool tcg_accel_available; static char disk[] =3D "tests/acpi-test-disk-XXXXXX"; static const char *data_dir =3D "tests/data/acpi"; #ifdef CONFIG_IASL @@ -718,12 +719,7 @@ static void test_acpi_one(const char *params, test_dat= a *data) char *args; bool use_uefi =3D data->uefi_fl1 && data->uefi_fl2; =20 -#ifndef CONFIG_TCG - if (data->tcg_only) { - g_test_skip("TCG disabled, skipping ACPI tcg_only test"); - return; - } -#endif /* CONFIG_TCG */ + assert(!data->tcg_only || tcg_accel_available); =20 args =3D test_acpi_create_args(data, params, use_uefi); data->qts =3D qtest_init(args); @@ -1506,6 +1502,8 @@ int main(int argc, char *argv[]) =20 g_test_init(&argc, &argv, NULL); =20 + tcg_accel_available =3D qtest_has_accel("tcg"); + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { ret =3D boot_sector_init(disk); if (ret) { @@ -1554,10 +1552,10 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc); qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2); qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_mic= rovm); - if (strcmp(arch, "x86_64") =3D=3D 0) { + if (strcmp(arch, "x86_64") =3D=3D 0 && tcg_accel_available) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg= ); } - } else if (strcmp(arch, "aarch64") =3D=3D 0) { + } else if (strcmp(arch, "aarch64") =3D=3D 0 && tcg_accel_available) { qtest_add_func("acpi/virt", test_acpi_virt_tcg); qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); --=20 2.26.3 From nobody Sat Apr 27 02:58:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620076290; cv=none; d=zohomail.com; s=zohoarc; b=DIxD+H3FfQcip3lb5sKj2C0P/i8IEkvgYgBmPwWh5OuW7I7EbeXuV7gM+FJmEKA+0DYRRD81i9ILFqiCIifzfsq43ayarCQ1G3vUrQ8oZV8d6KtfvU6SHAeUXGJjK+pymMX0efMUrgFe4sxlxIRSwcH2aNW68chM2O/biBIahbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620076290; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=piFQVJLRgYVAQ8rwlcVYLrCWu2jTvSW2z8Zq+W/DVsE=; b=VsyaEAv5tN77P1qYcfZDkHWfB0lmQsISfTvFFMyx/DD0nGH8UUvv61EeivvWcZBdStHqBgk0ybeqV5qA0BkR52ufM2aAZomWnKV3kCVMaon2u6TkyYboOjHEiL6Pm+hghPeXrmTXjRAEC+fo95rdmC9GWx+SsodHaJIgNLZ4ycE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1620076290184895.855376353799; Mon, 3 May 2021 14:11:30 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-484-6vaC8OYYPX6LGnCNRxaQyA-1; Mon, 03 May 2021 17:11:24 -0400 Received: by mail-wr1-f72.google.com with SMTP id 93-20020adf93e60000b029010d9bb1923eso4666923wrp.4 for ; Mon, 03 May 2021 14:11:24 -0700 (PDT) Return-Path: Return-Path: 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076289; 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=aP28ymtEJHmrKQunt4Bx04szSr7/jRRf8UF5SMXles8W5I10ONTsKDak+Zq5JuJ2jUkbxP NMo8wcBgPwe7FOSDMn2U3vVdVsyJOnk5uAseO/PSvTYGK85ObOdZHf+MpnrhvbKvuBfe76 YdOx7uWJ/WrCCubbJMdnoUvnzZ3xHAs= X-MC-Unique: 6vaC8OYYPX6LGnCNRxaQyA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=piFQVJLRgYVAQ8rwlcVYLrCWu2jTvSW2z8Zq+W/DVsE=; b=S57n4UTZkXip0VRPE/f7Uo14+mbILOmvlHlcowZ8Bze0blxEkgY8Nunp9lNxs8IgRl 2KseRqmfUYEuxfBRWF7bV5FT5obRJAiY+fwaOKlM2KWyMJeKzRHa3Hr7y1u5eUxT4a+L waDt45k31r/WxK4jYfT2LJz50yiW+vvnDbvDuqQXHxpkytF1i59fDpmGHoaBPD1/E7Rr NKpRSce2lFylkjhrkvia3fFWX5I2fNor/+hSfalcbZYSCxE73aQOuHBoQpcDJsOId6QT qns/yhA/6QXhVNGWP0HH1PakBeXrl27xUFvGAil2ri/Z68rm4MAzVGcdL6sM3Tv+t1kQ 160Q== X-Gm-Message-State: AOAM5310vSIoFZxSV0GtVWH35Ixu3xZDjPY0kdR7GmHP4V8YaadRll5r C5jQqY71uUxOic96Pap8McZQnEl9Zpyn9rmKv9a2jFHjpikTWe9/Upr4oJtkz/iwiwuQTEeVyNQ 90WxPVRHx80vpvw== X-Received: by 2002:adf:f205:: with SMTP id p5mr18206952wro.170.1620076283621; 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Thomas Huth , Markus Armbruster , Eric Blake , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a77774 and directly run the bios-tables-test. Reviewed-by: Eric Blake Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- tests/qtest/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 0c767389217..46de073d155 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -175,14 +175,13 @@ 'boot-serial-test', 'hexloader-test'] =20 -# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-tes= t unconditional qtests_aarch64 =3D \ - (cpu !=3D 'arm' ? ['bios-tables-test'] : []) + = \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= test'] : []) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-= swtpm-test'] : []) + \ ['arm-cpu-features', 'numa-test', 'boot-serial-test', + 'bios-tables-test', 'xlnx-can-test', 'migration-test'] =20 --=20 2.26.3