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 8EE11204840; Mon, 5 May 2025 11:34:32 +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=1746444872; cv=none; b=nC4GmYPs/nYr/U/tBSWIZJJU2u3Y7/IDrkTAyPZO56norBJp8GlvfziooDgV9F7YmI3Gxid21K2/VHeEUQsDhz+NRDyEHgHzt2LPAq1noGnJQ6z2EaEOU5nBuJKRgZl6YNknZ5dQ4GVvemmXug3rgZIfbTTmKpz153+Nou1j3yo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746444872; c=relaxed/simple; bh=440FYBEqzSYr6l+ypeJuPgqUf7xqChkSHzXapPRIJv0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=NNe++/KGFIXGApBNd4S5+kGXOTrTXQaOZQ37BE4TppQ5DhPG1bihJuIlqe3DGxmYLj+I1GDxHFkHXoBxkkUzISmTTX70RnhdimY5F6UHjOQCtM3PENTzQoES7szG9YMwqp3hXPsdrrUI9PQMQFlt+147q0eDcLubihOUUt5RQYw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HQwnt+wW; 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="HQwnt+wW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 011BCC4CEE4; Mon, 5 May 2025 11:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746444872; bh=440FYBEqzSYr6l+ypeJuPgqUf7xqChkSHzXapPRIJv0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HQwnt+wW6qAknl1swjPl8eYTBX4TI3ADSTIVXGrWlWA09iyPULA7GX5niEVP0JyX6 RSBQyP+9MDHdRcrkbFX0pb5HztfOH0zE2PdB9aM+G1cNQqqrSS1sux/strp58PvZdz +0DzeZON59dCAbjSOuFAFfbF5Do3NzEOxV2eBHvbJqGWmYsxJQNxLRf6Knm+1L0m4w ZKLYmehuM7EcDHCeBwtS05tjbKVD4tGv8rTPsiNYAgw/FfNXorZjWHXM6xofxUfrCn CL9Ig/JBmxEGa7UuMCpMCIWGD4GrJGsED9jutIkTDWZ/F7lo5qhW5rp5ibGA9AqIZf aVkQUH5u5XrmQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1uBu5d-00Bh4m-RL; Mon, 05 May 2025 12:34:29 +0100 Date: Mon, 05 May 2025 12:34:29 +0100 Message-ID: <86msbrguka.wl-maz@kernel.org> From: Marc Zyngier To: Sebastian Ott Cc: Oliver Upton , Quentin Perret , Fuad Tabba , Catalin Marinas , Will Deacon , Mark Brown , Mark Rutland , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: LM regression: fce886a60207 KVM: arm64: Plumb the pKVM MMU in KVM In-Reply-To: <3f5db4c7-ccce-fb95-595c-692fa7aad227@redhat.com> References: <3f5db4c7-ccce-fb95-595c-692fa7aad227@redhat.com> 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/30.1 (aarch64-unknown-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: sebott@redhat.com, oliver.upton@linux.dev, qperret@google.com, tabba@google.com, catalin.marinas@arm.com, will@kernel.org, broonie@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@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 On Mon, 05 May 2025 11:52:00 +0100, Sebastian Ott wrote: > > Hey, > > Doing back and forth migrations currently fails on arm after a couple iterations. > During the failing migration KVM_RUN exits via guest_abort and returns -ENOMEM. > I can reliably reproduce this by migrating between 2 qemu instances on an ampere > altra machine. This fails after < 5 iterations. In this case qemu would spit out > smth like this (other than that - nothing in the logs): > > error: kvm run failed Cannot allocate memory > PC=0000aaaae7d48590 X00=0000aaaae80a2e00 X01=0000aaaae7ea2fc0 > X02=0000000001d3a5d0 X03=0000aaaae7eace8c X04=000000003b9aca00 > X05=000000000000004a X06=000000000000004a X07=0000000028000000 > X08=0000000000001d70 X09=0000000000000018 X10=000144b7d0000000 > X11=00ffffffffffffff X12=000000008378f367 X13=0000aaab1a202d70 > X14=0000000000000000 X15=0000000000000000 X16=0000ffffa2e2f7a8 > X17=0000ffffa2541f20 X18=000000000000a000 X19=84bfda6288cf2dd6 > X20=0000aaab1a1f1ce0 X21=000000007fffffff X22=0000ffffc5431788 > X23=0000aaab1a17db60 X24=0000ffffc5431770 X25=0000000100000000 > X26=0000004100000000 X27=0000000000000001 X28=0000aaab1a1f1c20 > X29=0000ffffc54316d0 X30=0000aaaae7f8cd24 SP=0000ffffc5431650 > PSTATE=20001000 --C- EL0t > > Guest and host are otherwise idle, kvm is in normal VHE mode. > > Git bisect points to (fce886a60207 "KVM: arm64: Plumb the pKVM MMU in KVM") > I also double checked that by reverting this commit on top of 6.14. Thanks for find the triggering commit. Can you further identify *what* causes the -ENOMEM? The only new -ENOMEM in that patch is the one added to topup_hyp_memcache(), which shouldn't be called. Also, a failure to allocate would leave some nastygram in the kernel log, so it is unlikely to be an actual failure to allocate. Is it the first KVM_RUN that fails after migration? M. -- Without deviation from the norm, progress is not possible.