From patchwork Fri Jun 4 15:51:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 454059 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp538532jae; Fri, 4 Jun 2021 08:58:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAlVHVNU15yGRObRt1k6N0v9pZMyn19eElhG3GfgLOIPLmYCRDrNSEvGnwiV9l40QPzD4z X-Received: by 2002:a05:6102:f0b:: with SMTP id v11mr2568948vss.8.1622822281679; Fri, 04 Jun 2021 08:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622822281; cv=none; d=google.com; s=arc-20160816; b=tGymkY8GTCnimHgfJwa9r4VSw5/Y2W9/FtNp8YFf89hdjxZZF7zQoAa/pB9LiB114U lyQHhEtWZqigo/ubyNcd9Y+WbOejCk1w956dDlGIMOqhIRwQy0QTturbnqsR/+pu/pUV avPg01PZKrwzXzRLFLECReTNf4Z344vb2sVPX7pLJ99WsHSQdtscZTXJEE54AF90T8rW GzqBf/U5xxcaMgd7p+FwT598Ms4PKPftt3mBxnkMQ0feCs1+zScsRD4VE3WQYd5CWr16 4CZhCXxpXOM+Zqys0uxW/HG78pH6h0buZMl7N6jCa5Vs1EZp6iCR9xwxTSxLHd1SObp/ IyEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WOuysOnef2mMKklKTFeIYkHV2AEtzMpA+XWnC2+7giM=; b=uANT1OvILPZK9aiNi+Pggier1m5vcgmC/7s5fZBN8QUUFnL2EDNQLPxEzHYAB3yeKG eFLMKlpZL+Gz70wHoTaLpos5gOaFbnK2Tqkwv4zl9Bf27QpCQCHcrU11Me7xdIvp2FI8 iZM7oQ4w8hdwEuoPPlatt+2faSKE0qlNPvKSxLiOgniyh5iIwLNrBdugAdj1Rx9F5SMK XM5jp95kXcBWyh5hzyZXkjkCYCY8cCpEj4gAyGWALIwbUQ/PVVPZvm526KeAiMGgFb5s H+SbFiltrAym1bh/vOI6QeVKk4sxZEo262f39JRrjtQuz6blnN4w/cOhQ+t478PM+hrq X4Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lf4rpAtd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q1si3315753vsh.348.2021.06.04.08.58.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Jun 2021 08:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lf4rpAtd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpCCv-0006rQ-2l for patch@linaro.org; Fri, 04 Jun 2021 11:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpC8W-0002dc-EI for qemu-devel@nongnu.org; Fri, 04 Jun 2021 11:53:28 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpC8S-0008SH-He for qemu-devel@nongnu.org; Fri, 04 Jun 2021 11:53:28 -0400 Received: by mail-wr1-x432.google.com with SMTP id c9so1114018wrt.5 for ; Fri, 04 Jun 2021 08:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WOuysOnef2mMKklKTFeIYkHV2AEtzMpA+XWnC2+7giM=; b=lf4rpAtdDhOuo89nFjvu+c5ZRPeDbZIxLSiUlimSH2V32i6d08AWPx6bdZ00+CBKxV p4Nr1NEF1OSrlDSwFWItTQHgmoh9Hpw5fHeiTV5sjLu/hbL3cFCmgZVoelB8JvBv8F9S LoJwhA+6s7djrxFZ+xbL7Qs2wBw7Zqf48rh16OzH9lrcC4uSOaDYPw5K0blRpS3htudg 6+wTPB6i5NisBGF4xd67zWWRkWAHOZmn4uxIR78F4F2GBY5LaIw5hDedTN0uiHeoCAl0 GKyoDemr3Q8R1KJWSNN6N2uutckvOyxxDC2OnJ7MKpoKGHDGd5WpNpteii8V0GE2Vztq AsVA== 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=WOuysOnef2mMKklKTFeIYkHV2AEtzMpA+XWnC2+7giM=; b=DMT4ZyIoNPyZoX4EnlDRTx+wdfYHxm292riAM5q+4sgNk6FOp8aiGIICB+aQOSfT2E VkhdklO6n2VjZ+++4GenwdiqrsuI+PcKVxOwu618TjJDxa1o9eZMg9LTmILpNBzVduzH c1IRIJhq2YR8YyQI689o77UuZSKQ1IZVXGLI2jjaqS5yxUS2fpHE3qsIWhdN3E4bjiSz lD+CJCrfj5SAgu7zzml4Xddqdrd2HRtYzTH4T4o3tt9yYOBxW85ySyUhyST6XLho7qh5 QgBuplp60sOwK9nMyfLN+6NYR/4I1MhbvfxKCyjN/EBh5EMyzGL+9C2mOszogRb7oEex gIJA== X-Gm-Message-State: AOAM531byPFsc+oPTNS4mmySORWEIQBiBhi2Oppiohp3/D5AyMbPA4R+ baV1u247TxjwKQuCHnUB/GwQ0g== X-Received: by 2002:a5d:6109:: with SMTP id v9mr4712052wrt.0.1622822002504; Fri, 04 Jun 2021 08:53:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h9sm1793301wmm.33.2021.06.04.08.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:53:17 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 05F101FF93; Fri, 4 Jun 2021 16:53:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v16 07/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for TCG Date: Fri, 4 Jun 2021 16:51:40 +0100 Message-Id: <20210604155312.15902-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210604155312.15902-1-alex.bennee@linaro.org> References: <20210604155312.15902-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Now than we can probe if the TCG accelerator is available at runtime with a QMP command, only run these tests if TCG is built into the QEMU binary. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210505125806.1263441-8-philmd@redhat.com> --- tests/qtest/arm-cpu-features.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index b1d406542f..0d9145dd16 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -20,7 +20,7 @@ */ #define SVE_MAX_VQ 16 -#define MACHINE "-machine virt,gic-version=max -accel tcg " +#define MACHINE_TCG "-machine virt,gic-version=max -accel tcg " #define MACHINE_KVM "-machine virt,gic-version=max -accel kvm " #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \ " 'arguments': { 'type': 'full', " @@ -337,7 +337,7 @@ static void sve_tests_sve_max_vq_8(const void *data) { QTestState *qts; - qts = qtest_init(MACHINE "-cpu max,sve-max-vq=8"); + qts = qtest_init(MACHINE_TCG "-cpu max,sve-max-vq=8"); assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL); @@ -372,7 +372,7 @@ static void sve_tests_sve_off(const void *data) { QTestState *qts; - qts = qtest_init(MACHINE "-cpu max,sve=off"); + qts = qtest_init(MACHINE_TCG "-cpu max,sve=off"); /* SVE is off, so the map should be empty. */ assert_sve_vls(qts, "max", 0, NULL); @@ -428,7 +428,7 @@ static void test_query_cpu_model_expansion(const void *data) { QTestState *qts; - qts = qtest_init(MACHINE "-cpu max"); + qts = qtest_init(MACHINE_TCG "-cpu max"); /* Test common query-cpu-model-expansion input validation */ assert_type_full(qts); @@ -593,8 +593,10 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - qtest_add_data_func("/arm/query-cpu-model-expansion", - NULL, test_query_cpu_model_expansion); + if (qtest_has_accel("tcg")) { + qtest_add_data_func("/arm/query-cpu-model-expansion", + NULL, test_query_cpu_model_expansion); + } /* * For now we only run KVM specific tests with AArch64 QEMU in @@ -608,7 +610,7 @@ int main(int argc, char **argv) NULL, sve_tests_sve_off_kvm); } - if (g_str_equal(qtest_get_arch(), "aarch64")) { + if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("tcg")) { qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq-8", NULL, sve_tests_sve_max_vq_8); qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off",