Set special CPU type on RISCV64, don't set CPU type on mips*
authorHilko Bengen <bengen@debian.org>
Thu, 30 Dec 2021 20:05:43 +0000 (21:05 +0100)
committerHilko Bengen <bengen@debian.org>
Mon, 6 Mar 2023 14:29:41 +0000 (14:29 +0000)
Gbp-Pq: Name Set-special-CPU-type-on-RISCV64-don-t-set-CPU-type-on-mip.patch

lib/appliance-cpu.c

index 54ac6e2e3e491b1a90e0da2faf29ce0e53419e09..214d8cfe55c2641f69debb265fd49b85b0d47359 100644 (file)
@@ -81,9 +81,11 @@ guestfs_int_get_cpu_model (int kvm)
     return "host";
   else
     return "cortex-a57";
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) || defined(__mips) || defined(__mips64)
   /* See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1605071 */
   return NULL;
+#elif defined(__riscv)
+  return "rv64";
 #else
   /* On most architectures we can use "max" to get the best possible CPU.
    * For recent qemu this should work even on TCG.