QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: Song Gao <gaosong@loongson.cn>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, peter.maydell@linaro.org,
	richard.henderson@linaro.org, philmd@linaro.org,
	maobibo@loongson.cn, zhaotianrui@loongson.cn,
	lixianglai@loongso.cn
Subject: [PATCH] target/loongarch/kvm: Fix VM recovery from disk failures
Date: Tue, 30 Apr 2024 09:23:56 +0800	[thread overview]
Message-ID: <20240430012356.2620763-1-gaosong@loongson.cn> (raw)

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



             reply	other threads:[~2024-04-30  1:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30  1:23 Song Gao [this message]
2024-04-30  8:53 ` [PATCH] target/loongarch/kvm: Fix VM recovery from disk failures 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430012356.2620763-1-gaosong@loongson.cn \
    --to=gaosong@loongson.cn \
    --cc=lixianglai@loongso.cn \
    --cc=maobibo@loongson.cn \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhaotianrui@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).