From nobody Mon Feb 9 21:24:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1617273933; cv=none; d=zohomail.com; s=zohoarc; b=ivI4Iq9GLDLrU9O8vrd/aihh50b3RgtDhDRls68Umau16/aY3PQnPG0noZV1KwJtGvVKSBAZvRG4V3TCO4f6T9LJLfr/h2migrZJzVr+tbsgX6/oPls6Dg7nK54gwYIOsYDVc4tmeR1S7NWmIa7JvDHVl171YkjKHeKxmTGGZY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617273933; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JjlPaXyuxmJc78UBaRD26ugJ56+ZZ/y7y6+y5dorLqk=; b=XCKTw8+I1g1LXP1BeTZqccdircE7sasZjhMu9cGcLDAZ4SPdjGbbbbY1nfGtBI3Qyaj7XnCJCAkTsTfjeabjyZD3Zb7hRYk0fOA2eRzLhF3v3yAXgzkvP0POFy6YigaO9OOphluW7RAbj/P4CQuawcI9we/S96XbT51/4EbF1Xo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1617273933168289.25955983066956; Thu, 1 Apr 2021 03:45:33 -0700 (PDT) Received: from localhost ([::1]:60130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRupP-0003zi-AB for importer@patchew.org; Thu, 01 Apr 2021 06:45:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRulM-0007E1-RY for qemu-devel@nongnu.org; Thu, 01 Apr 2021 06:41:20 -0400 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:41506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRulK-0002RG-IA for qemu-devel@nongnu.org; Thu, 01 Apr 2021 06:41:20 -0400 Received: by mail-ot1-x332.google.com with SMTP id l12-20020a9d6a8c0000b0290238e0f9f0d8so1681811otq.8 for ; Thu, 01 Apr 2021 03:41:18 -0700 (PDT) Received: from localhost.localdomain ([147.75.106.138]) by smtp.gmail.com with ESMTPSA id a6sm1069066otq.79.2021.04.01.03.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 03:41:17 -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=JjlPaXyuxmJc78UBaRD26ugJ56+ZZ/y7y6+y5dorLqk=; b=vYCxZJgC9IYUahRmaA1hiotepZBdCe/oSE2KE5ADOywUfuk97sQdRFvGPI8sSh6TOP uPJjSnzNicVOqN0084yEIY3u7409qZ4v0UevAmVvjo1H9q5roEvkZTPVsvmvuDAOSVIq 7xzHwvQX9SSTVMq1cnlmM8o7XRSFwekvqtbMDZvN3TJC953Ny3gJCZm8I8F7RHvwVbbt 76VpQpRjoMnd4bhBVTKOjDuKZcZno+W/ZSD531u2tiyYvofepvB3KoVd7hjY3044O6yx cy5GjeOQLL5SQSuJAsk0gn6IWGTdm+RiFzlMlULJPFwakQajxzSm1NIv1fRK2wQutVhS dc6A== 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=JjlPaXyuxmJc78UBaRD26ugJ56+ZZ/y7y6+y5dorLqk=; b=oLUtSk/966exq01R8weQhH6XeuAouIy6DgEIuehGu5fToq09pmc0lRZiamDbAgqakm A+NAOKJZubJWlyq8vx9eWEwAlxVQZ4BqDUQz6wKAn8eAfRi/hsaSsUO4K8z4RbymHvu3 AQJTrc2RneD+Ts2NBx1qb+WnI8gTxH1UD+MeK2XWeaHRcI0K8WM4wGBCFjRYOvg10KLx w3OYBw4UIEJiYdIXzkAIzUI1od5bDnvPL6tedcubVNhnxhqdFYm8WSiMlGDnJDA+T6x5 LayMG25k3Pl1lBsKcwOxJr24hq9zctHMHwpy218H49/irkpFOfogxD8LHSK5Xz27svgH uG+w== X-Gm-Message-State: AOAM531dhxmx7PhYncCwV4N5KqywKepfqzCTqs/vMF7Dnx/mIunDDYQK kfS008Ca7w8BkWVYaaQ0f/2znozLagFwcFw= X-Google-Smtp-Source: ABdhPJyRwnoAmwu/DxgoSwZSZIUdcGbtPFTuEW6tVQxgrYhuzPi1yYLtANW9vn48cGO5alSYOHz81Q== X-Received: by 2002:a05:6830:401c:: with SMTP id h28mr5936899ots.347.1617273677386; Thu, 01 Apr 2021 03:41:17 -0700 (PDT) From: Haibo Xu To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Subject: [PATCH v2 6/6] target/arm: Add vCPU feature 'el2' test. Date: Thu, 1 Apr 2021 10:40:58 +0000 Message-Id: <50db1700b4df48acbecfda077b2220a0e3cf6b49.1617272690.git.haibo.xu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=haibo.xu@linaro.org; helo=mail-ot1-x332.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=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: peter.maydell@linaro.org, drjones@redhat.com, richard.henderson@linaro.org, abologna@redhat.com, Haibo Xu , philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Haibo Xu --- target/arm/monitor.c | 2 +- tests/qtest/arm-cpu-features.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/target/arm/monitor.c b/target/arm/monitor.c index 80c64fa355..6c39238925 100644 --- a/target/arm/monitor.c +++ b/target/arm/monitor.c @@ -90,7 +90,7 @@ QEMU_BUILD_BUG_ON(ARM_MAX_VQ > 16); * then the order that considers those dependencies must be used. */ static const char *cpu_model_advertised_features[] =3D { - "aarch64", "pmu", "sve", + "aarch64", "pmu", "sve", "el2", "sve128", "sve256", "sve384", "sve512", "sve640", "sve768", "sve896", "sve1024", "sve1152", "sve1280", "sve1408", "sve1536", "sve1664", "sve1792", "sve1920", "sve2048", diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 8252b85bb8..be07bf0c76 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -509,6 +509,7 @@ static void test_query_cpu_model_expansion_kvm(const vo= id *data) if (g_str_equal(qtest_get_arch(), "aarch64")) { bool kvm_supports_steal_time; bool kvm_supports_sve; + bool kvm_supports_el2; char max_name[8], name[8]; uint32_t max_vq, vq; uint64_t vls; @@ -533,10 +534,12 @@ static void test_query_cpu_model_expansion_kvm(const = void *data) */ assert_has_feature(qts, "host", "kvm-steal-time"); assert_has_feature(qts, "host", "sve"); + assert_has_feature(qts, "host", "el2"); =20 resp =3D do_query_no_props(qts, "host"); kvm_supports_steal_time =3D resp_get_feature(resp, "kvm-steal-time= "); kvm_supports_sve =3D resp_get_feature(resp, "sve"); + kvm_supports_el2 =3D resp_get_feature(resp, "el2"); vls =3D resp_get_sve_vls(resp); qobject_unref(resp); =20 @@ -602,11 +605,17 @@ static void test_query_cpu_model_expansion_kvm(const = void *data) } else { g_assert(vls =3D=3D 0); } + + if (kvm_supports_el2) { + assert_set_feature(qts, "host", "el2", false); + assert_set_feature(qts, "host", "el2", true); + } } else { assert_has_not_feature(qts, "host", "aarch64"); assert_has_not_feature(qts, "host", "pmu"); assert_has_not_feature(qts, "host", "sve"); assert_has_not_feature(qts, "host", "kvm-steal-time"); + assert_has_not_feature(qts, "host", "el2"); } =20 qtest_quit(qts); --=20 2.17.1