mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fuad Tabba <fuad.tabba@linux.dev>
To: Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>
Cc: "Will Deacon" <will@kernel.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Joey Gouly" <joey.gouly@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Suzuki K Poulose" <suzuki.poulose@arm.com>,
	"Raghavendra Rao Ananta" <rananta@google.com>,
	"Sascha Bischoff" <Sascha.Bischoff@arm.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Sebastian Ene" <sebastianene@google.com>,
	"Bartłomiej Grzesik" <bgrzesik@google.com>,
	"Mostafa Saleh" <smostafa@google.com>,
	"Vincent Donnefort" <vdonnefort@google.com>,
	"Vladimir Murzin" <vladimir.murzin@arm.com>,
	"Zenghui Yu" <yuzenghui@huawei.com>,
	"Zenghui Yu" <zenghui.yu@linux.dev>,
	"Steffen Eiden" <seiden@linux.ibm.com>,
	"Radu Rendec" <radu@rendec.net>, "Fuad Tabba" <tabba@google.com>,
	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	[thread overview]
Message-ID: <20261118151904.4099560-14-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261118151904.4099560-1-fuad.tabba@linux.dev>

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 <fuad.tabba@linux.dev>
---
 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


      parent reply	other threads:[~2026-11-18 15:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 15:18 [PATCH v4 00/13] KVM: ITS hardening for pKVM Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 01/13] KVM: arm64: Donate MMIO to the hypervisor Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 02/13] KVM: arm64: Take host-registered MMIO regions at pKVM finalisation Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 03/13] irqchip/gic-v3: Disable GICv4 features in pKVM Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 04/13] irqchip/gic-v3-its: Page-align ITT allocations " Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 05/13] irqchip/gic-v3-its: Compute the wait target under the ITS lock Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 06/13] KVM: arm64: Share the ITS command field accessors with the hypervisor Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 07/13] KVM: arm64: Deprivilege the host under stop_machine() Fuad Tabba
2026-11-18 15:18 ` [PATCH v4 08/13] irqchip/gic-v3-its: Add the pKVM takeover entry points Fuad Tabba
2026-11-18 15:19 ` [PATCH v4 09/13] KVM: arm64: Emulate the ITS command queue Fuad Tabba
2026-11-18 15:19 ` [PATCH v4 10/13] KVM: arm64: Take the ITS tables and restrict GITS_BASER<n> Fuad Tabba
2026-11-18 15:19 ` [PATCH v4 11/13] KVM: arm64: Take the ITT of every device the host maps Fuad Tabba
2026-11-18 15:19 ` [PATCH v4 12/13] KVM: arm64: Reject ITS commands whose IDs are out of range Fuad Tabba
2026-11-18 15:19 ` Fuad Tabba [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118151904.4099560-14-fuad.tabba@linux.dev \
    --to=fuad.tabba@linux.dev \
    --cc=Sascha.Bischoff@arm.com \
    --cc=bgrzesik@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=radu@rendec.net \
    --cc=rananta@google.com \
    --cc=sebastianene@google.com \
    --cc=seiden@linux.ibm.com \
    --cc=smostafa@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=tglx@kernel.org \
    --cc=vdonnefort@google.com \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    --cc=zenghui.yu@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®