Patchwork [RFC,qom-cpu-next,4/9] target-i386: Drop version 5 CPU VMState support

login
register
mail settings
Submitter Andreas Färber
Date Feb. 2, 2013, 11:57 a.m.
Message ID <1359806247-27799-5-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/217659/
State New
Headers show

Comments

Andreas Färber - Feb. 2, 2013, 11:57 a.m.
Version 5 contained the halted field, that we are about to move from
CPUX86State to CPUState. To avoid inventing new VMSTATE macros for
calculating a negative offset from CPUX86State to the field in CPUState,
rather bump the minimum version from 3 to 6. We're at 12 currently.

Suggested-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
---
 target-i386/machine.c |   10 ++--------
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)

Patch

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 8df6a6b..e154646 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -201,11 +201,6 @@  static bool fpregs_is_1_no_mmx(void *opaque, int version_id)
     VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_mmx, vmstate_fpreg_1_mmx, FPReg), \
     VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_no_mmx, vmstate_fpreg_1_no_mmx, FPReg)
 
-static bool version_is_5(void *opaque, int version_id)
-{
-    return version_id == 5;
-}
-
 #ifdef TARGET_X86_64
 static bool less_than_7(void *opaque, int version_id)
 {
@@ -386,8 +381,8 @@  static const VMStateDescription vmstate_msr_ia32_misc_enable = {
 static const VMStateDescription vmstate_cpu = {
     .name = "cpu",
     .version_id = CPU_SAVE_VERSION,
-    .minimum_version_id = 3,
-    .minimum_version_id_old = 3,
+    .minimum_version_id = 6,
+    .minimum_version_id_old = 6,
     .pre_save = cpu_pre_save,
     .post_load = cpu_post_load,
     .fields      = (VMStateField []) {
@@ -444,7 +439,6 @@  static const VMStateDescription vmstate_cpu = {
         VMSTATE_UINT64_V(pat, CPUX86State, 5),
         VMSTATE_UINT32_V(hflags2, CPUX86State, 5),
 
-        VMSTATE_UINT32_TEST(halted, CPUX86State, version_is_5),
         VMSTATE_UINT64_V(vm_hsave, CPUX86State, 5),
         VMSTATE_UINT64_V(vm_vmcb, CPUX86State, 5),
         VMSTATE_UINT64_V(tsc_offset, CPUX86State, 5),