All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samiullah Khawaja <skhawaja@google.com>
To: Dongli Zhang <dongli.zhang@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	 Lu Baolu <baolu.lu@linux.intel.com>,
	Will Deacon <will@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	 Ankit Soni <Ankit.Soni@amd.com>,
	Robin Murphy <robin.murphy@arm.com>,
	 Kevin Tian <kevin.tian@intel.com>,
	Alex Williamson <alex@shazbot.org>,
	 Shuah Khan <shuah@kernel.org>,
	iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
	 kvm@vger.kernel.org, Pratyush Yadav <pratyush@kernel.org>,
	 Pasha Tatashin <pasha.tatashin@soleen.com>,
	David Matlack <dmatlack@google.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Pranjal Shrivastava <praan@google.com>,
	 Vipin Sharma <vipinsh@google.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	 John Starks <dev@jstarks.net>
Subject: Re: [PATCH v8 04/18] iommupt: Implement preserve/unpreserve/restore callbacks
Date: Wed, 2 Dec 2026 21:51:21 +0000	[thread overview]
Message-ID: <axCRQUmx4Y1_g88s@google.com> (raw)
In-Reply-To: <7bbf2c5f-b938-4ab7-ac9b-2d2e8726488f@oracle.com>

On Mon, Nov 30, 2026 at 09:06:10AM -0800, Dongli Zhang wrote:
>
>
>On Sun, Nov 22, 2026 8:49:35PM -0800, Samiullah Khawaja wrote:
>> Add iommupt ops for preservation, unpreservation and restoration of iommu
>> page tables for liveupdate. Use the existing page walker to preserve the
>> ioptdesc of the top_table and the lower tables.
>>
>> Preserve top_level, VASZ and FEAT Sign Extended to restore the domain in
>> the next kernel. On restore, the domain has only the preserved features
>> enabled and all the other features are zeroed. This is ok since the
>> restored domain is made immutable and can only be freed. A kunit test is
>
>Can I ask a basic design question?
>
>Would you mind helping me confirm that the plan is not to reuse the preserved
>DMA tables long term after kexec?
>
>So the DMA tables are preserved and used during kexec and until the new DMA
>tables are available?

Yes this is correct.
>
>Based on the LPC 2025 talk, can I assume the plan is not to reuse the old DMA
>tables long term, but to put more effort into replacing them quickly?
>
>https://lpc.events/event/19/contributions/2046/
>
>Taking a VM as an example, that means the below?
>
>1. Preserve the old tables.
>2. Run kexec.
>3. Use the old tables until the new VM is set up.
>4. Build the new tables.
>5. Quickly switch to the new tables.

Yes the steps you mentioned are correct. I sent out an RFC for replacing
these tables in a hitless way:
https://lore.kernel.org/all/20260925011308.3381953-1-skhawaja@google.com/

Thanks,
Sami


  reply	other threads:[~2026-12-02 21:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  4:49 [PATCH v8 00/18] iommu: Add live update state preservation Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 01/18] liveupdate: Export symbols needed by modules Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 02/18] iommu: Implement IOMMU Live update FLB callbacks Samiullah Khawaja
2026-11-30 10:28   ` Ankit Soni
2026-11-30 18:40   ` Pranjal Shrivastava
2026-11-30 18:47     ` Pranjal Shrivastava
2026-12-02 21:34       ` Samiullah Khawaja
2026-12-01 22:04     ` Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 03/18] iommu/pages: Add APIs to preserve/unpreserve/restore iommu pages Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 04/18] iommupt: Implement preserve/unpreserve/restore callbacks Samiullah Khawaja
2026-11-30 17:06   ` Dongli Zhang
2026-12-02 21:51     ` Samiullah Khawaja [this message]
2026-12-02 19:08   ` Pranjal Shrivastava
2026-11-23  4:49 ` [PATCH v8 05/18] iommu: Implement IOMMU domain preservation Samiullah Khawaja
2026-11-24  5:23   ` Ankit Soni
2026-11-24 17:40     ` Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 06/18] iommu: Implement device and IOMMU HW preservation Samiullah Khawaja
2026-11-24  4:29   ` Ankit Soni
2026-11-24 17:40     ` Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 07/18] iommu/vt-d: Implement device and iommu preserve/unpreserve ops Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 08/18] iommu/vt-d: Clear unpreserved context entries during shutdown Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 09/18] iommu: Add APIs to get iommu and device restored state Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 10/18] iommu/vt-d: Combine disable_dmar_iommu() and free_dmar_iommu() Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 11/18] iommu/vt-d: Restore IOMMU state and reclaimed domain ids Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 12/18] iommu/vt-d: Preserve PASID table of preserved device Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 13/18] iommu: Restore and reattach preserved domains to devices Samiullah Khawaja
2026-11-23  5:18   ` sashiko-bot
2026-11-23  4:49 ` [PATCH v8 14/18] iommu/vt-d: Handle reattach of the restored domain Samiullah Khawaja
2026-11-23  5:03   ` sashiko-bot
2026-11-23  4:49 ` [PATCH v8 15/18] iommufd: Implement ioctl to mark HWPT for preservation Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 16/18] iommufd: Persist iommu hardware pagetables for live update Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 17/18] iommufd: Add APIs to preserve/unpreserve a vfio cdev Samiullah Khawaja
2026-11-23  4:49 ` [PATCH v8 18/18] iommufd/selftest: Add test to verify iommufd preservation Samiullah Khawaja
2026-11-23  5:11   ` sashiko-bot

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=axCRQUmx4Y1_g88s@google.com \
    --to=skhawaja@google.com \
    --cc=Ankit.Soni@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@shazbot.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=dev@jstarks.net \
    --cc=dmatlack@google.com \
    --cc=dongli.zhang@oracle.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=praan@google.com \
    --cc=pratyush@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=shuah@kernel.org \
    --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.