Revision 216c07c3 target-i386/machine.c
b/target-i386/machine.c | ||
---|---|---|
53 | 53 |
vmstate_load_state(f, &vmstate_xmm_reg, xmm_reg, vmstate_xmm_reg.version_id); |
54 | 54 |
} |
55 | 55 |
|
56 |
static const VMStateDescription vmstate_mtrr_var = { |
|
57 |
.name = "mtrr_var", |
|
58 |
.version_id = 1, |
|
59 |
.minimum_version_id = 1, |
|
60 |
.minimum_version_id_old = 1, |
|
61 |
.fields = (VMStateField []) { |
|
62 |
VMSTATE_UINT64(base, MTRRVar), |
|
63 |
VMSTATE_UINT64(mask, MTRRVar), |
|
64 |
VMSTATE_END_OF_LIST() |
|
65 |
} |
|
66 |
}; |
|
67 |
|
|
68 |
static void cpu_put_mtrr_var(QEMUFile *f, MTRRVar *mtrr_var) |
|
69 |
{ |
|
70 |
vmstate_save_state(f, &vmstate_mtrr_var, mtrr_var); |
|
71 |
} |
|
72 |
|
|
73 |
static void cpu_get_mtrr_var(QEMUFile *f, MTRRVar *mtrr_var) |
|
74 |
{ |
|
75 |
vmstate_load_state(f, &vmstate_mtrr_var, mtrr_var, vmstate_mtrr_var.version_id); |
|
76 |
} |
|
77 |
|
|
56 | 78 |
static void cpu_pre_save(void *opaque) |
57 | 79 |
{ |
58 | 80 |
CPUState *env = opaque; |
... | ... | |
182 | 204 |
qemu_put_be64s(f, &env->mtrr_fixed[i]); |
183 | 205 |
qemu_put_be64s(f, &env->mtrr_deftype); |
184 | 206 |
for(i = 0; i < 8; i++) { |
185 |
qemu_put_be64s(f, &env->mtrr_var[i].base); |
|
186 |
qemu_put_be64s(f, &env->mtrr_var[i].mask); |
|
207 |
cpu_put_mtrr_var(f, &env->mtrr_var[i]); |
|
187 | 208 |
} |
188 | 209 |
|
189 | 210 |
/* KVM-related states */ |
... | ... | |
394 | 415 |
qemu_get_be64s(f, &env->mtrr_fixed[i]); |
395 | 416 |
qemu_get_be64s(f, &env->mtrr_deftype); |
396 | 417 |
for(i = 0; i < 8; i++) { |
397 |
qemu_get_be64s(f, &env->mtrr_var[i].base); |
|
398 |
qemu_get_be64s(f, &env->mtrr_var[i].mask); |
|
418 |
cpu_get_mtrr_var(f, &env->mtrr_var[i]); |
|
399 | 419 |
} |
400 | 420 |
} |
401 | 421 |
|
Also available in: Unified diff