From patchwork Tue May 25 17:26:28 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: 12279711 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 70154C2B9F8 for ; Tue, 25 May 2021 17:30:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3C12D61059 for ; Tue, 25 May 2021 17:30:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C12D61059 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ugd3cntAcwJfVnjO+ic5MxdRJW9R7y76S71HJQcOoSQ=; b=i/AymIXLF9eOj/ WdfXsfv0plyVyy/sg14OIOZ146o8aERfnM+hFtP/46NL+zrtmQQgI0uP0z+hSE3t3w0f06jgjOUs7 j7o1tgvWNSvDVyhPvbYk2Ivecw9PZboiGN7+C3NSy2qD2wxmr++4LZ3so1D7qD9JXNYssA4M1hEmi uLDCGSMb2YaCCuz5RnpARIKXoctEJjOJEH9L6lpWs0EWPSm59WbTWQy7MeCn0SId4vh8vEa/Ecmsy FnPmnUNMeJX0edMhll3bt1I3ZD7AN3Kuh2Wffhnj/Mc8mX9tlusVsatxcAn/UTCY7MN4da4u3H7Ev 8svHuJv9ZbWxe8aPYhzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llaqz-006s6I-CK; Tue, 25 May 2021 17:28:29 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llap9-006rBz-Pp for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 17:26:37 +0000 Received: by mail-wm1-x32f.google.com with SMTP id z130so17196615wmg.2 for ; Tue, 25 May 2021 10:26:35 -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=8vhxbSb0kOGC8+nQM9S+UwSASWSZTJvJYDcePLw1qik=; b=DvkmYHVn3HaRgZzPceU2GhR2wTdg+bNlZ8zWdNizKPR5jm/SkWQSY1j8trE6BlsdDQ OBsU5vB5YZDLMDteDH80B5XFp14rtd//uQrxUV8pD6J3FPQv2ruiqlq+m/ySrzTYNCK4 v3XUJkSWiUQikJioCoUPTH58TJV4co8CCV/V/n7xbCMLd611nyRR6FWkN01WytKVXR61 waIDp54ysmCOksR1TNsGmp2n2Td+0vL+VhAq+LSI0Jt8Kfi2ysCW3/B0yIzF62CS/0wh eKc6SeUh8Lv+brC/Ubivypvjpu0AKAYIeSqmmI9wJw2o8iFdKTKoo1K3rwu3lVoRVp2k GyZg== 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=8vhxbSb0kOGC8+nQM9S+UwSASWSZTJvJYDcePLw1qik=; b=HaSui8c5ZRgeFCx4eskd8iJQBrvrW4taX/BGNDx3LkbvTVe8FTDRxEiWIzUyo1IJlG EA6IinrPhgYsUMf81w8u5TwhHHyP0puyppinlWfHcA+bBClAmp6ixMl9aQLZxUJWTLvw N1MiEv9INF8v6aDWS3AXArOIKxk3K0BtiZfSf+f6y9vqL2fSNquqjmiLWXlrNW4PAWDZ 4SDv2ESTxy1FowTOLIm6JDxJGmsUrThwgXp5iZbIdMwXiX3iUtNUp996Paottk5RrNhG KRuERd1LeH0ZyN0ElOOl8ZCfRDuqEH2DpuTEiE5iJPMpU+/SOzYt1NDnypIkZvKkyEl7 WOjA== X-Gm-Message-State: AOAM532ILqu7Z1mIZf3nxYZimp2CfQfx1ByQpERS8McQrI6mwIK64t4i C0pFCHnybUAvSZdN7D2gkdkD1A== X-Google-Smtp-Source: ABdhPJwJcS6ubLrQtKSjUB+dF+9hCxd+Me0VaOsHNU0DUOoeSkOw+4jNx+Dkf/HE7m6wlUQVP4fjaw== X-Received: by 2002:a7b:c849:: with SMTP id c9mr4950802wml.84.1621963594304; Tue, 25 May 2021 10:26:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k132sm3533580wma.34.2021.05.25.10.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:26:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A4E181FF90; Tue, 25 May 2021 18:26:28 +0100 (BST) 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 v2 4/4] arm64: split its-migrate-unmapped-collection into KVM and TCG variants Date: Tue, 25 May 2021 18:26:28 +0100 Message-Id: <20210525172628.2088-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210525172628.2088-1-alex.bennee@linaro.org> References: <20210525172628.2088-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_102635_863979_2A783DD1 X-CRM114-Status: GOOD ( 15.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When running the test in TCG we are basically running on bare metal so don't rely on having a particular kernel errata applied. You might wonder why we handle this with a totally new test name instead of adjusting the append to take an extra parameter? Well the run_migration shell script uses eval "$@" which unwraps the -append leading to any second parameter being split and leaving QEMU very confused and the test hanging. This seemed simpler than re-writing all the test running logic in something sane ;-) Signed-off-by: Alex Bennée Cc: Shashi Mallela Reviewed-by: Eric Auger --- arm/gic.c | 8 +++++++- arm/unittests.cfg | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arm/gic.c b/arm/gic.c index bef061a..0fce2a4 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -36,6 +36,7 @@ static struct gic *gic; static int acked[NR_CPUS], spurious[NR_CPUS]; static int irq_sender[NR_CPUS], irq_number[NR_CPUS]; static cpumask_t ready; +static bool under_tcg; static void nr_cpu_check(int nr) { @@ -834,7 +835,7 @@ static void test_migrate_unmapped_collection(void) goto do_migrate; } - if (!errata(ERRATA_UNMAPPED_COLLECTIONS)) { + if (!errata(ERRATA_UNMAPPED_COLLECTIONS) && !under_tcg) { report_skip("Skipping test, as this test hangs without the fix. " "Set %s=y to enable.", ERRATA_UNMAPPED_COLLECTIONS); test_skipped = true; @@ -1005,6 +1006,11 @@ int main(int argc, char **argv) report_prefix_push(argv[1]); test_migrate_unmapped_collection(); report_prefix_pop(); + } else if (!strcmp(argv[1], "its-migrate-unmapped-collection-tcg")) { + under_tcg = true; + report_prefix_push(argv[1]); + test_migrate_unmapped_collection(); + report_prefix_pop(); } else if (strcmp(argv[1], "its-introspection") == 0) { report_prefix_push(argv[1]); test_its_introspection(); diff --git a/arm/unittests.cfg b/arm/unittests.cfg index 1a39428..adc1bbf 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -205,7 +205,7 @@ extra_params = -machine gic-version=3 -append 'its-pending-migration' groups = its migration arch = arm64 -[its-migrate-unmapped-collection] +[its-migrate-unmapped-collection-kvm] file = gic.flat smp = $MAX_SMP accel = kvm @@ -213,6 +213,14 @@ extra_params = -machine gic-version=3 -append 'its-migrate-unmapped-collection' groups = its migration arch = arm64 +[its-migrate-unmapped-collection-tcg] +file = gic.flat +smp = $MAX_SMP +accel = tcg +extra_params = -machine gic-version=3 -append 'its-migrate-unmapped-collection-tcg' +groups = its migration +arch = arm64 + # Test PSCI emulation [psci] file = psci.flat