From c831276b9835b1354c6c0d17299015c060993118 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Thu, 30 Dec 2021 21:05:43 +0100 Subject: [PATCH] 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 --- lib/appliance-cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.30.2