All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pranjal Shrivastava <praan@google.com>
To: Samiullah Khawaja <skhawaja@google.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Will Deacon <will@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Mike Rapoport <rppt@kernel.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	Alexander Graf <graf@amazon.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Kevin Tian <kevin.tian@intel.com>,
	iommu@lists.linux.dev, kexec@lists.infradead.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	David Matlack <dmatlack@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vipin Sharma <vipinsh@google.com>
Subject: Re: [RFC PATCH 1/4] dma: Add DMA allocation preservation KHO ABI
Date: Mon, 8 Jun 2026 17:53:43 +0000	[thread overview]
Message-ID: <aicBp4tSyzyYBnzn@google.com> (raw)
In-Reply-To: <20260505002737.2213734-2-skhawaja@google.com>

On Tue, May 05, 2026 at 12:27:34AM +0000, Samiullah Khawaja wrote:
> The DMA allocations can be backed by a variety of allocators. Add KHO
> ABI for the preservation of contiguous allocations that are done through
> dma-direct.
> 
> Signed-off-by: Samiullah Khawaja <skhawaja@google.com>
> ---
>  include/linux/kho/abi/dma_alloc.h | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 include/linux/kho/abi/dma_alloc.h
> 
> diff --git a/include/linux/kho/abi/dma_alloc.h b/include/linux/kho/abi/dma_alloc.h
> new file mode 100644
> index 000000000000..46e61db81abe
> --- /dev/null
> +++ b/include/linux/kho/abi/dma_alloc.h
> @@ -0,0 +1,30 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_KHO_ABI_DMA_ALLOC_H
> +#define _LINUX_KHO_ABI_DMA_ALLOC_H
> +
> +#include <linux/types.h>
> +
> +/**
> + * DOC: DMA Alloc ABI
> + *
> + * This header defines the structures used to serialize the state of DMA
> + * allocations, done by device driver, across a Live Update.
> + *
> + * Only DMA allocations done through dma-direct that are contiguous and
> + * allocated using alloc_page are supported.
> + */
> +
> +/**
> + * struct dma_alloc_ser - Serialized state of a single DMA allocation
> + * @page_phys: Physical address of the preserved pages
> + * @size: Size of the DMA allocation
> + * @force_decrypted: Whether the memory is force decrypted in previous kernel
> + */
> +struct dma_alloc_ser {
> +	u64 page_phys;
> +	u64 size;
> +	u8 force_decrypted;

Should we also stope attrs in this ser state here? There might be flags
like DMA_ATTR_NO_KERNEL_MAPPING which would need to be preserved across
a kexec? 

> +	u8 padding[7];
> +} __packed;
> +
> +#endif /* _LINUX_KHO_ABI_DMA_ALLOC_H */
> -- 
> 2.54.0.545.g6539524ca2-goog
> 

Thanks,
Praan


  reply	other threads:[~2026-06-08 17:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  0:27 [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations Samiullah Khawaja
2026-05-05  0:27 ` [RFC PATCH 1/4] dma: Add DMA allocation preservation KHO ABI Samiullah Khawaja
2026-06-08 17:53   ` Pranjal Shrivastava [this message]
2026-05-05  0:27 ` [RFC PATCH 2/4] dma/pool: Add an API to check if DMA allocation is from pool Samiullah Khawaja
2026-06-08 18:10   ` Pranjal Shrivastava
2026-05-05  0:27 ` [RFC PATCH 3/4] dma-direct: Add API to preserve/restore allocations Samiullah Khawaja
2026-06-01 12:35   ` Will Deacon
2026-06-02 20:14     ` Samiullah Khawaja
2026-06-08 19:55   ` Pranjal Shrivastava
2026-05-05  0:27 ` [RFC PATCH 4/4] dma-mapping: Add API to preserve/restore DMA allocation Samiullah Khawaja

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=aicBp4tSyzyYBnzn@google.com \
    --to=praan@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmatlack@google.com \
    --cc=graf@amazon.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=kevin.tian@intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rppt@kernel.org \
    --cc=skhawaja@google.com \
    --cc=vipinsh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.