From patchwork Mon May 3 21:10:08 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: 1473394 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=geZVtFEJ; 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 4FYwct5RLjz9sRR for ; Tue, 4 May 2021 07:11:09 +1000 (AEST) Received: from localhost ([::1]:54010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldfqL-00042A-Vo for incoming@patchwork.ozlabs.org; Mon, 03 May 2021 17:11:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpn-000423-4o for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldfpj-0006wF-G2 for qemu-devel@nongnu.org; Mon, 03 May 2021 17:10:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620076225; 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; bh=yBNvLap5splJAxV0QEUjCt3fls2sthGPdPVgUUJO1pI=; b=geZVtFEJTRzVD/QJ1Vcqe5LKN0qOUGOQS2Nokx8w5uFqGOWocx5RGg/Q82/umDEDvPKdO8 b5InoMmjIXx0sOx6bZ6zSoeSTkhJdUn5pKQUUlwGvvJqRzp4KXTKn43NTXcNDcyi7rbMq9 RqmQAUe56+cqGnISe+OQu8bVpe6N2w4= 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-1-eowZ9vZZNQycD99VmM5b8g-1; Mon, 03 May 2021 17:10:23 -0400 X-MC-Unique: eowZ9vZZNQycD99VmM5b8g-1 Received: by mail-wr1-f72.google.com with SMTP id u5-20020adf9e050000b029010df603f280so1703734wre.18 for ; Mon, 03 May 2021 14:10:23 -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:mime-version :content-transfer-encoding; bh=FX/mz33ofqLMlnwi26yzrmbZkIwbTRnUOB1k7gHb+Yw=; b=g9nLYGvZ4h/2J3HKPGcqkx2pfeOKKcABa5umK1QVr3VGQN+2+QdlfTplsJ35UR7Cal CbD+O+7vNXYlBhwM391MPjWlTn8N4SPYadjV/VVV8feaV2IczXvWz895ub41x1qswplX gvVMMzp9LU/AK6O1KlTby7JDpPu9AXTprlPdqhdqthaWoMBJHb+iymnLNA8bxO1mlBnx BbxGb+qVq1jkmdAei7i49d3eTknDr+KAJGBb6m5KDulZlO23g3zzWpMqM9ABXLcd1X+a QHuxJQyUGs6IWKuP+MEEChgJzIO/LjnZ55lPrUM2HGQCOjTOhlfmdlmQJG+cqSAzGUXx eqdQ== X-Gm-Message-State: AOAM53019i5QOqUI3SDyIIiQVXDY2PD+m5u3r+OUqUNikni/vWoLxwQt 5FW7js1oQqAclaNxaV/zGUBxrZFxcnzvwr7d72mN3HcuWmIUTIT6dIveL+2za6EozQJHRz1gYG9 Rd+NI6Z3V0Uxu2ry5viTekq1PSwyhG7dgcfHBqi5R20dy2TcmMp43QIgGd6xFcmoO X-Received: by 2002:adf:ebcc:: with SMTP id v12mr27778596wrn.389.1620076222530; Mon, 03 May 2021 14:10:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJHpv0fv5yxF+/62tk2AEBCRdhpgj6WG6pCUuIuqTfPLtMPRAASRFIqMMdF2aiTYAorDnpmg== X-Received: by 2002:adf:ebcc:: with SMTP id v12mr27778568wrn.389.1620076222257; Mon, 03 May 2021 14:10:22 -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 k15sm13913892wro.87.2021.05.03.14.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:10:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v6 00/12] qtests: Check accelerator available at runtime via QMP 'query-accels' Date: Mon, 3 May 2021 23:10:08 +0200 Message-Id: <20210503211020.894589-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 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" Missing review: 10-12 (bios-tables-test) Hi, This series aims at having accelerator-independent qtests by querying a QEMU instance at runtime to check the list of built-in accelerators. First we add the 'query-accels' QMP command, then we add the qtest_has_accel() method to libqtest, finally we use this new method to allow running bios-tables-test on KVM-only builds. Since v5: - Rename bios-tables tests (Igor) - Do not restrict bios-tables tests to TCG (Igor) - Reset bios-tables-test R-b tags Since v4: - Removed patch 10 (Markus, patch justification not clear) 'qtest/qmp-cmd-test: Make test build-independent from accelerator' - Removed patch 12 (Alex, icount / record/replay issue) 'tests/meson: Only build softfloat objects if TCG is selected (again)' - Sorted @Accelerator QAPI enum (Eric) - Added R-b/T-b Since v3: - Added Markus review comments - Added R-b/A-b tags Since v2: - Addressed Markus & Drew review comments - Added qtest/migration-test patch Since v1: - Addressed Eric & Paolo review comments Since v0: - kept over-engineered union (I don't how to do simple enum) - dropped arm-cpu-features patches for now - fixed typos (Eric) - rename qtest_has_accel (Thomas) - probe accel with machine none previous qtest (Paolo) - iterate over QAPI enum (Markus) Eric's suggestion of conditional QAPI didn't worked out, as accelerator definitions are poisoned. Phil. Philippe Mathieu-Daudé (12): MAINTAINERS: Add qtest/arm-cpu-features.c to ARM TCG CPUs section accel: Introduce 'query-accels' QMP command qtest: Add qtest_has_accel() method qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM qtest/arm-cpu-features: Restrict sve_tests_sve_off_kvm test to KVM qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64 qtest/bios-tables-test: Rename tests not TCG specific qtest/bios-tables-test: Rename TCG specific tests qtest/bios-tables-test: Make test build-independent from accelerator qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore qapi/machine.json | 47 ++++++++++ tests/qtest/libqos/libqtest.h | 8 ++ accel/accel-qmp.c | 49 +++++++++++ tests/qtest/arm-cpu-features.c | 55 ++++-------- tests/qtest/bios-tables-test.c | 156 ++++++++++++++++----------------- tests/qtest/libqtest.c | 29 ++++++ tests/qtest/migration-test.c | 4 +- MAINTAINERS | 1 + accel/meson.build | 2 +- tests/qtest/meson.build | 3 +- 10 files changed, 232 insertions(+), 122 deletions(-) create mode 100644 accel/accel-qmp.c Reviewed-by: Michael S. Tsirkin