Skip to content

Commit

Permalink
target/ppc: Fix migration of CPUs with TLB_EMB TLB type
Browse files Browse the repository at this point in the history
In vmstate_tlbemb a cut-and-paste error meant we gave
this vmstate subsection the same "cpu/tlb6xx" name as
the vmstate_tlb6xx subsection. This breaks migration load
for any CPU using the TLB_EMB CPU type, because when we
see the "tlb6xx" name in the incoming data we try to
interpret it as a vmstate_tlb6xx subsection, which it
isn't the right format for:

 $ qemu-system-ppc -drive
 if=none,format=qcow2,file=/home/petmay01/test-images/virt/dummy.qcow2
 -monitor stdio -M bamboo
 QEMU 9.0.92 monitor - type 'help' for more information
 (qemu) savevm foo
 (qemu) loadvm foo
 Missing section footer for cpu
 Error: Error -22 while loading VM state

Correct the incorrect vmstate section name. Since migration
for these CPU types was completely broken before, we don't
need to care that this is a migration compatibility break.

This affects the PPC 405, 440, 460 and e200 CPU families.

Cc: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2522
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Arman Nabiev <[email protected]>
Signed-off-by: Fabiano Rosas <[email protected]>
(cherry picked from commit 203beb6)
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
Arman Nabiev authored and Michael Tokarev committed Sep 25, 2024
1 parent eb40b14 commit f84b79a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/ppc/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ static bool tlbemb_needed(void *opaque)
}

static const VMStateDescription vmstate_tlbemb = {
.name = "cpu/tlb6xx",
.name = "cpu/tlbemb",
.version_id = 1,
.minimum_version_id = 1,
.needed = tlbemb_needed,
Expand Down

0 comments on commit f84b79a

Please sign in to comment.