From: Hilko Bengen Date: Thu, 30 Dec 2021 20:05:43 +0000 (+0100) Subject: Set special CPU type on RISCV64, don't set CPU type on mips* X-Git-Tag: archive/raspbian/1%1.50.1-4+rpi1~1^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f13792a8ad91994a02752f6fd512ecade74cdef0;p=libguestfs.git Set special CPU type on RISCV64, don't set CPU type on mips* Gbp-Pq: Name Set-special-CPU-type-on-RISCV64-don-t-set-CPU-type-on-mip.patch --- diff --git a/lib/appliance-cpu.c b/lib/appliance-cpu.c index 54ac6e2e..214d8cfe 100644 --- a/lib/appliance-cpu.c +++ b/lib/appliance-cpu.c @@ -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.