From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C96D63A7F5E for ; Fri, 1 May 2026 11:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777634439; cv=none; b=Bofp6qiFgBqku+sRYtRjr7/5nMfv49zvAC/rKTIXmFXWpVIkkJ6h8g9z0hg7CjT4UPCOX1j1WhcQ7gZhznBN6bgTgDdJeLNbNaGDEeM1Wor91yFCpTfOeMlvMCoV60TgQnIolPwdICoikbTPFba+ecTWxs/ASw8omCAa+qarevk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777634439; c=relaxed/simple; bh=hDWBK5NoJKy+6Kx7m6iUjizTKOjBwxg/U8Mh0br2RZY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VcAcPslipsKSAF0WBGdFdfz8C1J9ymGcR6gonklXPQxZxw8XAYGYuGmpELkOUXcjxmaH9PR4AVq6iohO6oM8rgdmAz+8OsbKpBWgwYto2uN3+6mFOnk++qjlKn2HoNmh+CQ49vkEJtYIGilOkb89YaR0aB/deWal7cMyxxeKA04= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--smostafa.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=v34sG9AW; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--smostafa.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="v34sG9AW" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-48a5523fd53so8377275e9.3 for ; Fri, 01 May 2026 04:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777634436; x=1778239236; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=vwSpZfMSAme8K1/Tu2WzVQA/LKpXv4XDkU/OYSLP8lY=; b=v34sG9AWSMziAr9If+EIs9W35Yqw+0S7iSiNv/AwuraTIkL3cMbWrC4br/0rfZZxSU waohtGOMDUnZr1FHwSQdCXbFUgD86IbOEEmvPSC5Z/MTpgeGvIPSTZ1A6K8ugCp8PzRl B2ATmC/HN1Et5nS6Si3YvUCr0ilOodpTARcq/o6RICcVPlqHzdFUwCZlkXjpy1AyPgRC rEzRIKMUTQb5Uhe+IUTpZQSMGAsqIDaBNuy2qVLdJxpWtBNqmMUgxJf0tGWTkyuh+wXH ro94qN3c8ReZEplSJl7/rsVyxVaKdPv+jDdjOuIVdZSjWB5cWjYJHLVW2q0WBk8JKTO3 REpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777634436; x=1778239236; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vwSpZfMSAme8K1/Tu2WzVQA/LKpXv4XDkU/OYSLP8lY=; b=gVkGDUFSy4wj8ndJQVJkns5+bXsabnJi+hw+/54Tn2kCiZ8RQTjIaJXCYhBEPu+3Eq CoLdxxmV8ClKBe6PkBTRJjSaecKMWJiDYUPVxhWCCKrj/xUZw5Py23G1kSTSDpl4Ihtv b8IQOKOmabYX9SJrcvlvvfFaGH5GDZKETZIsMVepHRfp1dOOj6rHEzJMEAGfkV+YYSdi oOQRHSCsSBm1TSe228gKi3oYOvaTwhRyAi4GfWfQVWkBEQqXoua0Ts5AEj7mPl1jazmN Mopoy+T+75QgydNMpfyUi/vIr9ijzKJ+h4SWmWSMjbnFm5h0eNKAoyLO6u0f8NQREswD BDhg== X-Forwarded-Encrypted: i=1; AFNElJ8SNL02+jSqUDh6mRWsXjrYWU2Fa+V4Uzg/f3TyFruHV2ALhlFEB5KQs9GblHaBx1nb8WW0iy1dgReUSyY=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+6vPVR9k4lzCtq55QsWtxFsZE/jKP6uDf+XXH6FTOYz1UqSet +DSRfYCHB5ppMTA+eyFYFhvwl40Gwkv2nLbeYV+dU+G2Li8RI8V5asffhV37mWkli4lDMhtM6dm /V7uyhLVjqPNJ1Q== X-Received: from wmbjn2.prod.google.com ([2002:a05:600c:6b02:b0:489:d74d:f20]) (user=smostafa job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:64cd:b0:487:243f:dc3e with SMTP id 5b1f17b1804b1-48a83d6e17cmr115589325e9.6.1777634436116; Fri, 01 May 2026 04:20:36 -0700 (PDT) Date: Fri, 1 May 2026 11:19:27 +0000 In-Reply-To: <20260501111928.259252-1-smostafa@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260501111928.259252-1-smostafa@google.com> X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260501111928.259252-26-smostafa@google.com> Subject: [PATCH v6 25/25] KVM: arm64: Add documentation for pKVM DMA isolation From: Mostafa Saleh To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, iommu@lists.linux.dev Cc: catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, joro@8bytes.org, jean-philippe@linaro.org, jgg@ziepe.ca, mark.rutland@arm.com, qperret@google.com, tabba@google.com, vdonnefort@google.com, sebastianene@google.com, keirf@google.com, Mostafa Saleh Content-Type: text/plain; charset="UTF-8" Populate the section for DMA isolation in pKVM with the newly added KVM IOMMU and pKVM SMMUv3 driver details. Signed-off-by: Mostafa Saleh --- Documentation/virt/kvm/arm/pkvm.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/virt/kvm/arm/pkvm.rst b/Documentation/virt/kvm/arm/pkvm.rst index 514992a79a83..46e5c553646b 100644 --- a/Documentation/virt/kvm/arm/pkvm.rst +++ b/Documentation/virt/kvm/arm/pkvm.rst @@ -77,7 +77,24 @@ Status: **Unimplemented.** DMA isolation using an IOMMU ---------------------------- -Status: **Unimplemented.** +Status: Supported for devices behind SMMUv3 supporting dual stages +of translation. + +With ``CONFIG_ARM_SMMU_V3_PKVM``, the hypervisor will take over the SMMUs +on the system and provide an architectural emulation to the kernel SMMUv3 +driver transparently. + +If some devices are not behind an IOMMU or behind another IOMMU architecture, +DMA isolation is not supported, as a driver must be provided for that. + +DMA isolation is enforced by dual stage of translation; similar to the CPU +where a driver can register their ops through ``kvm_iommu_register_driver`` +and implement ``host_stage2_idmap`` to shadow the CPU page table. + +This implementation trusts the systems firmware not to allow the untrusted +host kernel to bypass the SMMUv3. +For example by resetting the power. In that case, it is the firmware +responsibility to save/restore the SMMUv3 state. Proxying of Trustzone services ------------------------------ -- 2.54.0.545.g6539524ca2-goog