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 2F93ED0C608 for ; Fri, 25 Oct 2024 13:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6aUc8ARIpAq0rQB4r7RviNQMWUmufkfkZX7MUXYS/8w=; b=f7CyGw4sTIoMzUXDD8RL1vn3fh eOkirMGghEewGnGIOz+M8PJQM4h7v7oid0A8YYhsuBMzsxKYQskWBMtWD5S8yqAF8CB3Hu0M2vd26 0cc/Vl1WxezN88rfXeSf+e0G+LSAdl0XmT4L6uMRo81ldV9nSeMjtTBkeLu4y6FhcUk7opgc2et8Q cLP4dIRahXC9lKaLKwu2pugE2LWv7Dq9DnM7Rqg+D3fnqqtWJig2u1zz71EAeaofZ+47z7vpZgfgx +GoJu/hiSSrDJC9M6kbne6pagZGJ8gu8wS8i9/CcmOIQbGTrqm0pWuCj0zCcJ5R8GQuJutYR/AQUt /FsQVI9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4K94-00000003mf3-2Unz; Fri, 25 Oct 2024 13:14:26 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K0Q-00000003l1K-3SQw for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:05:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0A2DB5C5848; Fri, 25 Oct 2024 13:04:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C73F2C4CEC3; Fri, 25 Oct 2024 13:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729861529; bh=JHk7KYb3g3gubZ/UCoHENgcCGyzGa5kzhT1E3wr8230=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t8iRUn7MW8+vBX02dVc9yoDre05ZBSkvXiKgdaN3nH3Xfn6kgX0qxhYM6SDdnRTvy 5ZqCUQi9lghoJ8667mBCWv+Ej3lNrl2woZhNmF+0Bh896RrwpHIgVNj2k5AK9uAsUV lelBoqSj9hn2BFXDKm1CRKKNudW6GdKWXId7pE/GkKK+EX1HJ6bT+WIvnF4mfrmKsx /2W7ZAVekhd1JVpG515Q0A4fMdpBit5wkiyRc4eiKoAfc8tmdGAn7PtkW++LqPaAyr qEnnC4/gwWvuoMxYwq0cEFw4nfPJ7BZDlc3ll3+ejzX6giEXRFGjE3U4hXtg1/2f5H z0DzPv0yC7p6A== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t4K0N-006muA-8R; Fri, 25 Oct 2024 14:05:27 +0100 Date: Fri, 25 Oct 2024 14:05:26 +0100 Message-ID: <87v7xgtjs9.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Joey Gouly , Suzuki K Poulose , Oliver Upton , stable@vger.kernel.org, Alexander Potapenko Subject: Re: [PATCH] KVM: arm64: Don't eagerly teardown the vgic on init error In-Reply-To: References: <20241009183603.3221824-1-maz@kernel.org> <3f0918bf-0265-4714-9660-89b75da49859@sirena.org.uk> <86ldyd2x7t.wl-maz@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/29.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, joey.gouly@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, stable@vger.kernel.org, glider@google.com 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-20241025_060531_003045_66DE95F3 X-CRM114-Status: GOOD ( 25.81 ) 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 On Fri, 25 Oct 2024 11:54:38 +0100, Mark Brown wrote: > > [1 ] > On Thu, Oct 24, 2024 at 07:05:10PM +0100, Marc Zyngier wrote: > > Mark Brown wrote: > > > > # ==== Test Assertion Failure ==== > > > # lib/kvm_util.c:724: false > > > # pid=1947 tid=1947 errno=5 - Input/output error > > > # 1 0x0000000000404edb: __vm_mem_region_delete at kvm_util.c:724 (discriminator 5) > > > # 2 0x0000000000405d0b: kvm_vm_free at kvm_util.c:762 (discriminator 12) > > > # 3 0x0000000000402d5f: vm_gic_destroy at vgic_init.c:101 > > > # 4 (inlined by) test_vcpus_then_vgic at vgic_init.c:368 > > > # 5 (inlined by) run_tests at vgic_init.c:720 > > > # 6 0x0000000000401a6f: main at vgic_init.c:748 > > > # 7 0x0000ffffa7b37543: ?? ??:0 > > > # 8 0x0000ffffa7b37617: ?? ??:0 > > > # 9 0x0000000000401b6f: _start at ??:? > > > # KVM killed/bugged the VM, check the kernel log for clues > > > not ok 10 selftests: kvm: vgic_init # exit=254 > > > > which does rather look like a test bug rather than a problem in the > > > change itself. > > > Well, the test tries to do braindead things, and then the test > > infrastructure seems surprised that KVM tells it to bugger off... > > > I can paper over it with this (see below), but frankly, someone who > > actually cares about this crap should take a look (and ownership). > > I'm not even sure that's a terrible fix, looking at the changelog I get > the impression the test is deliberately looking to do problematic things > with the goal of making sure that the kernel handles them appropriately. > That's not interacting well with the KVM selftest framework's general > assert early assert often approach but it's a reasonable thing to want > to test so relaxing the asserts like this is one way of squaring the > circile. It *is* a terrible fix, since it makes no effort in finding out whether the VM is be dead for a good or a bad reason. In a way, the fix is worse than the current error, because it silently hide the crap. So this test will continue to explode until someone fixes it *properly*. And if that means rewriting the selftest harness, so be it. M. -- Without deviation from the norm, progress is not possible.