From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 588E742C51B for ; Fri, 14 Aug 2026 08:45:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786697154; cv=none; b=Hr89oQ0+hIE/+RAZzeCGlCdYXdUko6aqfmrsvVww+/xCUnZijULgaa8/frORFAOI+9XNl03QqmxZzcPtcX89IFUjlhO4LhYU2NVqdXBQIKRQnmfnGDmq3NU5mZZlanr1j48D2CrVPefuZ+HRcTGD9fUvqIDSpcF3ZwgDEUubOMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786697154; c=relaxed/simple; bh=i1c8AJsS/6BsMSz6FYSuta5r13xz+bKehed37J4V0no=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n0QwZUy2266yFE0bY4B3BVS8FXxSF8feVlOyPoKqHax7C4DuyvyMJTBHPXn+GYDbI+EqOmA7mdSKWSrno22vCd+TnaX9+MhUKtu3llrrrJ9pj9HFkJ39Z54Vz7DE1eqJ4y72JB/Y6rz28iTXJso6bslnP36OUQznj+pySuM3mgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ADAGnN/k; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MzrXRA9D; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ADAGnN/k"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MzrXRA9D" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67E7fnpm736621 for ; Fri, 14 Aug 2026 08:45:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=EVIasMr6ok/pt36pC50hDKA8 cdlBEv5jazPUbRxQ61M=; b=ADAGnN/knxZwKwlqppLvR3DFXAywgoljCOl+bDim 5OT8g8p1fI+jfG4Tv7QmaNjNoeROItyK5SqhEbWTo+zwlTjzwWTP3rVzs7ks7eIY a9/wsuMj/CE+x6BLqTjGCH8HL1HkoDlnDzR10GS+cDQhgoiRg3jkBzXjfZSAJ8kG +fjd4JynOdTTM2sRCQ1iC9vxldRXmga4ert1Llf1Nf4q2HqFf6ttwkmJ21iRqLLv +Bv1jYNq+LORKb8xk1UyJBCgl4rnQTu0k4KEDFcJ70xHPUngeLqlZrjkMMvD0PbN dCCT9KOOgCVVZF9bS+tojskYCm9xmevmrwLRAEJpHfgm3g== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g1j2f374k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 14 Aug 2026 08:45:51 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-cbedc1899f7so464299a12.2 for ; Fri, 14 Aug 2026 01:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786697151; x=1787301951; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=EVIasMr6ok/pt36pC50hDKA8cdlBEv5jazPUbRxQ61M=; b=MzrXRA9DF6+UOrwvYcgqqvQPHWlC6bZlBCsAPN14n0/kHJRcUVL1+cbFNmOOrQ+ETl lMqYy60qaZazRd37kRLmzoSKpiLhnA83tfxRdnFyo7kc2+vedDjabKZf5eeQtQY2LH6A 4RUgM9vp1QmxkUarbznMCnsw9uXVadVPuyXv4hiEncHo7FvG1C8nkgnyXwJ+0eIXm8hY nDtx09wY3BQn/RpUsJ6Md6qs48DcmrRgARP4X67md7hpSYEvVTjOlZxCJhCSnEigP1gr Grx4V28O6eA7UrNjkIdqtwcRk4AXPiavrVtovJzuwaBfKgNz05aLnGpUnUsOASsKTVHz vGeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786697151; x=1787301951; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EVIasMr6ok/pt36pC50hDKA8cdlBEv5jazPUbRxQ61M=; b=Jz6nRun1iDUB38ufLoeJDJpnW06RfbaiWWnzJvyE3hmQ4CDIpWJJxyGBH9VGdcQAIB nFmSf7WyzGRgCM9wkvpFuBtweYmWthdRqvxyd+jk/rhluTLLFZq0ujPZ0oA30ULjj9Es Y77bnl/XmGFdtaWgoDDTVrrf6qkcllz/GHNppG5oerm8M18EGRa0hzLEiwcEVQjX2Jsn KJ2XQchIt5TlSCjNQ+LVX/mxWC6d1fDyJPr7kmlg1weflxpqI/1zzmMcbEZoF9fwXTVS Uxlb6Ka4tidgBOhmkQ9+x8mXjKjSen2/OOJKVDNrK1OXJYDGuCwEcnLSSauSFbJmKG1+ WmgA== X-Forwarded-Encrypted: i=1; AHgh+RrL6Nc+SV3eevLvaNriRVm/WYWZRedonpADWTfyBJLnyocAJ52xXG70zrvwEQ8KaT0p1jN4vCa3xEqwumU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/eyAMgl7ymsRolZx7KNF8XBV4txclYUzwevEXXVqvNIHxySf8 VZq9ibcpeGnA7qmPQos8Msqnwjqdb4oKklq27X+AsOeK4FHucKzjFUMQ2A790ifWr66q5sCVriH nFvgm6LBmLiqAzaIsymJEESn3zbuMyc+urNlvE29vqAEajiMXavA6T/k+Kx4BTyKfNSU= X-Gm-Gg: AR+sD13FvfFuhASNbjnFa6NTkQgvZZ/ZtAhN+mEH2Ts0bzAIpWrXmkF6Sbh1Qcrml6u Pj5KaiO6Z20ZguD55z+a5YPjj9pZ28Q95XzsGjc+msJ9NDAMB+T9V+uOmSvlRo4QIzlzDxBUHm5 3+rebwYLFA0owy1KNZYLryj8GKqQpo4kpTT0WvdJXIsuy6C4QwkImZXs3jQE8Q/xxtcE2bZlCEa fHY34VsLg3csBPNmd/2whq4Jtw3eBBpPqekammoRj8+aLWu7sPFU0VPNaz2r4XvQij7vcF5gZco hXs8XGjMzmfrsU0ox4RGG9NyGj47RtdEesDu9HH8FONkTjfWdHPubfE5ompJIIlLSxhUBws1RSK JoPyxxZCtnjKYYu3eBvazLpIlIlh8rtkRyg== X-Received: by 2002:a05:6a20:430d:b0:3c3:bbe6:95de with SMTP id adf61e73a8af0-3cc71d533c0mr4527072637.6.1786697150992; Fri, 14 Aug 2026 01:45:50 -0700 (PDT) X-Received: by 2002:a05:6a20:430d:b0:3c3:bbe6:95de with SMTP id adf61e73a8af0-3cc71d533c0mr4527037637.6.1786697150586; Fri, 14 Aug 2026 01:45:50 -0700 (PDT) Received: from hu-pkondeti-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-320e9df03d4sm1808869eec.15.2026.08.14.01.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 01:45:50 -0700 (PDT) Date: Fri, 14 Aug 2026 14:15:39 +0530 From: Pavan Kondeti To: Will Deacon Cc: Pavan Kondeti , Catalin Marinas , 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: <5b557560-7664-4336-9e5f-86de8dcd6d90@quicinc.com> References: <20260803134403.80630-1-steven.price@arm.com> <20260803134403.80630-8-steven.price@arm.com> <7d4e5920-aa20-40cd-954e-037631bd0d6c@quicinc.com> <8db602b8-7fd3-4c11-8fbd-3b8251648eb8@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Authority-Analysis: v=2.4 cv=FeMHAp+6 c=1 sm=1 tr=0 ts=6a7ed5bf cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=kj9zAlcOel0A:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=VwQbUJbxAAAA:8 a=vggBfdFIAAAA:8 a=KKAkSRfTAAAA:8 a=oGdhJ8GHBgxCdCDN5qoA:9 a=CjuIK1q_8ugA:10 a=x9snwWr2DeNwDh03kgHS:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 1hHYeDnKaIkwC-DtNzaA5pMcA1nyencN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODE0MDA2NiBTYWx0ZWRfX2Z4hDUMVFPMe GeSTaF35pgvUcz9Cl5Xn3VYpXA7+heHSg+mDWxmI6gs+c/JO/oOVmq3ikyhPmIC6uFBs+mcakYS AdzHeq+g1yJa5O1LMe6cjXhrVC5cbTYYEWhW4VmGUINsmVVPs/ARKyzgH6wiqz4jimCoHGvvdvJ 2yGwe940lgE8L6PCQTXZgCBrG2xuwZLM6U7QEWNPi9Kx7hO5M4U8WIzfaxC5FyY2WtiBBmA4cAC dYiGe5RkePf5iTD8BqVYRiDV6Jzw9SdqwHivxzESIFtKb1iKr4+OWKHUJUdCKVjGPQeF8moST1o bvG8N/04wrrNV/JcZBa33RLcSYTxMGTOZgfgXBTQpEksD3XDR9+wvE4BSMGEd1JYXXjptH/sSBL BymVdVS9BK2k/iHg5p6OOUfMHNLEOE+P7dDmhxxPewFZHw5aulmtcdCnktrRFz/k/h2nESyofUe wsuNNf9QVg9UpRSBVYw== X-Proofpoint-ORIG-GUID: 1hHYeDnKaIkwC-DtNzaA5pMcA1nyencN X-Proofpoint-Spam-Info: AW1haW4tMjYwODE0MDA2NiBTYWx0ZWRfXwvmyL0qc00dH WE/VtmhBXlBP3tMaqfaP98bIyWpymbplV10mjnQcDh2q+9DPeoyuP3UBn7tgb4pwnZ5MSCJ8SU3 m3i47h5hTQ2Rkam4d7kTv6nPfBe/z1M= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-14_03,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608140066 On Thu, Aug 13, 2026 at 04:28:04PM +0100, Will Deacon wrote: > On Thu, Aug 13, 2026 at 07:40:41PM +0530, Pavan Kondeti wrote: > > On Thu, Aug 13, 2026 at 11:11:03AM +0100, Will Deacon wrote: > > > 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/ > > > > > > > Thanks Will for sharing this information. > > > > There are use cases outside gmem like FF-A lend to Secure Partition. > > we may not be enforcing all such memory to be unmapped at EL1, correct? > > If you leave the cacheable linear alias of memory intact across an > NS -> S transition, then you're in for a bad time [1]. > > Will > > [1] https://lore.kernel.org/all/20221114110329.68413-1-manivannan.sadhasivam@linaro.org/ Thanks for the reply. In the above case, XPU does not like the speculative fetches. I am not sure if there is a hard requirement for unmap of FF_A memory lent to secure partition managed under Root with GPT. Thanks, Pavan