From patchwork Fri Nov 12 11:47:32 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: 12616663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B9E2C433EF for ; Fri, 12 Nov 2021 11:47:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FDEB60E8F for ; Fri, 12 Nov 2021 11:47:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234737AbhKLLu2 (ORCPT ); Fri, 12 Nov 2021 06:50:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234656AbhKLLu2 (ORCPT ); Fri, 12 Nov 2021 06:50:28 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9B24C061766 for ; Fri, 12 Nov 2021 03:47:37 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so6544180wme.4 for ; Fri, 12 Nov 2021 03:47:37 -0800 (PST) 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=wIGpUqKKsdBHIVu7qLREHVQ4Ti/omu4NC8RNTDPGi9k=; b=vj2y4YrzQqksYHFE33XVZ3whLo3Chi4yrXCxl7Zy/f2tOEeUlTog/fLlj88qlAPiY8 uMM539hoRcocmCg108gpHECMDvof/LYSZNr/jPZ2vukiExcLgxs2z1RvXdozoRfbxORA 44VpQ2vS+n3E9P9a1JwLQHXdTjQm1/wNh+83ccPR1sVoT+GlM5snCCbJknbIgnXpzSit hmlm3R70Q+mA/3w6YI37GLKjB5LAGu2+wHggWgMJI+FWtNZO5xb3tv/u8+sDTEtF2XP4 Ak6acw2EJOQZeRiYPU06WMNZGHISBo6kbECUA045yPrf7jkVw3fXpxFWmIdwp9X9a1p3 6taA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wIGpUqKKsdBHIVu7qLREHVQ4Ti/omu4NC8RNTDPGi9k=; b=j/hxqRooeqsZ3eAWhrqdPSLHemEVAnDqKbJ/d8UrhG0bqhlPsD1z3A3XgbcS0aaL4a 1hTBca5DPuioSBAYZ3U12PmIvLfW6uv6VE2EswxWDHopOv7FpvR/H9rpZU1dNnli4Dtv NH+H0cjb4/l1lIVx9Nx9N1o8bz2kPOyQte6gNE8q0F3l7Ii9XrJrd5PsGXvfvVX+y02E UOuTY32K0nmoBlg4n2mQE4oU0d+EqbX5fhkQ+n7HUzDbtzTLh6/URWFAqBSvvKTZwu8K dGtAwevv4dJ8EaoEH9Pm0bRmHBODihCBBGCZF46uEvPDIiF4vczwo3puI3oghEqXEBek S3fA== X-Gm-Message-State: AOAM532WJimhhX5vkajLm48fH2Z65YlNJ4bOzR0QfrHQ+gem0w0a/mGj UYIfWfOmHU+pYS6rjEh1bgz0RQ== X-Google-Smtp-Source: ABdhPJyENsuVXPYwrdzvRDQJQgMZaKOk+plTsoN67GYhMD9w1WdUkbkFRgRwdFvp07nDvh+ZSFMfsw== X-Received: by 2002:a1c:2b04:: with SMTP id r4mr35189034wmr.48.1636717655778; Fri, 12 Nov 2021 03:47:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j40sm6114775wms.16.2021.11.12.03.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 03:47:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5F2261FF98; Fri, 12 Nov 2021 11:47:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: kvm@vger.kernel.org Cc: shashi.mallela@linaro.org, alexandru.elisei@arm.com, eric.auger@redhat.com, qemu-arm@nongnu.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@arm.com, maz@kernel.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [kvm-unit-tests PATCH v3 1/3] arm64: remove invalid check from its-trigger test Date: Fri, 12 Nov 2021 11:47:32 +0000 Message-Id: <20211112114734.3058678-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211112114734.3058678-1-alex.bennee@linaro.org> References: <20211112114734.3058678-1-alex.bennee@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org While an IRQ is not "guaranteed to be visible until an appropriate invalidation" it doesn't stop the actual implementation delivering it earlier if it wants to. This is the case for QEMU's TCG and as tests should only be checking architectural compliance this check is invalid. Signed-off-by: Alex Bennée Reviewed-by: Eric Auger Cc: Shashi Mallela Message-Id: <20210525172628.2088-2-alex.bennee@linaro.org> --- v3 - reflow the comment, drop "willingly do not call" as per Eric's suggestion --- arm/gic.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arm/gic.c b/arm/gic.c index 98135ef..1e3ea80 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -732,21 +732,17 @@ static void test_its_trigger(void) "dev2/eventid=20 does not trigger any LPI"); /* - * re-enable the LPI but willingly do not call invall - * so the change in config is not taken into account. - * The LPI should not hit + * re-enable the LPI. While "A change to the LPI configuration + * is not guaranteed to be visible until an appropriate + * invalidation operation has completed" hardware that doesn't + * implement caches may have delivered the event at any point + * after the enabling. Check the LPI has hit by the time the + * invall is done. */ gicv3_lpi_set_config(8195, LPI_PROP_DEFAULT); stats_reset(); cpumask_clear(&mask); its_send_int(dev2, 20); - wait_for_interrupts(&mask); - report(check_acked(&mask, -1, -1), - "dev2/eventid=20 still does not trigger any LPI"); - - /* Now call the invall and check the LPI hits */ - stats_reset(); - cpumask_clear(&mask); cpumask_set_cpu(3, &mask); its_send_invall(col3); wait_for_interrupts(&mask); From patchwork Fri Nov 12 11:47:33 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: 12616667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76A41C433EF for ; Fri, 12 Nov 2021 11:47:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63C4061039 for ; Fri, 12 Nov 2021 11:47:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234792AbhKLLuc (ORCPT ); Fri, 12 Nov 2021 06:50:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234754AbhKLLub (ORCPT ); Fri, 12 Nov 2021 06:50:31 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D2DC061766 for ; Fri, 12 Nov 2021 03:47:40 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id 67-20020a1c1946000000b0030d4c90fa87so6551542wmz.2 for ; Fri, 12 Nov 2021 03:47:40 -0800 (PST) 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=rJHCVCHL4U33PXMtgaMpIqvWP9Xc3PSo+Bd8gST00ts=; b=ekMdpRSWqlWSiVvgjeBT9YCV7iKV0LVPJ2/pvZ9fE1XNUmTdejv3hLY5TgCN2JeNmm RzFDxbABVIOcACSv0wagoMA+lSfGzkkDkkAN//LkyA56Ypv9xHW8vPC3hCOJYYyfV9eL QFBZn8oFKa/VYZpynM1yus3PggSbk0k8V0WPGs6Op3CMkIJSeNR+OBx/XOkDTqif+A78 vmk+j6Awz8fC3m7xjtRDPa+Wddv349oYxfbkFrfZrYAY3XTBPzqxQnZlAVtGHdGfbG5b TPZm7b/CebLhI7lxQygEeCptWT0KPezGCjvkJGWc4r2qaGd7S2/ffGCtLeu5yumunjj+ 0ozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rJHCVCHL4U33PXMtgaMpIqvWP9Xc3PSo+Bd8gST00ts=; b=CAlHM5kLVbT1i2Se7DqcYJHaFqOztLfBseee6v68miFS78hJZbnuFks9+xNpDudeSi 3QOR+U02qhk78hPgPDmpyupYsIGWVDaE7anj0adetI6on+pgp2/VfS4FkxzmCW4ybSzD MdxVSk0WrEX9WVdT/FA3yjh96DxnDN+8Mx/ze4WfZ95rWjLxgD0ZDWj0xlGR+jS8tUhg 1iPyyaHF7FJWZXms8FdjmGeTQZwBFoEtZCEF0/DLRZgRAt81cQYULplhvTcVyNid8+zo fj4pVqo8ZM/unB0IwXBx71lTHvyfCvyJRJwZ26KbI7tDEtS0gVAa4xEa84BRYlkDaOFN WXMA== X-Gm-Message-State: AOAM533Q86IhAQnib6IegttYfN+blMNu6dS0HMVoiYWYRAw1HxXegm9f aAfotvKzUrsYmC3CqZo+//JQJw== X-Google-Smtp-Source: ABdhPJycSrQXrI5ANFDX5SP4MV9P9LBxdBIXWlPbv0YqQTSfXy6gbpG8wLqr2Do/3gKPIUsWbTPCWw== X-Received: by 2002:a05:600c:221a:: with SMTP id z26mr34679356wml.20.1636717659036; Fri, 12 Nov 2021 03:47:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c11sm7674349wmq.27.2021.11.12.03.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 03:47:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 704FF1FF99; Fri, 12 Nov 2021 11:47:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: kvm@vger.kernel.org Cc: shashi.mallela@linaro.org, alexandru.elisei@arm.com, eric.auger@redhat.com, qemu-arm@nongnu.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@arm.com, maz@kernel.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Andrew Jones Subject: [kvm-unit-tests PATCH v3 2/3] arm64: enable its-migration tests for TCG Date: Fri, 12 Nov 2021 11:47:33 +0000 Message-Id: <20211112114734.3058678-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211112114734.3058678-1-alex.bennee@linaro.org> References: <20211112114734.3058678-1-alex.bennee@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org With the support for TCG emulated GIC we can also test these now. Signed-off-by: Alex Bennée Reviewed-by: Eric Auger Reviewed-by: Andrew Jones Cc: Shashi Mallela Message-Id: <20210525172628.2088-4-alex.bennee@linaro.org> --- v3 - add its-migrate-unmapped-collection --- arm/unittests.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index f776b66..21474b8 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -194,7 +194,6 @@ arch = arm64 [its-migration] file = gic.flat smp = $MAX_SMP -accel = kvm extra_params = -machine gic-version=3 -append 'its-migration' groups = its migration arch = arm64 @@ -202,7 +201,6 @@ arch = arm64 [its-pending-migration] file = gic.flat smp = $MAX_SMP -accel = kvm extra_params = -machine gic-version=3 -append 'its-pending-migration' groups = its migration arch = arm64 @@ -210,7 +208,6 @@ arch = arm64 [its-migrate-unmapped-collection] file = gic.flat smp = $MAX_SMP -accel = kvm extra_params = -machine gic-version=3 -append 'its-migrate-unmapped-collection' groups = its migration arch = arm64 From patchwork Fri Nov 12 11:47:34 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: 12616669 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 462CDC433F5 for ; Fri, 12 Nov 2021 11:47:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CC4061027 for ; Fri, 12 Nov 2021 11:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234811AbhKLLuc (ORCPT ); Fri, 12 Nov 2021 06:50:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234766AbhKLLub (ORCPT ); Fri, 12 Nov 2021 06:50:31 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF538C061767 for ; Fri, 12 Nov 2021 03:47:40 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso6701297wms.3 for ; Fri, 12 Nov 2021 03:47:40 -0800 (PST) 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=UBTLYu0ovf90Ly8jIucNjZn0s6JSXdArNLPowmPdXjc=; b=nKa9tSnccFVDYKK9xreBf5E8U8DoM82aZKRzyJaAiVfBKT/M0igcWjFSqwJRmAzyH3 /Ew5QtICgoZALTkGsvJY+v3rwwA/MyZWeZyHLaYJbIyRAaIlUtWtNmhwZVHMnU0M3Tim jDoFtQs3T5Su6YcUbiyDbdC2U0rnyn1ziDqio0DeO/bkjljkcIi/z8kuu2XxPvJr6JeG LMw1U+Nd5RbjSEU7wdVJiec+W5N8bwQvgzCd4chJG2TOKkvzbKqCNzW7x1PWbzx+7ljV VoIcbW9DobWIGLr0rOACJJoyz7zAcMxssMrTIMa1m9MbdhnzH+h6j5CjAJfpbr9wP9AO TLDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UBTLYu0ovf90Ly8jIucNjZn0s6JSXdArNLPowmPdXjc=; b=qK1wZSNH6+Lqx1sRVGACtnVS9GLEglVH4hb7y38YD6rjUcUVcfOyw4+d7Z3g1z2FO0 ccA7KlKrg5pHANkRSg5aHHUWcUx4r9cI8FSD2vagwZgVY8iCsqTVCNXbAA6o7dtyEHMs G0Gg/NSg5tRDSbm8+lEM1j9Q46gAUa8LRGO9lxqP52CUk706tssVJesxyF1hQswyrAuk qh2c+tlqHB1Fp/pcUFHtKj4+HZi3obbi2dSPw1Y1M1dzj2kMJXe0UBTItaDUpNCFfjCK 13ZgbpKt0Sx5PZAbRtrLjoiroCy9NDwKEa4VUULy7dfr7qe4a0iNz+C2VbJS7vtUDFH+ RusQ== X-Gm-Message-State: AOAM530hlRGKniXhNAqBhtHug3DrQnUa+i2I6c1L6Bn1okAKlby9rtBA O9dp+gRnFteFWJo4KNnpwQEpkA== X-Google-Smtp-Source: ABdhPJyX3niJmZryPUPfdglj9K551u5JXl+8T/X4Z4IMOgbZlZMCBWf27TVzU+y8SWuEhDAPHIgd9g== X-Received: by 2002:a05:600c:290b:: with SMTP id i11mr33816680wmd.137.1636717659462; Fri, 12 Nov 2021 03:47:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z7sm11185426wmi.33.2021.11.12.03.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 03:47:36 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8615C1FF9A; Fri, 12 Nov 2021 11:47:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: kvm@vger.kernel.org Cc: shashi.mallela@linaro.org, alexandru.elisei@arm.com, eric.auger@redhat.com, qemu-arm@nongnu.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@arm.com, maz@kernel.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [kvm-unit-tests PATCH v3 3/3] arch-run: do not process ERRATA when running under TCG Date: Fri, 12 Nov 2021 11:47:34 +0000 Message-Id: <20211112114734.3058678-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211112114734.3058678-1-alex.bennee@linaro.org> References: <20211112114734.3058678-1-alex.bennee@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org All the errata checking looks at the current host kernel version. For TCG runs this is entirely irrelevant as the host kernel has no impact on the behaviour of the guest. In fact we should set ERRATA_FORCE to ensure we run those tests as QEMU doesn't attempt to model non-confirming architectures. Signed-off-by: Alex Bennée --- scripts/arch-run.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 43da998..f1f4456 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -267,7 +267,9 @@ env_file () env_errata () { - if [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then + if [ "$ACCEL" = "tcg" ]; then + eval export "ERRATA_FORCE=y" + elif [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then echo "$ERRATATXT not found. (ERRATATXT=$ERRATATXT)" >&2 return 2 elif [ "$ERRATATXT" ]; then