On Thu, Sep 8, 2022 at 1:52 PM Alyssa Ross wrote: > José Pekkarinen writes: > > > On Thu, Sep 1, 2022 at 1:47 PM Alyssa Ross 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, > > > > 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! José.