Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=68.232.139.117 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796398369; b=k3c/gqrudkrdBDj8fM++GrdHgThxUSGFdIhe0vy7tdFLx/Onriz6IJWOrd2jon3h+ZuM VqNwg0AK/+0Xo98Cx0m7h4DmXuaZJY6Wha73YI9CXDU8j8yL3V1JMD+YozAyPyAovtJce 2198foBc2PrjDBP0wSoUlGxv8SxHMGefuWjBO+x8GE+r2HdGA66kB5bUWfgaWrlKlbjPn xwaTMs1zYTQrmixFQ6ey1nTzoUmwlVyMjo6/csDvq04XPXg14B+/uuaLG1/sR7W5rAN4L 60cA3uI2oKqp+WVE1atXbW6/3zjElgFGT/7pz9ZUGb9OaIiAEExL9Z389p9rHevjo8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796398369; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:Received:Received:Received:Date: From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=2aSgOy7W8TbMb0StW7pQbeCT7Aruuh3sx7aNg6Dmq3k=; b=cThg9DOTQRTP+yQzN+gIKwyDg3tYsV51pe15XvIyYGrYqvoWnE57gkQL/1lbYIEs8Lqo IOztE2X55fe32rwym+eEw3JlCYKSZPmO/dHudObT36Tp3sjQgdcwcrdDdzo3rgJ/YyX4a Q0y2cU4c6ExayT5iG4ogiPi8I+VaxT2GnVQ8O2wN9ZsNS6lnfr52KKQTt4qSst9VPNSBT Fal3WUImeQjc3pKFrVpo67CHcbKHaWgRfKUjr2cDFHIxWvudMprV4xJkB1KrCMKZEwnGw 0Y1rED/hEFw7bE07ViVrf3bYsisyjcwJfHla04XknkwWLKARbzTwVXmT2obLFuxAWAg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=fujitsu.com; spf=pass smtp.mailfrom=fujitsu.com; dkim=pass header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=fSLut4kx; arc=none smtp.remote-ip=68.232.139.117 Received: from esa4.hc1455-7.c3s2.iphmx.com (esa4.hc1455-7.c3s2.iphmx.com [68.232.139.117]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B82DB606A32C; Fri, 4 Dec 2026 15:32:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B82DB606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=fujitsu.com header.i=@fujitsu.com header.a=rsa-sha256 header.s=fj2 header.b=fSLut4kx DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1796398377; x=1827934377; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JWgXC7v1jE897XlWF5dq9+lXq+Td95C82Qc8j8esiDQ=; b=fSLut4kxbG+g9C5Ln/+CPa0/pwK5ZC5t5ds+Eonv1VFbNcYLfkC4ExsH sAZeIwUYTHx+j0mfVexlMhTJgYNx6RhKUbJnNplR8BhSwEyRkxF2OZ/RB Hsw1wqQfVwaUaJUYZV5GwoOkVTv3nYqoFJwH6kXq61jSb7GcuYiHHf9G7 sZMmAL7RAyykSSmxcwf4y7IpCwa+Vlc0UvVs4f6Tc7iRUUuZhw/arwrte BUZRXB6Si+GHZrqHxX1Dr2ViNP0Zqphvvzam8vU/X/VrPFCPhMxSDTELY nc2ug2wejYirYVMIkdB+sLS6yxTo8hyVKUa4wYSYhH3kEvnScZenm4D7d w==; X-CSE-ConnectionGUID: qLN34vnIRN+RQi6EV0r8ug== X-CSE-MsgGUID: fpS86T19RueBe4lTwrPxCg== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="263811696" X-IronPort-AV: E=Sophos;i="6.29,78,1794841200"; d="scan'208";a="263811696" Received: from gmgwuk01.global.fujitsu.com ([172.187.114.235]) by esa4.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2026 00:32:49 +0900 Received: from az2uksmgm2.o.css.fujitsu.com (unknown [10.151.22.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by gmgwuk01.global.fujitsu.com (Postfix) with ESMTPS id E0BD782113D; Fri, 4 Dec 2026 15:32:40 +0000 (UTC) Received: from az2nlsmom4.fujitsu.com (unknown [10.150.26.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by az2uksmgm2.o.css.fujitsu.com (Postfix) with ESMTPS id 9E6251801FCD; Fri, 4 Dec 2026 15:32:40 +0000 (UTC) Received: from FCCLS0092175.localdomain (unknown [10.9.23.61]) by az2nlsmom4.fujitsu.com (Postfix) with SMTP id 9866C201F3AC; Fri, 4 Dec 2026 15:32:31 +0000 (UTC) Date: Sat, 5 Dec 2026 00:32:23 +0900 From: Kohei Enju To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , 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 v6 10/11] KVM: arm64: CCA: Support runtime faulting of memory Message-ID: References: <20261204115725.45272-1-steven.price@arm.com> <20261204115725.45272-11-steven.price@arm.com> X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261204115725.45272-11-steven.price@arm.com> On 12/04 11:57, Steven Price wrote: > At runtime, if the realm guest accesses an IPA without a stage-2 > mapping, then KVM fixes up the stage-2 mapping for the backing memory. > > For memory in the lower (protected) region of IPA, verify that the > corresponding guest_memfd page is private before delegating to the RMM. > The RMM then maps the delegated page into the Realm. > > For memory in the upper (shared) IPA region, map the backing page as > non-secure memory. Check that a guest_memfd page is shared when the > fault uses guest_memfd; ordinary userspace-backed memslots can only be > mapped at unprotected IPAs and follow the normal user memory fault path. > > If the fault IPA and guest_memfd attributes disagree then exit to > userspace with KVM_EXIT_MEMORY_FAULT so the VMM can perform the required > conversion. If a shared IPA has no memslot, KVM follows the existing > MMIO or abort-injection path. The latter can result in injecting a SEA > to the guest. > > Realm faults may need to create RTTs, including when updating a > mapping after a permission fault. Take the write side of mmu_lock > and top up the MMU cache for these faults. Do not pre-fault Realm > memory. Hello Steve, Not a review comment, but just a question for clarification. My understanding is that this series and the following ones aim to provide basic CCA/KVM functionality, leaving out optional features for the initial upstream support. I've been looking into supporting pre-faulting for CCA/KVM in the future, and I'm not aware of any architectural blockers. Are you aware of any potential blockers or limitations that might prevent us from supporting pre-faulting in the future, or is it simply being left out for now as an *optional* feature, as I assume? Thanks, Kohei