]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: fix QEMU target names for ppc64/mips64el/mipsel hosts
authorPaul Meyer <katexochen0@gmail.com>
Sat, 13 Jun 2026 09:38:02 +0000 (11:38 +0200)
committerPaul Meyer <katexochen0@gmail.com>
Wed, 17 Jun 2026 08:23:47 +0000 (10:23 +0200)
architecture_to_qemu_table mapped four 64-bit/LE architectures to wrong
qemu-system-<target> names: MIPS64_LE and MIPS_LE both to "mips" (the BE
MIPS32 target), and PPC64/PPC64_LE to "ppc" (32-bit PowerPC). The string
feeds both find_qemu_binary() ("qemu-system-" + name) and the
firmware.json architecture match, so on those hosts vmspawn looked up a
wrong or nonexistent binary and never matched a firmware descriptor. Map
them to the real targets: mips64el, mipsel, and ppc64 (qemu-system-ppc64
runs LE pSeries guests; there is no qemu-system-ppc64le).

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
src/vmspawn/vmspawn-util.c

index c5ab40a0d2055434e8575816e694b3d457bcc8eb..8ecd26600064e789a5f59ab4465a0f5a963267db 100644 (file)
@@ -32,11 +32,11 @@ static const char* const architecture_to_qemu_table[_ARCHITECTURE_MAX] = {
         [ARCHITECTURE_X86_64]      = "x86_64",      /* differs from our name */
         [ARCHITECTURE_X86]         = "i386",        /* differs from our name */
         [ARCHITECTURE_LOONGARCH64] = "loongarch64",
-        [ARCHITECTURE_MIPS64_LE]   = "mips",        /* differs from our name */
-        [ARCHITECTURE_MIPS_LE]     = "mips",        /* differs from our name */
+        [ARCHITECTURE_MIPS64_LE]   = "mips64el",    /* differs from our name */
+        [ARCHITECTURE_MIPS_LE]     = "mipsel",      /* differs from our name */
         [ARCHITECTURE_PARISC]      = "hppa",        /* differs from our name */
-        [ARCHITECTURE_PPC64_LE]    = "ppc",         /* differs from our name */
-        [ARCHITECTURE_PPC64]       = "ppc",         /* differs from our name */
+        [ARCHITECTURE_PPC64_LE]    = "ppc64",       /* differs from our name; qemu-system-ppc64 runs LE guests too */
+        [ARCHITECTURE_PPC64]       = "ppc64",       /* differs from our name */
         [ARCHITECTURE_PPC]         = "ppc",
         [ARCHITECTURE_RISCV32]     = "riscv32",
         [ARCHITECTURE_RISCV64]     = "riscv64",