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 4AFE3C5CFDB for ; Thu, 13 Aug 2026 10:11:25 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From: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=1GUvy4NsSEhlxO1mGSlkQ8deO2KrloNrrXAd8AHoYE8=; b=vEFWyNXgl1aTXvaGv81OvlXPG2 QuMRzBR3rkfZmMDq1FfjaiJcEJdcFQdop36yOecHurc5ke0f+50jJEU6sIPoD8rLat4qQ8LCOcVqm 97p5E47YvtnehEgsclxU/v4TwtW3UdIVPwnSCuRQc9Yi1g1fk3tm2WvWH0jhHaiEhpT10tPaomjQI Q1B02uNw+jzRCcLlhpQ//ZdvkjD1CMdA1Pfnb9gcH33ORc+bK94HPDJf/zB6GkuGw882pOHwr0b7H nzDLKcpn7sD2IwbM2VijqRiE/Zfqa+DFbHRYD61oKP9GZCSMb7EmUK7AB39eJs7lj7Vw9ak08FAtb XY5lo9lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wuSP3-00000000Qge-1DDA; Thu, 13 Aug 2026 10:11:13 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wuSP2-00000000QgH-0Ygn for linux-arm-kernel@lists.infradead.org; Thu, 13 Aug 2026 10:11:12 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 8E7AA600AF; Thu, 13 Aug 2026 10:11:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71B2B1F000E9; Thu, 13 Aug 2026 10:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786615871; bh=1GUvy4NsSEhlxO1mGSlkQ8deO2KrloNrrXAd8AHoYE8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Uh72INHK/sIbkNYsIDOPjGO143EsGaQlP7xQY3AROGkJGS0/0IdBYQHDCvp1O5oM8 oaoI+ZDz/JHZS+7HYo6heMzXrWDq3R9JoHYsJ+6PH8z7UlLt+2dRJCIX8KLOxLsE0W RPhMJleW/O0L2O3kGBOy6PqG73URg60mJM5eCvmmpoypJbq06/4eW3EI2a/z9Ibg1G NgEF8AnsHzQ0yR4Ii3p1AGmKDV//SqJRsEYIo5folawdWjVa7go7BlIMYzhtzP3KtN 8LOjezI5ivbdQCFV5ug5X9NRpIeTcTNM/Ry1xf1ieV5i3viFeT1+G6zHTi0twu/0TX kdMpVTQo5iiHQ== Date: Thu, 13 Aug 2026 11:11:03 +0100 From: Will Deacon To: Catalin Marinas Cc: Pavan Kondeti , Suzuki K Poulose , Steven Price , kvm@vger.kernel.org, kvmarm@lists.linux.dev, Marc Zyngier , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Gavin Shan , Shanker Donthineni , Alper Gun , "Aneesh Kumar K . V" , Emi Kisanuki , Vishal Annapurve , WeiLin.Chang@arm.com, Lorenzo Pieralisi Subject: Re: [PATCH v16 07/45] arm64: mm: Handle Granule Protection Faults (GPFs) Message-ID: References: <20260803134403.80630-1-steven.price@arm.com> <20260803134403.80630-8-steven.price@arm.com> <7d4e5920-aa20-40cd-954e-037631bd0d6c@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Aug 12, 2026 at 02:51:29PM +0100, Catalin Marinas wrote: > On Wed, Aug 12, 2026 at 06:12:09PM +0530, Pavan Kondeti wrote: > > There is a valid case for fixup_exception() to be needed here in GPF > > handling. > > > > -000 |load_unaligned_zeropad(inline) > > -000 |hash_name(inline) > > -000 |link_path_walk() > > -001 |path_lookupat() > > -002 |filename_lookup() > > -003 |vfs_statx() > > -004 |vfs_fstatat() > > > > We observed this in Android running Gunyah when the page is mapped in > > EL1 but unmapped at EL2. path_lookupat() can actually handle this > > via fixup_exeption() when a word load crosses the page boundary. > > However, Gunyah injects a Synchronous External Abort and we have > > a downstream patch [1] that adds fixup_exception() in do_sea(). pKVM > > injects [2] such faults back to EL1 and fixup_exception() is taken care. > > Ah, good point, completely forgot about load_unaligned_zeropad(). Since > we don't unmap the linear map for delegated pages, we'll need the > fixup_exception(). And I guess warning in this case is not desirable > either. We could limit it to EX_TYPE_KACCESS_ERR_ZERO and > EX_TYPE_LOAD_UNALIGNED_ZEROPAD, though not sure it's worth it. Alternatively, I think the series to unmap guest memory from the linear map would solve that for gmem: https://lore.kernel.org/all/20260410151746.61150-1-kalyazin@amazon.com/ but I can't tell whether that's still being actively pursued. Will