qemu/target-loongarch-kvm-Fix-vm-restore-failed.patch

29 lines
918 B
Diff
Raw Permalink Normal View History

From 7cf9ed3844ed3340165121e5fd7dcb959ee80d15 Mon Sep 17 00:00:00 2001
From: Song Gao <gaosong@loongson.cn>
Date: Wed, 24 Apr 2024 14:18:46 +0800
Subject: [PATCH] target/loongarch/kvm: Fix vm restore failed
The vmstate_loongarch_cpu need kvm_state_counter.
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
target/loongarch/machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c
index 1c4e01d076..4443caed2d 100644
--- a/target/loongarch/machine.c
+++ b/target/loongarch/machine.c
@@ -191,6 +191,8 @@ const VMStateDescription vmstate_loongarch_cpu = {
VMSTATE_STRUCT_ARRAY(env.tlb, LoongArchCPU, LOONGARCH_TLB_MAX,
0, vmstate_tlb, LoongArchTLB),
+ VMSTATE_UINT64(kvm_state_counter, LoongArchCPU),
+
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription*[]) {
--
2.33.0