From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E83EC433DB for ; Fri, 5 Feb 2021 16:05:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8ECA264E4E for ; Fri, 5 Feb 2021 16:05:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ECA264E4E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l83bR-0001Aj-Dc for qemu-devel@archiver.kernel.org; Fri, 05 Feb 2021 11:05:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l83Zk-0007oD-2n; Fri, 05 Feb 2021 11:03:16 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:39765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l83Zh-0003cM-QE; Fri, 05 Feb 2021 11:03:15 -0500 Received: by mail-ed1-x52a.google.com with SMTP id y8so9359020ede.6; Fri, 05 Feb 2021 08:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JXIKh7KHCoB6EbmcmZ8xMuwNrNXc+Wrpk2ClWIuaPnQ=; b=ogi4KXj32IRjLCpRu8NUsheECmN4Ptps7CJ8A6mrBULUKDGKa2i7o8TkyOosDERwsd 4v507YBGOZI9X9OAjXClgQS+K03WQAEcsiflxV9DgrOIrrRXtlnGz3VMrH4/d9q0FN0L ENNTMhXI45WYFRwpRNQd0encBxGzNk4044V5k1/WrQ+/6UwoqSI317vnMmyW9ltpL8nK jELWFcT29bU3VO0DsCB4amVghRjlekyKoOAvOP5yTeOofNwenqM/ZJjtc8gYP3ud2/vF f8DZK5N5nda9FB0BQZZgCn+qN+m4VjYUQnk4lRACg0MvtkiSiuWARiO3LxBtKJR11f2+ 09Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JXIKh7KHCoB6EbmcmZ8xMuwNrNXc+Wrpk2ClWIuaPnQ=; b=If5b5Vptu6qxlXBcj2xySB/4+JsK9lxyu+1CHo0e/wwD5/6yWl6ZMHCSoAIzrdsyQH DvIuqBO9Xlc5yD+npI+YQlPkO3tT1E61xs7UYGNulDfE7noEQkUUZQTxUl+YnB7Y2hRB /xRRsqRrZUNWKoieqaEQ16BGZ6Y21D/++3rw53Hs0qeH4ZTX3xFf8J/+AvmPDGjrpofy Y2GgK32MP03Xdke2gHxqYLp9j2r+FUJMwFizAMPRyccR6fGrmK0Ctb15Y9AnWIRiqpby MvvgPIWy/oMRM5haQv0gie6zzoQ3VcNyNt1KoNiif5Qa4EaUnlp6UkWNckkTo5iaj8y5 reVQ== X-Gm-Message-State: AOAM531Ju+ue1sf5lmo6ttseBqKX1PlMcaVNYp97YrG36V+J5UgYGzuW Ld9kHiKfK4+QiEwpeFK8150= X-Google-Smtp-Source: ABdhPJw6c52VW/vRaeg6xoZ7LNw+nCAJKhIbR7T9lx7IErCIPbyUiJ0Jvnfpm9yxRdeFo0EsgRCfBw== X-Received: by 2002:a05:6402:110b:: with SMTP id u11mr4229839edv.57.1612540991330; Fri, 05 Feb 2021 08:03:11 -0800 (PST) Received: from [192.168.1.36] (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id w8sm4077066edd.39.2021.02.05.08.03.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Feb 2021 08:03:10 -0800 (PST) Subject: Re: [PATCH 1/9] tests/qtest/arm-cpu-features: Remove Cortex-A15 check To: Andrew Jones References: <20210205144345.2068758-1-f4bug@amsat.org> <20210205144345.2068758-2-f4bug@amsat.org> <20210205145938.dvjk7jsfatgm56cy@kamzik.brq.redhat.com> <83662416-8eb6-eab9-fe90-c70daad29e44@amsat.org> <20210205153357.q73y2xo6oazheyma@kamzik.brq.redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <7173ad26-fc28-171e-b159-4b777fbaeb3a@amsat.org> Date: Fri, 5 Feb 2021 17:03:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210205153357.q73y2xo6oazheyma@kamzik.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.33, 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 , Thomas Huth , qemu-block@nongnu.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , John Snow Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 2/5/21 4:33 PM, Andrew Jones wrote: > On Fri, Feb 05, 2021 at 04:15:45PM +0100, Philippe Mathieu-Daudé wrote: >> Hi Drew, >> >> On 2/5/21 3:59 PM, Andrew Jones wrote: >>> On Fri, Feb 05, 2021 at 03:43:37PM +0100, Philippe Mathieu-Daudé wrote: >>>> Support for ARMv7 has been dropped in commit 82bf7ae84ce >>>> ("target/arm: Remove KVM support for 32-bit Arm hosts"), >>>> no need to check for Cortex A15 host cpu anymore. >>>> >>>> Signed-off-by: Philippe Mathieu-Daudé >>>> --- >>>> tests/qtest/arm-cpu-features.c | 4 ---- >>>> 1 file changed, 4 deletions(-) >>>> >>>> diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c >>>> index 8252b85bb85..c59c3cb002b 100644 >>>> --- a/tests/qtest/arm-cpu-features.c >>>> +++ b/tests/qtest/arm-cpu-features.c >>>> @@ -515,10 +515,6 @@ static void test_query_cpu_model_expansion_kvm(const void *data) >>>> QDict *resp; >>>> char *error; >>>> >>>> - assert_error(qts, "cortex-a15", >>>> - "We cannot guarantee the CPU type 'cortex-a15' works " >>>> - "with KVM on this host", NULL); >>>> - >>> >>> This isn't testing anything regarding 32-bit KVM host support. It's >>> testing that an error is returned when a given cpu type that can't >>> be known to work with KVM is used. We know that the cortex-a15 can't >>> be known to work. If we were to use a 64-bit cpu type here then there's >>> a chance that it would work, failing the test that an error be returned. >> >> This was my first understanding, but then why does it fail? >> >> PASS 1 qtest-aarch64/arm-cpu-features /aarch64/arm/query-cpu-model-expansion >> ** >> ERROR:../../tests/qtest/arm-cpu-features.c:543:test_query_cpu_model_expansion_kvm: >> assertion failed: (g_str_equal(_error, "We cannot guarantee the CPU type >> 'cortex-a15' works " "with KVM on this host")) >> ERROR qtest-aarch64/arm-cpu-features - Bail out! >> ERROR:../../tests/qtest/arm-cpu-features.c:543:test_query_cpu_model_expansion_kvm: >> assertion failed: (g_str_equal(_error, "We cannot guarantee the CPU type >> 'cortex-a15' works " "with KVM on this host")) >> make: *** [Makefile.mtest:905: run-test-111] Error 1 >> >> FWIW when tracing (cavium thunderX1 host, dmesg reports 0x431f0a11): >> kvm_vcpu_ioctl cpu_index 0, type 0x4020aeae, arg 0xffff9b7f9b18 > > Hmm... I don't know. It works for me > > $ QTEST_QEMU_BINARY=./qemu-system-aarch64 ./tests/qtest/arm-cpu-features > /aarch64/arm/query-cpu-model-expansion: OK > /aarch64/arm/kvm/query-cpu-model-expansion: OK > /aarch64/arm/kvm/query-cpu-model-expansion/sve-off: OK > /aarch64/arm/max/query-cpu-model-expansion/sve-max-vq-8: OK > /aarch64/arm/max/query-cpu-model-expansion/sve-off: OK Thanks, that helped. I ran my tests including the "Restrict v7A TCG cpus to TCG accel" patch which removes the A15 in KVM-only build: https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg08051.html So when TCG is disabled, So I get: { "execute": "query-cpu-model-expansion", 'arguments': { 'type': 'full', 'model': { 'name': 'cortex-a15' }}} { "error": { "class": "GenericError", "desc": "The CPU type 'cortex-a15' is not a recognized ARM CPU type" } } which fails the g_str_equal(). BTW is there some easy way to dump QMP traffic on stdio? > > $ lscpu > Architecture: aarch64 > Byte Order: Little Endian > CPU(s): 48 > On-line CPU(s) list: 0-47 > Thread(s) per core: 1 > Core(s) per cluster: 16 > Socket(s): - > Cluster(s): 3 > NUMA node(s): 1 > Vendor ID: Cavium > Model: 1 > Model name: ThunderX 88XX > Stepping: 0x1 > BogoMIPS: 200.00 > NUMA node0 CPU(s): 0-47 > Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid > >> >>> >>>> assert_has_feature_enabled(qts, "host", "aarch64"); >>>> >>>> /* Enabling and disabling pmu should always work. */ >>>> -- >>>> 2.26.2 >>>> >>>> >>> >>> This file could use a cleanup patch regarding the dropping of 32-bit KVM >>> support though. At least the comment in main(), "For now we only run KVM >>> specific tests..." could be reworded. It was written that way when we >>> planned to try testing on 32-bit KVM too eventually, but we never did, >>> and now we'll never need to. >>> >>> Thanks, >>> drew >>> >>> >> > >