All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Ankit Soni <Ankit.Soni@amd.com>
Cc: iommu@lists.linux.dev, joro@8bytes.org, will@kernel.org,
	jgg@nvidia.com, suravee.suthikulpanit@amd.com,
	vasant.hegde@amd.com, robin.murphy@arm.com,
	joao.m.martins@oracle.com, alejandro.j.jimenez@oracle.com,
	pasha.tatashin@soleen.com, pratyush@kernel.org,
	skhawaja@google.com, praan@google.com, baolu.lu@linux.intel.com,
	dwmw2@infradead.org, kevin.tian@intel.com, dmatlack@google.com,
	vipinsh@google.com, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/7] liveupdate: parse the incoming handover tree before late_time_init()
Date: Thu, 8 Oct 2026 09:59:40 +0200	[thread overview]
Message-ID: <asdNbLNz7zPaQYXX@kernel.org> (raw)
In-Reply-To: <20261005064018.1558-3-Ankit.Soni@amd.com>

Hi,

On Mon, Oct 05, 2026 at 06:40:12AM +0000, Ankit Soni wrote:
> LUO parses the handover tree from an early_initcall, which runs inside
> rest_init() -- the last statement of start_kernel(). Anything earlier in
> start_kernel() cannot see the incoming state, and cannot tell that it
> cannot see it: luo_flb_retrieve_one() returns -ENODATA both before the
> parse and when the previous kernel handed nothing over.
> 
> On x86 the IOMMU is such a consumer, because it is also the interrupt
> remapping provider. amd_iommu_prepare() runs from late_time_init() via
> enable_IR_x2apic() -> irq_remapping_prepare(), and reaches
> init_iommu_one_late() long before any initcall.
> 
> Fix the ordering rather than teaching each consumer to cope. Call the
> parse directly from start_kernel(), immediately before late_time_init().

Why do you suggest to call it exactly here?
Order of the calls in start_kernel() is quite sensitive and placing a call
in a certain place needs more elaborate explanation.

> Rename it to liveupdate_init_early() at the same time, since
> liveupdate_early_init() was named after the early_initcall that no longer
> exists.

No strong feeling about this, but we do have other _early_init() functions
unrelated to initcalls.
 
> Signed-off-by: Ankit Soni <Ankit.Soni@amd.com>
> ---
>  include/linux/liveupdate.h   | 4 ++++
>  init/main.c                  | 2 ++
>  kernel/liveupdate/luo_core.c | 5 +----
>  3 files changed, 7 insertions(+), 4 deletions(-)

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2026-10-08  7:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05  6:40 [RFC PATCH 0/7] iommu/amd: Implement live update state preservation Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 1/7] iommu/amd: defer device attach only on a kdump boot Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 2/7] liveupdate: parse the incoming handover tree before late_time_init() Ankit Soni
2026-10-08  7:59   ` Mike Rapoport [this message]
2026-10-09 13:58     ` Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 3/7] iommu/kho/abi: add AMD IOMMU live-update serialisation structs Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 4/7] iommu/amd: preserve IOMMU and device state for live update Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 5/7] iommu/amd: clear unpreserved DTEs and quiesce logs at live-update shutdown Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 6/7] iommu/amd: restore preserved state on a live-update boot Ankit Soni
2026-10-05  6:40 ` [RFC PATCH 7/7] iommu/amd: reattach preserved devices to their restored domains Ankit Soni

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=asdNbLNz7zPaQYXX@kernel.org \
    --to=rppt@kernel.org \
    --cc=Ankit.Soni@amd.com \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=praan@google.com \
    --cc=pratyush@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=skhawaja@google.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=vasant.hegde@amd.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.