A change like the following could possibly fix the problem.
--- a/lib/qemu.c +++ b/lib/qemu.c @@ -309,7 +309,12 @@ #ifdef MACHINE_TYPE MACHINE_TYPE "," #endif - "accel=kvm:tcg"); +#ifdef __riscv + "virt" +#else + "accel=kvm:tcg" +#endif + ); guestfs_int_cmd_add_arg (cmd, "-device");
A better solution would be do detect the presence of KVM at runtime.
A change like the following could possibly fix the problem.
--- a/lib/qemu.c
MACHINE_ TYPE "," int_cmd_ add_arg (cmd, "-device");
+++ b/lib/qemu.c
@@ -309,7 +309,12 @@
#ifdef MACHINE_TYPE
#endif
- "accel=kvm:tcg");
+#ifdef __riscv
+ "virt"
+#else
+ "accel=kvm:tcg"
+#endif
+ );
guestfs_
A better solution would be do detect the presence of KVM at runtime.