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.
This commit is contained in:
Richard W.M. Jones
2022-07-15 17:10:17 +01:00
parent d68d1b2780
commit 7149312632

View File

@@ -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.