mirror of https://github.com/xemu-project/xemu.git
target/loongarch/kvm: Fix VM recovery from disk failures
vmstate does not save kvm_state_conter, which can cause VM recovery from disk to fail. Cc: qemu-stable@nongnu.org Signed-off-by: Song Gao <gaosong@loongson.cn> Acked-by: Peter Xu <peterx@redhat.com> Message-Id: <20240508024732.3127792-1-gaosong@loongson.cn>
This commit is contained in:
parent
6af8037c42
commit
0eb285c362
|
@ -145,8 +145,8 @@ static const VMStateDescription vmstate_tlb = {
|
|||
/* LoongArch CPU state */
|
||||
const VMStateDescription vmstate_loongarch_cpu = {
|
||||
.name = "cpu",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINTTL_ARRAY(env.gpr, LoongArchCPU, 32),
|
||||
VMSTATE_UINTTL(env.pc, LoongArchCPU),
|
||||
|
@ -208,6 +208,8 @@ const VMStateDescription vmstate_loongarch_cpu = {
|
|||
VMSTATE_UINT64(env.CSR_DERA, LoongArchCPU),
|
||||
VMSTATE_UINT64(env.CSR_DSAVE, LoongArchCPU),
|
||||
|
||||
VMSTATE_UINT64(kvm_state_counter, LoongArchCPU),
|
||||
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
|
|
Loading…
Reference in New Issue