mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	"Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
	linux-coco@lists.linux.dev, kvmarm@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Marc Zyngier <maz@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Steven Price <steven.price@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Thomas Gleixner <tglx@kernel.org>, Will Deacon <will@kernel.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	"T.J. Mercier" <tjmercier@google.com>
Subject: Re: [PATCH v6 7/9] dma-buf: system_heap: Enforce shared-granule alignment for cc-shared buffers
Date: Mon, 21 Sep 2026 14:24:21 +0200	[thread overview]
Message-ID: <cd2b32dc-5a80-4ef5-82bc-dd41ea96dc01@amd.com> (raw)
In-Reply-To: <20260921121739.GM11599@ziepe.ca>

On 9/21/26 14:17, Jason Gunthorpe wrote:
...
>>>> That userspace provides this cc_shared flag is a NO-GO to begin
>>>> with.
>>>
>>> What do you mean? We discussed this with the heap maintainers and we
>>> all agreed this was a kind of heap just like any of the other kinds of
>>> heaps that userspace can request.
>>>
>>> It is *exactly* the "special allocation requirements" you are talking
>>> about above.
>>
>> I only see a fraction of the patch set (because no DMA-buf
>> maintainer was CCed) and to me it looked like the cc_shared flag was
>> added as an additional parameter to the allocation and not a
>> separate heap created.
> 
> ?
> 
> It was merged months ago, and you were CC'd:
> 
> https://lore.kernel.org/all/20260325192352.437608-1-jiri@resnulli.us/

Ah! I though the flag was added in this patch set.

> 
> It follows the design the dma heaps maintiners guided to create a new
> named heap:
> 
> +	exp_info.name = "system_cc_shared";
> +	exp_info.priv = &system_heap_cc_shared_priv;
> 
> Along side the normal heap:
> 
>  	exp_info.name = "system";
> 
> It is identical to "system" except the pages are "CC shared" meaning
> the hypervisor and every DMA device can access them.
> 
> This series is just adjusting the rules around how
> set_memory_decrypted() works. It isn't changing any uAPI or adding
> anything new to dmabuf heaps.

Yeah that was absolutely not clear to me since I only got added to this single patch.

I also don't see where mem_cc_shared_granule_size is added?

> Yes, it ends up as a flag in the internal code flow, that is just how
> it got coded..

In that case this is probably ok as it is.

Christian.

> 
> Jason


  reply	other threads:[~2026-09-21 12:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 10:34 [PATCH v6 0/9] coco: guest: Enforce host page-size alignment for shared buffers Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 1/9] mm/mem_encrypt: Add helpers for shared-buffer alignment Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 2/9] irqchip/gic-v3-its: Align shared ITS allocations to the CoCo shared granule size Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 3/9] dma-mapping: Pass allocation attrs to contiguous allocation helpers Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 4/9] dma-direct: Align CoCo shared DMA allocations to the shared granule size Aneesh Kumar K.V (Arm)
2026-09-18 14:16   ` Catalin Marinas
2026-09-04 10:34 ` [PATCH v6 5/9] swiotlb: Align shared IO TLB pools " Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 6/9] swiotlb: Reject misaligned restricted DMA pools for CoCo guests Aneesh Kumar K.V (Arm)
2026-09-04 10:34 ` [PATCH v6 7/9] dma-buf: system_heap: Enforce shared-granule alignment for cc-shared buffers Aneesh Kumar K.V (Arm)
2026-09-18 15:16   ` Catalin Marinas
2026-09-18 15:23     ` Christian König
2026-09-18 15:36       ` Jason Gunthorpe
2026-09-18 15:39         ` Christian König
2026-09-18 16:53           ` Jason Gunthorpe
2026-09-21  9:07             ` Christian König
2026-09-21 11:51               ` Jason Gunthorpe
2026-09-21 12:05                 ` Christian König
2026-09-21 12:17                   ` Jason Gunthorpe
2026-09-21 12:24                     ` Christian König [this message]
2026-09-21 12:37                       ` Jason Gunthorpe
2026-09-21 15:26                         ` Aneesh Kumar K.V
2026-09-19 14:57         ` Aneesh Kumar K.V
2026-09-19 21:35           ` Jason Gunthorpe
2026-09-20  7:24             ` Aneesh Kumar K.V
2026-09-21  6:57     ` Aneesh Kumar K.V
2026-09-04 10:34 ` [PATCH v6 8/9] arm64: realm: Add RHI helper to query IPA state change alignment Aneesh Kumar K.V (Arm)
2026-09-16 16:12   ` Suzuki K Poulose
2026-09-18 10:39     ` Aneesh Kumar K.V
2026-09-04 10:34 ` [PATCH v6 9/9] arm64: realm: Expose the CCA shared granule size through mem_encrypt ops Aneesh Kumar K.V (Arm)
2026-09-16 16:17   ` Suzuki K Poulose
2026-09-18 16:52 ` [PATCH v6 0/9] coco: guest: Enforce host page-size alignment for shared buffers Catalin Marinas
2026-09-18 16:57   ` Jason Gunthorpe
2026-09-18 17:10     ` Catalin Marinas

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=cd2b32dc-5a80-4ef5-82bc-dd41ea96dc01@amd.com \
    --to=christian.koenig@amd.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=maz@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steven.price@arm.com \
    --cc=sumit.semwal@linaro.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@kernel.org \
    --cc=tjmercier@google.com \
    --cc=will@kernel.org \
    /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®