On Tue, Feb 18, 2025 at 01:38:42PM +0300, Michael Tokarev wrote: > Hi! > > Qemu system-mode emulation, when used with a NIC, loads a ROM file > for network booting (and fails to start if such file is not provided). > ROMs shipped in the source tarball are x86-only, so such loading does > nothing on non-x86, where we just wasting guest memory, - since the > ROM code can not be executed on the target architecture anyway. > > These days, ipxe provides (UEFI) ROM files for architectures other than > x86. And these ROMs actually works, making it possible to network-boot > qemu guests in UEFI mode.
edk2 ships a virtio-net driver, so network boot support does not depend on ipxe. Using nics other than virtio-net on aarch64/riscv64/loongarch64 looks pointless to me. All these architectures are younger than virtio-net, so there are no compatibility concerns. > Would it be possible to make ROMs target-arch-specific, and drop the > ROM dependency/loading on non-x86 if there's no arch-specific ROM found? I think this can be done with compat properties today. IIRC this is already done for one of the VGA devices to load a macos driver instead of vgabios into the rom bar. Given that the roms are mostly needed on x86 I think the simplest approach would be to turn them off by default and enable for x86 machine types using compat properties. > This probably requires machine version dependency, to make the machine > migratable. Yes. take care, Gerd