patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: "José Pekkarinen" <jose.pekkarinen@unikie.com>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH 1/2] host/rootfs: use initramfs in "make run"
Date: Thu, 08 Sep 2022 11:30:35 +0000	[thread overview]
Message-ID: <87sfl29k84.fsf@alyssa.is> (raw)
In-Reply-To: <CAJPV9MqJY+YPzc5Jc7OwmfngG74N9F7D2PTRVGvweGnYcR2J3w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3305 bytes --]

José Pekkarinen <jose.pekkarinen@unikie.com> writes:

> On Thu, Sep 8, 2022 at 1:52 PM Alyssa Ross <hi@alyssa.is> wrote:
>
>> José Pekkarinen <jose.pekkarinen@unikie.com> writes:
>>
>> > On Thu, Sep 1, 2022 at 1:47 PM Alyssa Ross <hi@alyssa.is> wrote:
>> >
>> >> This will allow us to stop compiling e.g. the virtio-blk module into
>> >> the kernel, because it will be loaded by the initramfs.
>> >>
>> >> This introduces some duplication between the rootfs and initramfs's
>> >> Makefiles.  I don't think it's worth the effort at the moment to try
>> >> to reduce that, because it would come at the expense of additional
>> >> complexity in the Makefiles.  We can revisit this later if we want to.
>> >>
>> >> Signed-off-by: Alyssa Ross <hi@alyssa.is>
>> >
>> > Hi,
>> >
>> > This patchset introduces errors in the default qemu
>> >
>> > configuration of spectrum, where it is possible to see in the
>> > console log attempts to load broken aliases like:
>> >
>> > modprobe: FATAL: Module acpi:PNP0C0F: not found in directory
>> > /lib/modules/5.18.0
>>
>> This is pretty much expected.  The only job of the initramfs is to get
>> the root filesystem mounted, so most kernel modules are not included in
>> it to keep the size down.  It just contains modules related to block
>> devices, dm-verity, ext4, etc.  If a we try to load a driver in
>> initramfs, and it isn't available, that's fine, because when we get to
>> the root filesystem, we run mdevd-coldplug again, and the module will be
>> loaded at that point.
>>
>> The reason this didn't happen before when testing Spectrum in a VM is
>> that since all the drivers we needed were built in to the kernel, the
>> the block device nodes would be available before userspace even started,
>> meaning that the initramfs simply wouldn't have any time to try and fail
>> loading any other drivers before the rootfs was ready.  On hardware,
>> where the appropriate drivers wouldn't have been built in, I assume
>> these messages would already have been normal without this change,
>> although I didn't test.
>>
>> > As well as valid modules load failures like:
>> >
>> > modprobe: ERROR: could not insert 'vfio_pci': Invalid argument
>>
>> I wasn't able to reproduce this, with this series applied on top of
>> commit c0b9dff8653b59f5d2a24bb539cba6c91d3f7506,
>> Nixpkgs commit 4d05083dd894b73941e2e7d3b4f428b0ce1c7007, running
>> Spectrum with `make run' in the host/rootfs directory.  I started netvm
>> and verified that the QEMU ethernet device was successfully passed
>> through as well, so vfio-pci was definitely working.
>>
>> Does that differ to the versions you were using to test?  If so, could
>> you try with those versions and let me know if that works for you?
>>
>
> Yes, I was living in b01594b2c089ce2434dacddccf9a285af7334d24,
>
> right version on nixpkgs. Rebasing on upstream main solved the issue.
>
> Thanks!

Awesome!  If it's now working for you, want to send me some Tested-by:
lines for the patches you've tested, so they can be recorded in the
commit log?  (Just reply to the patches you've tested with "Tested-by:
José Pekkarinen <jose.pekkarinen@unikie.com>" on a line on its own, and
then it'll be automatically picked up when I apply the patches.)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2022-09-08 11:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01 10:46 [PATCH 1/2] host/rootfs: use initramfs in "make run" Alyssa Ross
2022-09-01 10:46 ` [PATCH 2/2] host/rootfs: remove kernel override Alyssa Ross
2022-09-08 11:41   ` José Pekkarinen
2022-09-08 12:09   ` Alyssa Ross
2022-09-05  7:49 ` [PATCH 1/2] host/rootfs: use initramfs in "make run" José Pekkarinen
2022-09-08 10:52   ` Alyssa Ross
2022-09-08 11:12     ` José Pekkarinen
2022-09-08 11:30       ` Alyssa Ross [this message]
2022-09-08 11:40 ` José Pekkarinen
2022-09-08 12:09 ` Alyssa Ross

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=87sfl29k84.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=devel@spectrum-os.org \
    --cc=jose.pekkarinen@unikie.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.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).