summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorAneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>2026-07-17 23:34:27 +0530
committerMarek Szyprowski <m.szyprowski@samsung.com>2026-07-31 08:40:58 +0200
commita6e40900f0c68884c76b7a3ca404d7d52b1791d3 (patch)
tree51b89faa3ae302c58d56de89dafdb38b9cae89e9 /include/trace
parentd4b9d593180c72cafa2f586379b99517f251e6bb (diff)
downloadlinux-a6e40900f0c68884c76b7a3ca404d7d52b1791d3.tar.gz
linux-a6e40900f0c68884c76b7a3ca404d7d52b1791d3.zip
dma-mapping: Add internal shared allocation attribute
DMA_ATTR_CC_SHARED describes an existing DMA mapping whose backing memory is already shared, or decrypted, for confidential computing. It is a mapping attribute: callers use it to request a shared DMA address encoding for memory that has already been prepared for shared DMA. Allocation paths need a related but different state. Once the DMA core decides that an allocation must use shared backing pages, the lower-level allocation helpers need to select shared pools, decrypt newly allocated pages, derive the DMA address with the shared-memory translation and restore encryption on free. That state is internal to the DMA-mapping implementation and should not be passed by drivers to dma_alloc_attrs(). Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org> Reviewed-by: Mostafa Saleh <smostafa@google.com> Link: https://lore.kernel.org/r/20260717180442.110954-10-aneesh.kumar@kernel.org Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/dma.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/trace/events/dma.h b/include/trace/events/dma.h
index 31c9ddf72c9d..9df02c1511de 100644
--- a/include/trace/events/dma.h
+++ b/include/trace/events/dma.h
@@ -35,7 +35,8 @@ TRACE_DEFINE_ENUM(DMA_NONE);
{ DMA_ATTR_MMIO, "MMIO" }, \
{ DMA_ATTR_DEBUGGING_IGNORE_CACHELINES, "CACHELINES_OVERLAP" }, \
{ DMA_ATTR_REQUIRE_COHERENT, "REQUIRE_COHERENT" }, \
- { DMA_ATTR_CC_SHARED, "CC_SHARED" })
+ { DMA_ATTR_CC_SHARED, "CC_SHARED" }, \
+ { __DMA_ATTR_ALLOC_CC_SHARED, "ALLOC_CC_SHARED" })
DECLARE_EVENT_CLASS(dma_map,
TP_PROTO(struct device *dev, phys_addr_t phys_addr, dma_addr_t dma_addr,