[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/12] x86/boot: eliminate module_map


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 6 Nov 2024 10:14:13 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730906056; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Woo7u0NI4cUUtonYX/cO6RK325mjxb/ZfHTPVVOKLvg=; b=e2HQwdDIfRC90eGb7q9EARDAKvGj9q7NsnHaHZNpJ7AyXxTtkeHEgUm4q/9poLBNc6GpgDZqXfdfLtA9NJLkJPVm5ofFVabVSBlzDxvBgmBGZnw8gvR8wuKrjOphUqXyHjxWvIZq/t66IEODgXxomCEUiUIwGLqV9B6mYqIvePA=
  • Arc-seal: i=1; a=rsa-sha256; t=1730906056; cv=none; d=zohomail.com; s=zohoarc; b=ajOBBlmPpdiPMi4H+uFe75d8YpjPkn5PHh0LtqoZyVBj+U+DRQw1SnOE9kY0Xq51ZzqCMpvn2RndFGTKWaL7tKEHQpxtGatEHb80VUaZ3U1wiHSQXmdA8p5Vpqlpz+dAiMwq9lLZ9gyHMtBhgtMqBB+iLKa/utVJ2ImAbm0PZlM=
  • Cc: jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 06 Nov 2024 15:14:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/6/24 09:55, Andrew Cooper wrote:
On 06/11/2024 2:50 pm, Daniel P. Smith wrote:
On 11/6/24 09:34, Andrew Cooper wrote:
However, despite looking at this many times, I've only just realised...
This semantically changes things in a direction that we won't want.

Today, BOOTMOD_RAMDISK only happens a side effect of being "first
BOOTMOD_UNKNOWN standing at the end".

But the EFI boot code ought to set bi->type=RAMDISK explicitly from the
ramdisk= argument (it can probably set type=MICROCODE too), and future
plans with a large HL config probably will be similar.

Anything which sets type=, and type=RAMDISK in particular, prior to
early_microcode_load() excludes it from the search.  This is definitely
not what we want.


It's a latent bug for now, but I'd suggest keeping the plain for
loop, with

              /* Search anything unclaimed or likely to be a CPIO
archive. */
              if ( bm->type != BOOTMOD_UNKNOWN &&
                   bm->type != BOOTMOD_RAMDISK )
                  continue;

as the selection criteria.  Probably also want to start from idx=0 to
remove assumptions about the dom0 kernel.

Thoughts?

Yah, as much as it would be nice to use the helper, this is the
exception where there is a complex match condition to be handled. This
will be switched over to an explicit for loop.

This is simple enough, and I'm happy to fix this all up on commit.  Save
it going around the loop yet again.

No objection on my part, as I was just going to make the changes as you suggested.

v/r,
dps



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.