There's now also no change in migration stream between KVM/non-KVM
configurations, KVM fields are filtered out via .is_needed().

Signed-off-by: Anton Johansson <[email protected]>
---
 target/riscv/machine.c   | 10 +---------
 target/riscv/meson.build |  2 +-
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/target/riscv/machine.c b/target/riscv/machine.c
index bf203bffce..ddcab8a667 100644
--- a/target/riscv/machine.c
+++ b/target/riscv/machine.c
@@ -21,12 +21,10 @@
 #include "qemu/error-report.h"
 #include "system/kvm.h"
 #include "system/tcg.h"
-#include "migration/cpu.h"
+#include "migration/vmstate.h"
 #include "exec/icount.h"
 #include "target/riscv/tcg/debug.h"
-#ifdef CONFIG_KVM
 #include "kvm/kvm_riscv.h"
-#endif
 
 static bool pmp_needed(void *opaque)
 {
@@ -196,7 +194,6 @@ static const VMStateDescription vmstate_rv128 = {
     }
 };
 
-#ifdef CONFIG_KVM
 static bool kvmtimer_needed(void *opaque)
 {
     return kvm_enabled();
@@ -262,7 +259,6 @@ static const VMStateDescription vmstate_kvm_mp_state = {
         VMSTATE_END_OF_LIST()
     }
 };
-#endif
 
 static bool debug_needed(void *opaque)
 {
@@ -499,9 +495,7 @@ const VMStateDescription vmstate_riscv_cpu = {
     .name = "cpu",
     .version_id = 12,
     .minimum_version_id = 12,
-#ifdef CONFIG_KVM
     .pre_load = riscv_cpu_kvm_pre_load,
-#endif
     .post_load = riscv_cpu_post_load,
     .fields = (const VMStateField[]) {
         VMSTATE_UINT64_ARRAY(env.gpr, RISCVCPU, 32),
@@ -563,10 +557,8 @@ const VMStateDescription vmstate_riscv_cpu = {
         &vmstate_vector,
         &vmstate_pointermasking,
         &vmstate_rv128,
-#ifdef CONFIG_KVM
         &vmstate_kvmtimer,
         &vmstate_kvm_mp_state,
-#endif
         &vmstate_envcfg,
         &vmstate_debug,
         &vmstate_smstateen,
diff --git a/target/riscv/meson.build b/target/riscv/meson.build
index 28a6ff8553..b5ec6cdcd8 100644
--- a/target/riscv/meson.build
+++ b/target/riscv/meson.build
@@ -23,7 +23,6 @@ riscv_stubs_ss = ss.source_set()
 riscv_system_ss = ss.source_set()
 riscv_system_ss.add(files(
   'monitor.c',
-  'machine.c',
   'time_helper.c',
 ))
 
@@ -37,6 +36,7 @@ riscv_user_ss.add(files(
 riscv_common_system_ss.add(files(
   'arch_dump.c',
   'cpu.c',
+  'machine.c',
   'riscv-qmp-cmds.c',
 ))
 

-- 
2.52.0


Reply via email to