mirror of https://gitee.com/openkylin/qemu.git
target/mips: Migrate missing CPU fields
Add various missing fields to the CPU migration vmstate: - CP0_VPControl & CP0_GlobalNumber (01bc435b44
2016-02-03) - CMGCRBase (c870e3f52c
2016-03-15) - CP0_ErrCtl (0d74a222c2
2016-03-25) - MXU GPR[] & CR (eb5559f67d
2018-10-18) - R5900 128-bit upper half (a168a796e1
2019-01-17) This is a migration break. Fixes:01bc435b44
("target-mips: implement R6 multi-threading") Fixes:c870e3f52c
("target-mips: add CMGCRBase register") Fixes:0d74a222c2
("target-mips: make ITC Configuration Tags accessible to the CPU") Fixes:eb5559f67d
("target/mips: Introduce MXU registers") Fixes:a168a796e1
("target/mips: Introduce 32 R5900 multimedia registers") Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210423220044.3004195-1-f4bug@amsat.org>
This commit is contained in:
parent
bc2eb5ea1b
commit
df44e81703
|
@ -81,6 +81,9 @@ const VMStateDescription vmstate_inactive_fpu = {
|
|||
|
||||
static VMStateField vmstate_tc_fields[] = {
|
||||
VMSTATE_UINTTL_ARRAY(gpr, TCState, 32),
|
||||
#if defined(TARGET_MIPS64)
|
||||
VMSTATE_UINT64_ARRAY(gpr_hi, TCState, 32),
|
||||
#endif /* TARGET_MIPS64 */
|
||||
VMSTATE_UINTTL(PC, TCState),
|
||||
VMSTATE_UINTTL_ARRAY(HI, TCState, MIPS_DSP_ACC),
|
||||
VMSTATE_UINTTL_ARRAY(LO, TCState, MIPS_DSP_ACC),
|
||||
|
@ -95,20 +98,22 @@ static VMStateField vmstate_tc_fields[] = {
|
|||
VMSTATE_INT32(CP0_Debug_tcstatus, TCState),
|
||||
VMSTATE_UINTTL(CP0_UserLocal, TCState),
|
||||
VMSTATE_INT32(msacsr, TCState),
|
||||
VMSTATE_UINTTL_ARRAY(mxu_gpr, TCState, NUMBER_OF_MXU_REGISTERS - 1),
|
||||
VMSTATE_UINTTL(mxu_cr, TCState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
};
|
||||
|
||||
const VMStateDescription vmstate_tc = {
|
||||
.name = "cpu/tc",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.fields = vmstate_tc_fields
|
||||
};
|
||||
|
||||
const VMStateDescription vmstate_inactive_tc = {
|
||||
.name = "cpu/inactive_tc",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 2,
|
||||
.fields = vmstate_tc_fields
|
||||
};
|
||||
|
||||
|
@ -213,8 +218,8 @@ const VMStateDescription vmstate_tlb = {
|
|||
|
||||
const VMStateDescription vmstate_mips_cpu = {
|
||||
.name = "cpu",
|
||||
.version_id = 20,
|
||||
.minimum_version_id = 20,
|
||||
.version_id = 21,
|
||||
.minimum_version_id = 21,
|
||||
.post_load = cpu_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
/* Active TC */
|
||||
|
@ -241,6 +246,7 @@ const VMStateDescription vmstate_mips_cpu = {
|
|||
|
||||
/* Remaining CP0 registers */
|
||||
VMSTATE_INT32(env.CP0_Index, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_VPControl, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_Random, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_VPEControl, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_VPEConf0, MIPSCPU),
|
||||
|
@ -251,6 +257,7 @@ const VMStateDescription vmstate_mips_cpu = {
|
|||
VMSTATE_INT32(env.CP0_VPEOpt, MIPSCPU),
|
||||
VMSTATE_UINT64(env.CP0_EntryLo0, MIPSCPU),
|
||||
VMSTATE_UINT64(env.CP0_EntryLo1, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_GlobalNumber, MIPSCPU),
|
||||
VMSTATE_UINTTL(env.CP0_Context, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_MemoryMapID, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_PageMask, MIPSCPU),
|
||||
|
@ -286,6 +293,7 @@ const VMStateDescription vmstate_mips_cpu = {
|
|||
VMSTATE_UINTTL(env.CP0_EPC, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_PRid, MIPSCPU),
|
||||
VMSTATE_UINTTL(env.CP0_EBase, MIPSCPU),
|
||||
VMSTATE_UINTTL(env.CP0_CMGCRBase, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_Config0, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_Config1, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_Config2, MIPSCPU),
|
||||
|
@ -305,6 +313,7 @@ const VMStateDescription vmstate_mips_cpu = {
|
|||
VMSTATE_INT32(env.CP0_Debug, MIPSCPU),
|
||||
VMSTATE_UINTTL(env.CP0_DEPC, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_Performance0, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_ErrCtl, MIPSCPU),
|
||||
VMSTATE_UINT64(env.CP0_TagLo, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_DataLo, MIPSCPU),
|
||||
VMSTATE_INT32(env.CP0_TagHi, MIPSCPU),
|
||||
|
|
Loading…
Reference in New Issue