From: Jason Gunthorpe <jgg@nvidia.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>
Subject: Re: [PATCH V3 3/4] iommufd: Add IOMMU_IOAS_CHANGE_PROCESS
Date: Thu, 7 Nov 2024 16:25:22 -0400 [thread overview]
Message-ID: <20241107202522.GF539304@nvidia.com> (raw)
In-Reply-To: <1728321203-189608-4-git-send-email-steven.sistare@oracle.com>
On Mon, Oct 07, 2024 at 10:13:22AM -0700, Steve Sistare wrote:
> Add an ioctl that updates all DMA mappings to reflect the current process,
> Change the mm and transfer locked memory accounting from old to current mm.
> This will be used for live update, allowing an old process to hand the
> iommufd device descriptor to a new process. The new process calls the
> ioctl.
>
> IOMMU_IOAS_CHANGE_PROCESS only supports DMA mappings created with
> IOMMU_IOAS_MAP_FILE, because the kernel metadata for such mappings does
> not depend on the userland VA of the pages (which is different in the new
> process).
> IOMMU_IOAS_CHANGE_PROCESS fails if other types of mappings are present.
>
> This is a revised version of code originally provided by Jason.
>
> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
> drivers/iommu/iommufd/io_pagetable.h | 1 +
> drivers/iommu/iommufd/ioas.c | 142 ++++++++++++++++++++++++++++++++
> drivers/iommu/iommufd/iommufd_private.h | 1 +
> drivers/iommu/iommufd/main.c | 2 +
> include/uapi/linux/iommufd.h | 23 ++++++
> 5 files changed, 169 insertions(+)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2024-11-07 20:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 17:13 [PATCH V3 0/4] iommufd live update Steve Sistare
2024-10-07 17:13 ` [PATCH V3 1/4] iommufd: Export do_update_pinned Steve Sistare
2024-10-07 17:13 ` [PATCH V3 2/4] iommufd: Lock all objects Steve Sistare
2024-11-07 20:23 ` Jason Gunthorpe
2024-10-07 17:13 ` [PATCH V3 3/4] iommufd: Add IOMMU_IOAS_CHANGE_PROCESS Steve Sistare
2024-11-06 18:08 ` Jason Gunthorpe
2024-11-06 18:55 ` Steven Sistare
2024-11-07 20:25 ` Jason Gunthorpe [this message]
2024-10-07 17:13 ` [PATCH V3 4/4] iommufd: IOMMU_IOAS_CHANGE_PROCESS selftest Steve Sistare
2024-11-07 20:26 ` Jason Gunthorpe
2024-11-07 20:47 ` Steven Sistare
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=20241107202522.GF539304@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=kevin.tian@intel.com \
--cc=steven.sistare@oracle.com \
/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