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 A287BCF887F for ; Sat, 5 Oct 2024 14:03:41 +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-Transfer-Encoding: Content-Type: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=8X7zEiT5Hq2hh0DelxGsYoSBE7C5ZUgwKxB3Gj3juhI=; b=LYALrqGpctqq/ysA5pBCYPXZ7F m0p/rqu6duTv5JJS2+p2hWIiGjaxmONZ1sK12ZQsFf/ZOaAFY0WAtb87/lp7A/GFxsQbFOJuE3uJI LAywTDqE4If4Y6tplEbmB9vUWtaNmbknp4wDdWHSEZOTp+UOLvLiz0JPQhkd2NUV5ScedpayghC+W EEP2ZIB7eveb8zRr02SH6Al4s26fySAt0PW7M6MciBf8oVHFI25mhQQZouVEKIpm8TnjdbM9p5Y/x MfDB7gjOQ7KCciUgLZkUtUUvoswth8qRck4G7ItpvH79npyMH1xocvgod/G29d1D/X1h0qWceXDax A5Hrstng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sx5Nc-0000000FQo8-14yu; Sat, 05 Oct 2024 14:03:32 +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 1sx5ML-0000000FQcF-0sCq for linux-arm-kernel@lists.infradead.org; Sat, 05 Oct 2024 14:02:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5281C5C0665; Sat, 5 Oct 2024 14:02:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AC43C4CEC2; Sat, 5 Oct 2024 14:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728136932; bh=5VikhLow5tX+OhRXx9cV5qsiUujBLh2clzakxZt/A0o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iuIsvClVQzM4cST6dTjTiJRfb8Hl1g4+F5BFB/67Uy2g1BlP3Xmu6PagQzIk29AGx d7/gK8UFENqBPF3/QeP5XgxKpLpZsOBrU8qpJtl98J4E+KiLPmw+Ufg9gWmezjgMVH sladHwwu/9Gey4yfEq9c1ZgSBX7BVz8A1P5kDwjVKe/QEAxb/kUNRXnwQ65ocbEm7J BS8eeZ0G2zAaXfY1MAEF8Lmglm+4GGbaXZbzCqBlqPVr/vtH9tBockTa1yts2YOn45 0v/IKFLXug7Xuv8B4k5d0Rjfvj3rnfkqzyf4GzoZd+Iu5JRwkp/vwhiOWIf5V8YLj/ TG6oL2wZASxMA== 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 1sx5MI-000c40-2c; Sat, 05 Oct 2024 15:02:10 +0100 Date: Sat, 05 Oct 2024 15:02:09 +0100 Message-ID: <87ed4uveam.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Catalin Marinas , Will Deacon , Oliver Upton , Joey Gouly , Suzuki K Poulose , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 3/5] KVM: arm64: Manage GCS access and registers for guests In-Reply-To: References: <20241005-arm64-gcs-v14-0-59060cd6092b@kernel.org> <20241005-arm64-gcs-v14-3-59060cd6092b@kernel.org> <87iku6vl4z.wl-maz@kernel.org> <87frpavgam.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 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, shuah@kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org, 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241005_070213_360784_D8469FDA X-CRM114-Status: GOOD ( 22.58 ) 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 Sat, 05 Oct 2024 14:48:09 +0100, Mark Brown wrote: >=20 > [1 ] > On Sat, Oct 05, 2024 at 02:18:57PM +0100, Marc Zyngier wrote: > > Mark Brown wrote: > > > On Sat, Oct 05, 2024 at 12:34:20PM +0100, Marc Zyngier wrote: >=20 > > > > Where is the handling of traps resulting of HFGITR_EL2.nGCSSTR_EL1? >=20 > > > These will trap with an EC of 0x2d which isn't known so I was expecti= ng > > > this to get handled in the same way as for example a return of false > > > from kvm_hyp_handle_fpsimd() for SVE when unsupported, or for the > > > simiarly unknown SME EC, currently. I gather from your comment that > > > you're instead expecting to see an explicit exit handler for this EC > > > that just injects the UNDEF directly? >=20 > > Not just inject an UNDEF directly, but also track whether this needs > > to be forwarded when the guest's HFGITR_EL2.nGCSSTR_EL1 is 0 while not > > being not RES0. Basically following what the pseudocode describes. >=20 > Ah, I see. I'd been under the impression that the generic machinery was > supposed to handle this already using the descriptions in > emulate-nested.c and we only needed handlers for more specific actions. =46rom that very file: /* * Map encoding to trap bits for exception reported with EC=3D0x18. [...] */ Everything else needs special handling. M. --=20 Without deviation from the norm, progress is not possible.