[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/2] qtests/arm: add some mte tests
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v4 2/2] qtests/arm: add some mte tests |
Date: |
Thu, 26 Jan 2023 11:57:50 +0100 |
User-agent: |
Notmuch/0.37 (https://notmuchmail.org) |
On Mon, Jan 23 2023, Eric Auger <eauger@redhat.com> wrote:
> Hi Connie,
> On 1/11/23 17:13, Cornelia Huck wrote:
>> Acked-by: Thomas Huth <thuth@redhat.com>
>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> Maybe add some extra information about what tests are run. Also you
> could add an example of test invocation so that any people interested in
> can easily run those new tests?
Hm, it's just a part of the normal, standard qtests -- not sure what I
should add there?
>
>> ---
>> tests/qtest/arm-cpu-features.c | 76 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 76 insertions(+)
(...)
>> +static void mte_tests_default(QTestState *qts, const char *cpu_type)
>> +{
>> + assert_has_feature(qts, cpu_type, "mte");
>> +
>> + /*
>> + * Without tag memory, mte will be off under tcg.
>> + * Explicitly enabling it yields an error.
>> + */
>> + assert_has_feature(qts, cpu_type, "mte");
> called twice
Ok, that's probably some kind of rebase artifact.
>> +
>> + assert_set_feature_str(qts, "max", "mte", "off", "{ 'mte': 'off' }");
>> + assert_error(qts, cpu_type, "mte=on requires tag memory",
>> + "{ 'mte': 'on' }");
> nit. with pauth_tests_default form: cannot enable mte without tag memory
Not sure what you mean here?
>> +}
>> +
>> static void test_query_cpu_model_expansion(const void *data)
>> {
>> QTestState *qts;
>> @@ -473,6 +539,7 @@ static void test_query_cpu_model_expansion(const void
>> *data)
>>
>> sve_tests_default(qts, "max");
>> pauth_tests_default(qts, "max");
>> + mte_tests_default(qts, "max");
>>
>> /* Test that features that depend on KVM generate errors without. */
>> assert_error(qts, "max",
>> @@ -516,6 +583,13 @@ static void test_query_cpu_model_expansion_kvm(const
>> void *data)
>> assert_set_feature(qts, "host", "pmu", false);
>> assert_set_feature(qts, "host", "pmu", true);
>>
>> + /*
>> + * Unfortunately, there's no easy way to test whether this instance
>> + * of KVM supports MTE. So we can only assert that the feature
>> + * is present, but not whether it can be toggled.
>> + */
>> + assert_has_feature(qts, "host", "mte");
> why isn't it possible to implement something like
> kvm_supports_steal_time = resp_get_feature(resp, "kvm-steal-time");
> Could you elaborate?
I really should have written that down in detail, but I _think_ that's
because of OnOffAuto... if the prop is not set explicitly, we don't know
what is supported. Unless someone has an idea how to work around that?
Re: [PATCH v4 1/2] arm/kvm: add support for MTE, Richard Henderson, 2023/01/17
Re: [PATCH v4 1/2] arm/kvm: add support for MTE, Eric Auger, 2023/01/23
[PATCH v4 2/2] qtests/arm: add some mte tests, Cornelia Huck, 2023/01/11