The Linux Kernel Mailing List
 help / color / mirror / Atom feed
  • [parent not found: <20260427055509.898190-5-aneesh.kumar@kernel.org>]
  • * Re: [PATCH v3 0/9] dma-mapping: Use DMA_ATTR_CC_SHARED through direct, pool and swiotlb paths
           [not found] <20260427055509.898190-1-aneesh.kumar@kernel.org>
           [not found] ` <20260427055509.898190-3-aneesh.kumar@kernel.org>
           [not found] ` <20260427055509.898190-5-aneesh.kumar@kernel.org>
    @ 2026-05-08 17:28 ` Catalin Marinas
      2026-05-10  0:36   ` Jason Gunthorpe
                         ` (2 more replies)
      2 siblings, 3 replies; 9+ messages in thread
    From: Catalin Marinas @ 2026-05-08 17:28 UTC (permalink / raw)
      To: Aneesh Kumar K.V (Arm)
      Cc: iommu, linux-kernel, Robin Murphy, Marek Szyprowski, Will Deacon,
    	Marc Zyngier, Steven Price, Suzuki K Poulose, Jiri Pirko,
    	Jason Gunthorpe, Mostafa Saleh, Petr Tesarik,
    	Alexey Kardashevskiy, Dan Williams, Xu Yilun
    
    On Mon, Apr 27, 2026 at 11:25:00AM +0530, Aneesh Kumar K.V (Arm) wrote:
    > This series propagates DMA_ATTR_CC_SHARED through the dma-direct,
    > dma-pool, and swiotlb paths so that encrypted and decrypted DMA buffers
    > are handled consistently.
    
    I think this series makes sense, using DMA_ATTR_CC_SHARED throughout the
    DMA API, either for alloc or for streaming to decide/check what bouncing
    does. Sashiko has a few interesting reports, it probably breaks s390 as
    well (it might be similar to the pKVM case).
    
    I don't think it addresses earlier Mostafa's issues with pKVM, although
    I'd rather base additional pKVM related fixes on top of this series.
    With pKVM, cc_platform_has(CC_ATTR_MEM_ENCRYPT) returns false, as does
    force_dma_unencrypted(). I think we should update protected guests to
    return true for these if they need shared buffers (the whole
    decrypted/shared terminology is messy but in most places it just means
    buffer not private to the protected guest, whether encryption is
    available or not).
    
    That said, does CC_ATTR_GUEST_MEM_ENCRYPT actually make more sense than
    CC_ATTR_MEM_ENCRYPT throughout this series? We'd need to change arm64
    realms as well to use this one.
    
    -- 
    Catalin
    
    ^ permalink raw reply	[flat|nested] 9+ messages in thread

  • end of thread, other threads:[~2026-05-12 12:42 UTC | newest]
    
    Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20260427055509.898190-1-aneesh.kumar@kernel.org>
         [not found] ` <20260427055509.898190-3-aneesh.kumar@kernel.org>
    2026-05-08  9:26   ` [PATCH v3 2/9] dma-direct: use DMA_ATTR_CC_SHARED in alloc/free paths Catalin Marinas
    2026-05-11  5:38     ` Aneesh Kumar K.V
         [not found] ` <20260427055509.898190-5-aneesh.kumar@kernel.org>
    2026-05-08 16:49   ` [PATCH v3 4/9] dma: swiotlb: track pool encryption state and honor DMA_ATTR_CC_SHARED Catalin Marinas
    2026-05-11  5:14     ` Aneesh Kumar K.V
    2026-05-08 17:28 ` [PATCH v3 0/9] dma-mapping: Use DMA_ATTR_CC_SHARED through direct, pool and swiotlb paths Catalin Marinas
    2026-05-10  0:36   ` Jason Gunthorpe
    2026-05-11 11:13   ` Mostafa Saleh
    2026-05-12 12:42     ` Jason Gunthorpe
    2026-05-11 11:18   ` Aneesh Kumar K.V
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox