Set CPU type for mipsel, mips64el
authorHilko Bengen <bengen@debian.org>
Thu, 30 Dec 2021 20:05:43 +0000 (21:05 +0100)
committerHilko Bengen <bengen@debian.org>
Wed, 19 Feb 2025 08:38:24 +0000 (09:38 +0100)
Gbp-Pq: Name Set-CPU-type-for-mipsel-mips64el.patch

lib/appliance-cpu.c

index 8ce5084b0398579f06cc1cbc1bbf3bef961223ef..841e6018938bac8ba936a63fc39be3ff317ad1b9 100644 (file)
@@ -90,6 +90,12 @@ guestfs_int_get_cpu_model (int kvm)
 #elif defined(__loongarch64)
   /* qemu-system-loongarch64 doesn't yet support -cpu max */
   return NULL;
+#elif defined(__mips64)
+  /* Taken from https://gist.github.com/bradfa/46ceff759a0cf9f392cc069c4f0f095a */
+  return "5KEc";
+#elif defined(__mips)
+  /* Guessed from mips64 */
+  return "4KEc";
 #else
   /* On most architectures we can use "max" to get the best possible CPU.
    * For recent qemu this should work even on TCG.