From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.86 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795015240; b=5Y6KRCzwbcViFMS/RVgCquT9r7Y5j9gvslY2PQR8uFrsxDy4jYzopirw8uJkrSNkhxbK Ib+6LoUmJLZFWrrWrw+t7+9Jw6pIzLXS2Q9JuSgS3p+m9cKFfTDIlm1xtcxo2krFmJUaJ zV0GpiXByDA489kYBnUIFc0YoYd6hLAHrrHKPGPzOOCrVZzPbcmTACutEElZJS7Cy+W6U +VKuQ8wTv6OzIc0Jg8vtNhjy7F7L1WwtV2bjiGpa5qSr+1Odsnt8On2XnrB6hmCj5BMs5 zIX8Kx6P1ShMOz5mqENRJtpaNhLw/oXMEBSiaESdzMLTw0EIzntn6amwrVNQ1UqPjGw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795015240; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=oQ7/76fO2leskAhxJa0tMmqKEgvrv4+HDmHvOOSZhVQ=; b=Mr7laOdkBRT5EBQ7LQDBpbeg91qnPV7KtIyaq20YK0HICVU5DtkfeZlADmYyX8ezOg7+ IDlwvXdgnNupq7402v5mbvUb1r28zW9NpOxEqyRLDpPGZF7DFx/HGIwDFqon4v2Xn/J1N khwn/ZyfALPPsQLDw5CeMc9ljybVeRrIhihccG8WOsXgkEooU4nOGBzMONQXve+6tkdJc 9h2VugAWkwZFy5GevgUgRktd2pZDGxQCgJLbmMcdpEJpd8/X9BvUtdJfXy9G3DiwOMfHm Y0KHnctv61s4FnNnBnuEQeKFPbHAKS5z8oRntKIq6UuAXazhLFWLohFkr3cKww9EOJg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=SjwbzFPk; arc=none smtp.remote-ip=91.218.175.86 Received: from mta0.migadu.com (out-86.mta0.migadu.com [91.218.175.86]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC3F8606A31C for ; Wed, 18 Nov 2026 15:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CC3F8606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=SjwbzFPk X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=47gIjtTcGEzXpA6nYjzGeB64WTHu7X3hRByD7TlCFJY=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795015238; v=1; x=1795620038; b=SjwbzFPknTs+Hn3tb1UxiEarCGdkHpVTfQnFmIiPuTzjwJvwJDhFnAOPZ83uVwajM/rtvTKp WliARal8mTpNbfIUoDD69XQ2/IyEfNL/c55EXjk9GM6oSH7/AQvi7mT5uCbi5R3AnATBQvSwRY6 AwlmGkS4S70QusoKWEWChQds= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id c3287a313e6c4790; Wed, 18 Nov 2026 15:20:26 +0000 X-Mizu-Trace-ID: c3287a313e6c4790 X-Migadu-Flow: FLOW_OUT From: Fuad Tabba To: Marc Zyngier , Oliver Upton Cc: Will Deacon , Catalin Marinas , Joey Gouly , Mark Rutland , Suzuki K Poulose , Raghavendra Rao Ananta , Sascha Bischoff , Thomas Gleixner , Sebastian Ene , =?UTF-8?q?Bart=C5=82omiej=20Grzesik?= , Mostafa Saleh , Vincent Donnefort , Vladimir Murzin , Zenghui Yu , Zenghui Yu , Steffen Eiden , Radu Rendec , Fuad Tabba , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 13/13] Documentation: KVM: arm64: Describe the ITS hardening Date: Wed, 18 Nov 2026 15:19:04 +0000 Message-ID: <20261118151904.4099560-14-fuad.tabba@linux.dev> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118151904.4099560-1-fuad.tabba@linux.dev> References: <20261118151904.4099560-1-fuad.tabba@linux.dev> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Describe in pkvm.rst why the hypervisor emulates the host's ITS, and how protected mode differs from non-protected mode as a result. Signed-off-by: Fuad Tabba --- Documentation/virt/kvm/arm/pkvm.rst | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/virt/kvm/arm/pkvm.rst b/Documentation/virt/kvm/arm/pkvm.rst index b75bb8ad6f26d..c1b1b8089ff72 100644 --- a/Documentation/virt/kvm/arm/pkvm.rst +++ b/Documentation/virt/kvm/arm/pkvm.rst @@ -89,6 +89,40 @@ DMA isolation using an IOMMU Status: **Unimplemented.** +GICv3 ITS hardening +------------------- + +Status: Host accesses to the ITS control registers are trapped and +emulated by the hypervisor. The LPI configuration and pending tables +remain under host control. + +The ITS reads and writes memory at addresses programmed by the host, so +the hypervisor emulates the ITS control registers and command queue to +ensure that the host cannot point the ITS command queue or tables at +hypervisor or pVM memory. The hypervisor owns the command queue and +the ITS tables for as long as the ITS can access them, and it owns each +device's interrupt translation table from the device's first mapping +onwards. + +This gives rise to some user-visible differences when compared to +non-protected mode: + +* Protected mode requires the hypervisor to take control of every ITS + that the host uses. KVM does not initialise with more than 8 ITSes, and + if the takeover fails the host is not deprivileged and + ``KVM_CREATE_VM`` returns ``-ENODEV``. +* An ITS command or register access that the hypervisor rejects is + delivered to the host as a data abort. +* The number of device IDs used through each ITS since boot is limited + by the hypervisor, and MSI allocation fails with ``-ENOMEM`` beyond + that limit. +* Interrupt translation tables are page-aligned and are not freed when + a device is removed, so each device ID used since boot holds at least + one page. +* GICv4 is disabled. Direct injection of LPIs is not available to + non-protected guests, and restoring a guest migrated from a host with + ``GICD_TYPER2.nASSGIcap`` set fails with ``-EINVAL``. + Proxying of Trustzone services ------------------------------ -- 2.47.3