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

Re: [PATCH v3 11/16] x86/hyperlaunch: locate dom0 initrd with hyperlaunch


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Tue, 15 Apr 2025 12:59:09 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ExV+xGI3EJ/S5vot5B2WCL40GqYWjUIaIdeNRue2KKE=; b=o4dRwG/RITaURSYI1iPit9JviSlFX0LvDfFI+P5Ya5A1JdCpi3ys/RaWtg/w1iU/NK3ALwUWsHpmLtTL4Tx2UVj5557+klf+FK10p99rcCDZdeYsYZQUHfh728wFnavkmvgb67Wu6wf7U4OZvritlPpEVdWydd7wNys0OOGAbBv/VHTYVTNdmLfb6aM3iTndJPcGnPrwb7i1viag1wDLqhDE6eFiKReiQHW2ORX1ud19DqXCSnDzEnK4vhItOlBYUtlOPVGWp4orlYlv3dzjAQ2kQIVGQNWgKyzd0oIwmQpER8IP3Pja8jdse6Pn9IhowrVTD5xA0PKmWNm7S1MieQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q+cOAThzlMgPLwLDj5R98nURces2nP9lnRgUadspLAqX1PahgootI9p6A6io9VI0yse0A7fZlgFUFK1UGfx5GRCPR9oZwQQNxZQglcjnhnIg1TY8f1t1BwpHsiINe0vvQCardgS6GUI+p4h3GLtv/7PNLKIKdwaya+hT7jof05mbV3O+OoV8tJWPLPDpb1BdVDZwwA4OOs8R0yG2e0/YQghB9dv9fFzZd6LqY3lG5Rb4OvZClQFvOTfQMVM7h5BSTHvNtP1hV5yOxp2zUDQB24sag+S4+BRSi3jrMtbbDA/7rH98IR27ybgRsUtTANmKZskH4xzigF/8Y1VmsuYorg==
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 15 Apr 2025 11:59:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue Apr 15, 2025 at 7:17 AM BST, Jan Beulich wrote:
> On 14.04.2025 19:27, Alejandro Vallejo wrote:
>> On Mon Apr 14, 2025 at 6:06 PM BST, Alejandro Vallejo wrote:
>>> On Thu Apr 10, 2025 at 12:34 PM BST, Jan Beulich wrote:
>>>> On 08.04.2025 18:07, Alejandro Vallejo wrote:
>>>>
>>>>> +            printk("  ramdisk: boot module %d\n", idx);
>>>>> +            bi->mods[idx].type = BOOTMOD_RAMDISK;
>>>>> +            bd->module = &bi->mods[idx];
>>>>
>>>> The field's named "module" now, but that now ends up inconsistent with
>>>> naming used elsewhere, as is pretty noticeable here.
>>>
>>> Well, yes. It is confusing. Also, the DTB is called multiboot,ramdisk,
>>> because multiboot,module is already used to detect what nodes are
>>> expressed as multiboot,modules. I'm considering going back and calling
>>> them ramdisk again. If anything, to avoid the ambiguity between
>>> domain modules and multiboot modules. e.g: a kernel is a multiboot
>>> module, but not a domain module.
>> 
>> Particularly when misc/arm/device-tree/booting.txt already states that
>> the initrd for dom0 ought to be provided with the "multiboot,ramdisk"
>> string in the "compatible" prop.  Deviating from that is just going to
>> make it far more annoying to unify arm and x86 in the future.  And
>> calling those ramdisks anything but ramdisk internally is just plain
>> confusing (as evidenced in the current series).
>
> Yet the limitation of this is quite obvious: How would you express
> multiple such items?

With multiple such nodes.

  initrd1 {
      compatible = "multiboot,ramdisk", "multiboot,module"
      module-idx = <2>
  };
  initrd2 {
      compatible = "multiboot,ramdisk", "multiboot,module"
      module-idx = <3>
  };

as is done in dom0less. This is not a hypothetical, it's already
comitted.

> Have many "ramdisk"s?

As many as I require. If I was booting Xen(dom0+initrd) on
Xen(hyperlaunch), that'd be 2 (with Xen passed as the kernel).

> Even if some of them serve an entirely different purpose?

The purpose of a ramdisk/initrd is of no concern to the hypervisor. They are
specially crafted blobs consumed by kernels for purposes of bootstrap.

> See how Linux has gone to tuck together multiple CPIOs, as they can
> have only one thing called "ramdisk" (which, aiui, now no longer truly
> is).

That's an internal Linux matter. If they need 1, we'll pass 1. We do
need several such blobs, because some OSs do need them. Namely, Xen. And
AFAICS we call them modules mostly because (a) Xen does not have the
module infrastructure that Linux has, which would causes ambiguities and
(b) is typically loaded via multiboot, which does call each blob a
module.

>
>> So... how frontally opposed would you be to restoring the ramdisk
>> nomenclature? Also, for ease of rebasing future patches it'd be far
>> nicer to go back to ramdisk rather than reinventing some new name.
>
> Well, I fear I wouldn't ack such a patch. If everyone else agrees
> that "ramdisk" is the best of all names (or at least getting close),
> I'd perhaps mumble over, but let it go in.

Ok... When I send v4 I'll do so keeping the "module" rename. Meanwhile,
I'll try to think of some options. Calling Xen's modules and the booted
kernel modules the same way is just way too confusing.

I take it you have the same dislike for initrd as you do for ramdisk?

>
> (Only partly as a joke: If we dislike "module", how about "blob" or
> some such?)

Better not. Blob makes "kernel" sound like an adjective: Kernel blob.

There might be some other suitable word. I'll think about it.

Cheers,
Alejandro



 


Rackspace

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