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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B90DCC2BA4C for ; Wed, 26 Jan 2022 09:09:07 +0000 (UTC) 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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SPsAx1Pc19JmgLU0rZYZ6XaWzUBGBenIHRpQmAh1vIE=; b=T5JmU9beOwIo+h RohUcqgfMhg38iRuzmzf0da8OUWuWTfFfe7WiI6Mv1ZASxZST4OuvqLG31k78DnJ1Qbt2j525rZUY Ns5eA9aahMJEAlFIXSca8a21wqKmapk74DW8iNYzp0R1PJnig6A68devNhn62adQ09H+C+YoVey5d huNixs3ISuDOTnGq546pp6dXA4/fxooPAkMqhbO6q8NNGGTpZ+xb9PG7s1olimtmU916pdHQbdcex GFzjnOiNPjp60x7SrYtJ54GPZbzdS2WfCXT0Z0S7gCHFuFF06jtZgVlBZ7sXgTOU8oEU3jkueCx6F 7KBlJ7Ii7gJ27jTOJlBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCeHZ-00Ar6z-3u; Wed, 26 Jan 2022 09:08:01 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCeHP-00Ar5H-Tp for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 09:07:53 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E12261586; Wed, 26 Jan 2022 09:07:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5651C340E3; Wed, 26 Jan 2022 09:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643188070; bh=CoppXPKwlPuYpjxSjbP8rvLDgdyiQVokjZ7ovrpaV2U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dIgoghzP6U7sNeUaM0iVXDrjS0EB1bW1suZ1BkSaQS3GXSKDeiXbhMIMAUGabODmf NuY3efJ5lQaFZ+qFfXOv1Lpwhj0Pv3a2mUlvlGT7dGhmSqpYb0vrjR9FVJ6VRHrxi1 dFxG8bAaYf7J6mGyJKkgXpltNJM0mdGbIrACwi/WeYlXmn7aGceGuJhlZxM2mY4fW3 WUYgkkvvTiwLQwIWaQW/7jqqgEMN8QT2VvnQhRPyQpP/Vn4fqPKLmEjcjGvMnX5I7h 7YhY2cbP8bG6k10PF4TVDTtzuzW5qjRr4+D03aut+PUj8dDa62ylFvmhG5Ag1j7wH9 GYpltoPPqvACg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nCeHM-0039gh-TP; Wed, 26 Jan 2022 09:07:49 +0000 Date: Wed, 26 Jan 2022 09:07:48 +0000 Message-ID: <87h79q7tln.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Shuah Khan , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3 In-Reply-To: <20220125192851.3907611-1-broonie@kernel.org> References: <20220125192851.3907611-1-broonie@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, shuah@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kselftest@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220126_010752_079368_C84D88FC X-CRM114-Status: GOOD ( 26.09 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 25 Jan 2022 19:28:51 +0000, Mark Brown wrote: > > The arch_timer and vgic_irq kselftests assume that they can create a > vgic-v3, using the library function vgic_v3_setup() which aborts with a > test failure if it is not possible to do so. Since vgic-v3 can only be > instantiated on systems where the host has GICv3 this leads to false > positives on older systems where that is not the case. > > Fix this by changing vgic_v3_setup() to return an error if the vgic can't > be instantiated and have the callers skip if this happens. We could also > exit flagging a skip in vgic_v3_setup() but this would prevent future test > cases conditionally deciding which GIC to use or generally doing more > complex output. > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/kvm/aarch64/arch_timer.c | 7 ++++++- > tools/testing/selftests/kvm/aarch64/vgic_irq.c | 5 +++++ > tools/testing/selftests/kvm/lib/aarch64/vgic.c | 4 +++- > 3 files changed, 14 insertions(+), 2 deletions(-) > [...] > diff --git a/tools/testing/selftests/kvm/lib/aarch64/vgic.c b/tools/testing/selftests/kvm/lib/aarch64/vgic.c > index b3a0fca0d780..647c18733e1b 100644 > --- a/tools/testing/selftests/kvm/lib/aarch64/vgic.c > +++ b/tools/testing/selftests/kvm/lib/aarch64/vgic.c > @@ -52,7 +52,9 @@ int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs, > nr_vcpus, nr_vcpus_created); > > /* Distributor setup */ > - gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, false); > + gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, true); So you now only test whether it is possible to create a virtual GICv3, but don't actually create it. How does this work? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel