From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 521B81632F6; Fri, 25 Oct 2024 13:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729861530; cv=none; b=p26ppnjGprdKdvvEfP5cxEAU2hQD6n2f2j69VMWnx04nAnB/y9HVt21bpVMjxnXClt4pIAMxwQVu2eV2YJ8ypFgm473P1lVJGCNFJ786Fl1NWTXCBhXkgJVNdwXfYXHAhMX5uFOEyYfslwzx2u9vtUq0PiNTyJ94dTYfYw1tiG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729861530; c=relaxed/simple; bh=JHk7KYb3g3gubZ/UCoHENgcCGyzGa5kzhT1E3wr8230=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=PTt/ChX9O5rkGW+7zVVsGxghvJH959gxK2/8Gjo3Haw0wd/s8okcLy7UgqDaUOxumVBShhffXW9c2AXqfUOZEzlieNeoRpEj3sTkfmXEFeb922iN+rtP0tb+aouFpTXgPwQYVwUAvY3/+dL19PsY+1F/b7jJmQA2+4Ltf5bD2as= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t8iRUn7M; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t8iRUn7M" 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.