Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp573115rba; Wed, 27 Mar 2024 05:41:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGyofbI3TZSLQI0EXSTYv36yooYfAj2njOyIZzyHVuY4Qd6cfdaRVjyF1Qq2elev7gl1zvb1+WbHInBsIEAT5OQzhMUWzO/upO5of1xg== X-Google-Smtp-Source: AGHT+IFBOEs+trl7GZgpaCjDPDr7u36Hamw5+K99fadXo+nUZ9zq1viEVex+2lOeSIciyGZ7dawA X-Received: by 2002:a50:d7c2:0:b0:568:8e22:4eff with SMTP id m2-20020a50d7c2000000b005688e224effmr2795826edj.37.1711543291827; Wed, 27 Mar 2024 05:41:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711543291; cv=pass; d=google.com; s=arc-20160816; b=BWizk+fI0cdxIuEL0NIbPwg4R5PQj8Vtjo1HGIiNnG+Ka04e/sixvcZtErOfEJ1uRC CxWAA7UCXeF5yp/5zhUUZoj5tSEpQ3EBp9BZVx+qU47ympGTiOngVml5VVFbNOFuQlbM dtIzWgEQqvDlKIX8llguNR4A3iIdrgHR7xj7YMli+Zm7IW6N0X3PUrNmABd5/+SzJOej jN1DPOr2ypzQWpqAwXsLLHDzLYEBQqG2rBTNzMbas8g6HdHNTEexciHCuVOh9T/803li k5TeaFCXeCmja310sIHD5Nyr4w446s2xr1ATCY/MJP2K4I5lemyT68vI5an0fAOOjsEn lJvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=FyM06ZerIRaKefIYi63ZTeiBohMoLVNuexluVqUAAGo=; fh=1eSe69I6ov78NotZhgTWo+4O50awDL2VFdHg/O8MtSs=; b=iL5ikFfp9bp3Q0KOBiqbVCQojwGl6AzYb2pVEewZ21zjy3RyuqBul28Uu3CFsW8RNY fmuP2qXBPZ9owlk/Qq25KRIkjkfIOF8vnXNizF/WfEoi5RNJ1BaD5aOkDDono3fkE+zn eXScytigyY6gIUWz9dUYgpsU7t2t34E9vhd/E6061X817qgwCxsvL/0SsnZuHtodyHZk OPrfeptSU7jrvam8YiptLLmiG3S56Fl2Bsg3/UFuuLxg4a5oefUgs2BJACwUxUeA8Obp T5MlZcYX/DfDD+v1VdJs0binFkpB4emWHb3gUuIMeQjJJi1gnV8JEl3z4b3SEk3cBjhc m1tA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iYutqEe5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b17-20020a056402279100b0056c36c430d9si936824ede.163.2024.03.27.05.41.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 05:41:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iYutqEe5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120921-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 793A21F2E13C for ; Wed, 27 Mar 2024 12:38:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1D2F12EBE9; Wed, 27 Mar 2024 12:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iYutqEe5" 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 0DA1C14A0BB; Wed, 27 Mar 2024 12:13:11 +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=1711541591; cv=none; b=bqYerT1RdXaeFHxWaHd27CrAi6PFVuewyTC3pJzv4HENQva0Qt3JU+v9xmTFVJyLczO2v8T4i3uc8fDGtJ7iFGv86uomdm2/2tmZPWG2OwZMLnd/VyAkg7tIa4f7m+n25ecnBV65oUljDAglkZVCKfVoiyF7LTuxDPTP0Okpqw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541591; c=relaxed/simple; bh=6nzb64oC/aS+38eYkHxWrJnO/Ec/5COHzsOHpbHjwq8=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=aTPFQRFl42qPfCNEDy9nL/3QaBNhNub0f4WGXKbUU4KIdomxnEr8Iafk+9o0Z2G0IUzcg13Kr33XjitQlCQ1xx4pcXSCZ1HnybFS9+s5VchCkLLV4QVcBfQyLiP7IzZ14zx8qwvkX8VaMxiUPnnLI5EbfL6t5XKVA/bzLYlCVNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iYutqEe5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E52E3C43390; Wed, 27 Mar 2024 12:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711541590; bh=6nzb64oC/aS+38eYkHxWrJnO/Ec/5COHzsOHpbHjwq8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iYutqEe5s0N9gvqdYsI1i59tc58latUbZgDX0+SbW82UFYr6MrNmzMRo7wACyvb7T DeHYGvTc8P1teXK1vtA0zmcQnp/3o+jMFUsAHinGhBHgQ81ebMqkoeWBDXCDCYQcsZ QGqrxYvnlRfSjvflGkmodVfCCHNPwaXxwyRyhUvOylTvTpqSV26GH8GwTjeO6PiDjt mDzTByGBUWz16Ja1pwIvm9yBf8uPgmymQ/cJmUvSkVNCtAmZP9cbHCsowYebcxImZZ S69O/cz21T+WpcKOtQsuyGDnlm38KPeYjL7eLslJr3Z5EnMoOvXBgwRKXcP5Xp0DVb Thlxr2JmBSx/g== Received: from 82-132-225-99.dab.02.net ([82.132.225.99] 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 1rpS9U-00GHA1-83; Wed, 27 Mar 2024 12:13:08 +0000 Date: Wed, 27 Mar 2024 12:12:55 +0000 Message-ID: <87ttkrswjc.wl-maz@kernel.org> From: Marc Zyngier To: Ganapatrao Kulkarni Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, oliver.upton@linux.dev, darren@os.amperecomputing.com, d.scott.phillips@amperecomputing.com Subject: Re: [RFC PATCH] kvm: nv: Optimize the unmapping of shadow S2-MMU tables. In-Reply-To: <92117ba1-54ff-4752-b446-0ed09bde7201@os.amperecomputing.com> References: <20240305054606.13261-1-gankulkarni@os.amperecomputing.com> <86sf150w4t.wl-maz@kernel.org> <6685c3a6-2017-4bc2-ad26-d11949097050@os.amperecomputing.com> <86r0go201z.wl-maz@kernel.org> <92117ba1-54ff-4752-b446-0ed09bde7201@os.amperecomputing.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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org 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: 82.132.225.99 X-SA-Exim-Rcpt-To: gankulkarni@os.amperecomputing.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, oliver.upton@linux.dev, darren@os.amperecomputing.com, d.scott.phillips@amperecomputing.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 26 Mar 2024 11:33:27 +0000, Ganapatrao Kulkarni wrote: > > > Hi Marc, > > On 05-03-2024 08:33 pm, Marc Zyngier wrote: > > On Tue, 05 Mar 2024 13:29:08 +0000, > > Ganapatrao Kulkarni wrote: > >> > >> > >> > >> What are the core issues (please forgive me if you mentioned already)? > >> certainly we will prioritise them than this. > > > > AT is a big one. Maintenance interrupts are more or less broken. I'm > > slowly plugging PAuth, but there's no testing whatsoever (running > > Linux doesn't count). Lack of SVE support is also definitely a > > blocker. > > > > I am debugging an issue where EDK2(ArmVirtPkg) boot hangs when tried > to boot from L1 using QEMU. > > The hang is due to failure of AT instruction and resulting in > immediate return to Guest(L2) and the loop continues... > > AT instruction is executed in function of > __get_fault_info(__translate_far_to_hpfar) in L1 when data abort is > forwarded. Then AT instruction is trapped and executed/emulated in L0 > in function "__kvm_at_s1e01" is failing and resulting in the return to > guest. > > Is this also the manifestation of the issue of AT that you are referring to? It's possible, but you are looking at the symptom and not necessarily the problem. FWIW, I can boot EDK2 as built by debian as an L2 using QEMU without any problem, but I'm not using QEMU for L1 (it shouldn't have much of an impact anyway). I expect AT S1E1R to fail if any of the following are true: - the guest S1 page tables have been swapped out in the interval between the fault and the AT emulation - the shadow S2 page tables do not have a translation for the output of the S1 page tables yet You will need to work out which of these two are true. It is perfectly possible that there are more edge cases that need addressing, as what you describe just works with my setup. It could also be that 4kB page support at L1 is broken (as I have no way to test it and only run with a 16kB L1). M. -- Without deviation from the norm, progress is not possible.