From 71493126327ff05b517d72a2496735e103d716b6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 15 Jul 2022 17:10:17 +0100 Subject: [PATCH] lib: Don't use -cpu max on RISC-V qemu (7.0) does not support -cpu max for TCG. Note this change is necessary but not sufficient for getting libguestfs to run on RISC-V, because there is also currently no working path to make -kernel work. --- lib/appliance-cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/appliance-cpu.c b/lib/appliance-cpu.c index 54ac6e2e3..48c774502 100644 --- a/lib/appliance-cpu.c +++ b/lib/appliance-cpu.c @@ -84,6 +84,9 @@ guestfs_int_get_cpu_model (int kvm) #elif defined(__powerpc64__) /* See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1605071 */ return NULL; +#elif defined(__riscv) + /* qemu-system-riscv64 (7.0) doesn't yet support -cpu max */ + return NULL; #else /* On most architectures we can use "max" to get the best possible CPU. * For recent qemu this should work even on TCG.