qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/loongarch/kvm: Fix VM recovery from disk failures
@ 2024-04-30  1:23 Song Gao
  2024-04-30  8:53 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 8+ messages in thread
From: Song Gao @ 2024-04-30  1:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: pbonzini, peter.maydell, richard.henderson, philmd, maobibo,
	zhaotianrui, lixianglai

vmstate does not save kvm_state_conter,
which can cause VM recovery from disk to fail.

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 c7029fb9b4..4cd1bf06ff 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 * const []) {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-07 15:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30  1:23 [PATCH] target/loongarch/kvm: Fix VM recovery from disk failures Song Gao
2024-04-30  8:53 ` Philippe Mathieu-Daudé
2024-04-30 14:00   ` Fabiano Rosas
2024-05-01 15:45     ` Peter Xu
2024-05-02 12:45       ` Fabiano Rosas
2024-05-07  8:12         ` gaosong
2024-05-07 15:47           ` Peter Xu
2024-05-07 15:52             ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).