• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revision17e313406126125036191f11e9c70298be34c987 (tree)
Time2022-01-28 23:38:23
AuthorPeter Maydell <peter.maydell@lina...>
CommiterJuan Quintela

Log Message

Remove unnecessary minimum_version_id_old fields

The migration code will not look at a VMStateDescription's
minimum_version_id_old field unless that VMSD has set the
load_state_old field to something non-NULL. (The purpose of
minimum_version_id_old is to specify what migration version is needed
for the code in the function pointed to by load_state_old to be able
to handle it on incoming migration.)

We have exactly one VMSD which still has a load_state_old,
in the PPC CPU; every other VMSD which sets minimum_version_id_old
is doing so unnecessarily. Delete all the unnecessary ones.

Commit created with:

sed -i '/\.minimum_version_id_old/d' $(git grep -l '\.minimum_version_id_old')

with the one legitimate use then hand-edited back in.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>

Signed-off-by: Juan Quintela <quintela@redhat.com>

---

It missed vmstate_ppc_cpu.

Change Summary

Incremental Difference

--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -297,7 +297,6 @@ static const VMStateDescription vmstate_cpuhp_sts = {
297297 .name = "CPU hotplug device state",
298298 .version_id = 1,
299299 .minimum_version_id = 1,
300- .minimum_version_id_old = 1,
301300 .fields = (VMStateField[]) {
302301 VMSTATE_BOOL(is_inserting, AcpiCpuStatus),
303302 VMSTATE_BOOL(is_removing, AcpiCpuStatus),
@@ -311,7 +310,6 @@ const VMStateDescription vmstate_cpu_hotplug = {
311310 .name = "CPU hotplug state",
312311 .version_id = 1,
313312 .minimum_version_id = 1,
314- .minimum_version_id_old = 1,
315313 .fields = (VMStateField[]) {
316314 VMSTATE_UINT32(selector, CPUHotplugState),
317315 VMSTATE_UINT8(command, CPUHotplugState),
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -163,7 +163,6 @@ static const VMStateDescription vmstate_memhp_state = {
163163 .name = "ich9_pm/memhp",
164164 .version_id = 1,
165165 .minimum_version_id = 1,
166- .minimum_version_id_old = 1,
167166 .needed = vmstate_test_use_memhp,
168167 .fields = (VMStateField[]) {
169168 VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs),
@@ -181,7 +180,6 @@ static const VMStateDescription vmstate_tco_io_state = {
181180 .name = "ich9_pm/tco",
182181 .version_id = 1,
183182 .minimum_version_id = 1,
184- .minimum_version_id_old = 1,
185183 .needed = vmstate_test_use_tco,
186184 .fields = (VMStateField[]) {
187185 VMSTATE_STRUCT(tco_regs, ICH9LPCPMRegs, 1, vmstate_tco_io_sts,
@@ -208,7 +206,6 @@ static const VMStateDescription vmstate_cpuhp_state = {
208206 .name = "ich9_pm/cpuhp",
209207 .version_id = 1,
210208 .minimum_version_id = 1,
211- .minimum_version_id_old = 1,
212209 .needed = vmstate_test_use_cpuhp,
213210 .pre_load = vmstate_cpuhp_pre_load,
214211 .fields = (VMStateField[]) {
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -318,7 +318,6 @@ static const VMStateDescription vmstate_memhp_sts = {
318318 .name = "memory hotplug device state",
319319 .version_id = 1,
320320 .minimum_version_id = 1,
321- .minimum_version_id_old = 1,
322321 .fields = (VMStateField[]) {
323322 VMSTATE_BOOL(is_enabled, MemStatus),
324323 VMSTATE_BOOL(is_inserting, MemStatus),
@@ -332,7 +331,6 @@ const VMStateDescription vmstate_memory_hotplug = {
332331 .name = "memory hotplug state",
333332 .version_id = 1,
334333 .minimum_version_id = 1,
335- .minimum_version_id_old = 1,
336334 .fields = (VMStateField[]) {
337335 VMSTATE_UINT32(selector, MemHotplugState),
338336 VMSTATE_STRUCT_VARRAY_POINTER_UINT32(devs, MemHotplugState, dev_count,
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -230,7 +230,6 @@ static const VMStateDescription vmstate_memhp_state = {
230230 .name = "piix4_pm/memhp",
231231 .version_id = 1,
232232 .minimum_version_id = 1,
233- .minimum_version_id_old = 1,
234233 .needed = vmstate_test_use_memhp,
235234 .fields = (VMStateField[]) {
236235 VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, PIIX4PMState),
@@ -255,7 +254,6 @@ static const VMStateDescription vmstate_cpuhp_state = {
255254 .name = "piix4_pm/cpuhp",
256255 .version_id = 1,
257256 .minimum_version_id = 1,
258- .minimum_version_id_old = 1,
259257 .needed = vmstate_test_use_cpuhp,
260258 .pre_load = vmstate_cpuhp_pre_load,
261259 .fields = (VMStateField[]) {
--- a/hw/acpi/tco.c
+++ b/hw/acpi/tco.c
@@ -239,7 +239,6 @@ const VMStateDescription vmstate_tco_io_sts = {
239239 .name = "tco io device status",
240240 .version_id = 1,
241241 .minimum_version_id = 1,
242- .minimum_version_id_old = 1,
243242 .fields = (VMStateField[]) {
244243 VMSTATE_UINT16(tco.rld, TCOIORegs),
245244 VMSTATE_UINT8(tco.din, TCOIORegs),
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -209,7 +209,6 @@ static const VMStateDescription vmstate_spk = {
209209 .name = "pcspk",
210210 .version_id = 1,
211211 .minimum_version_id = 1,
212- .minimum_version_id_old = 1,
213212 .needed = migrate_needed,
214213 .fields = (VMStateField[]) {
215214 VMSTATE_UINT8(data_on, PCSpkState),
--- a/hw/display/macfb.c
+++ b/hw/display/macfb.c
@@ -616,7 +616,6 @@ static const VMStateDescription vmstate_macfb = {
616616 .name = "macfb",
617617 .version_id = 1,
618618 .minimum_version_id = 1,
619- .minimum_version_id_old = 1,
620619 .post_load = macfb_post_load,
621620 .fields = (VMStateField[]) {
622621 VMSTATE_UINT8_ARRAY(color_palette, MacfbState, 256 * 3),
--- a/hw/dma/xlnx-zdma.c
+++ b/hw/dma/xlnx-zdma.c
@@ -806,7 +806,6 @@ static const VMStateDescription vmstate_zdma = {
806806 .name = TYPE_XLNX_ZDMA,
807807 .version_id = 1,
808808 .minimum_version_id = 1,
809- .minimum_version_id_old = 1,
810809 .fields = (VMStateField[]) {
811810 VMSTATE_UINT32_ARRAY(regs, XlnxZDMA, ZDMA_R_MAX),
812811 VMSTATE_UINT32(state, XlnxZDMA),
--- a/hw/dma/xlnx_csu_dma.c
+++ b/hw/dma/xlnx_csu_dma.c
@@ -663,7 +663,6 @@ static const VMStateDescription vmstate_xlnx_csu_dma = {
663663 .name = TYPE_XLNX_CSU_DMA,
664664 .version_id = 0,
665665 .minimum_version_id = 0,
666- .minimum_version_id_old = 0,
667666 .fields = (VMStateField[]) {
668667 VMSTATE_PTIMER(src_timer, XlnxCSUDMA),
669668 VMSTATE_UINT16(width, XlnxCSUDMA),
--- a/hw/gpio/imx_gpio.c
+++ b/hw/gpio/imx_gpio.c
@@ -277,7 +277,6 @@ static const VMStateDescription vmstate_imx_gpio = {
277277 .name = TYPE_IMX_GPIO,
278278 .version_id = 1,
279279 .minimum_version_id = 1,
280- .minimum_version_id_old = 1,
281280 .fields = (VMStateField[]) {
282281 VMSTATE_UINT32(dr, IMXGPIOState),
283282 VMSTATE_UINT32(gdir, IMXGPIOState),
--- a/hw/misc/bcm2835_mbox.c
+++ b/hw/misc/bcm2835_mbox.c
@@ -271,7 +271,6 @@ static const VMStateDescription vmstate_bcm2835_mbox = {
271271 .name = TYPE_BCM2835_MBOX,
272272 .version_id = 1,
273273 .minimum_version_id = 1,
274- .minimum_version_id_old = 1,
275274 .fields = (VMStateField[]) {
276275 VMSTATE_BOOL_ARRAY(available, BCM2835MboxState, MBOX_CHAN_COUNT),
277276 VMSTATE_STRUCT_ARRAY(mbox, BCM2835MboxState, 2, 1,
--- a/hw/net/can/can_kvaser_pci.c
+++ b/hw/net/can/can_kvaser_pci.c
@@ -266,7 +266,6 @@ static const VMStateDescription vmstate_kvaser_pci = {
266266 .name = "kvaser_pci",
267267 .version_id = 1,
268268 .minimum_version_id = 1,
269- .minimum_version_id_old = 1,
270269 .fields = (VMStateField[]) {
271270 VMSTATE_PCI_DEVICE(dev, KvaserPCIState),
272271 /* Load this before sja_state. */
--- a/hw/net/can/can_mioe3680_pci.c
+++ b/hw/net/can/can_mioe3680_pci.c
@@ -203,7 +203,6 @@ static const VMStateDescription vmstate_mioe3680_pci = {
203203 .name = "mioe3680_pci",
204204 .version_id = 1,
205205 .minimum_version_id = 1,
206- .minimum_version_id_old = 1,
207206 .fields = (VMStateField[]) {
208207 VMSTATE_PCI_DEVICE(dev, Mioe3680PCIState),
209208 VMSTATE_STRUCT(sja_state[0], Mioe3680PCIState, 0, vmstate_can_sja,
--- a/hw/net/can/can_pcm3680_pci.c
+++ b/hw/net/can/can_pcm3680_pci.c
@@ -204,7 +204,6 @@ static const VMStateDescription vmstate_pcm3680i_pci = {
204204 .name = "pcm3680i_pci",
205205 .version_id = 1,
206206 .minimum_version_id = 1,
207- .minimum_version_id_old = 1,
208207 .fields = (VMStateField[]) {
209208 VMSTATE_PCI_DEVICE(dev, Pcm3680iPCIState),
210209 VMSTATE_STRUCT(sja_state[0], Pcm3680iPCIState, 0,
--- a/hw/net/can/can_sja1000.c
+++ b/hw/net/can/can_sja1000.c
@@ -928,7 +928,6 @@ const VMStateDescription vmstate_qemu_can_filter = {
928928 .name = "qemu_can_filter",
929929 .version_id = 1,
930930 .minimum_version_id = 1,
931- .minimum_version_id_old = 1,
932931 .fields = (VMStateField[]) {
933932 VMSTATE_UINT32(can_id, qemu_can_filter),
934933 VMSTATE_UINT32(can_mask, qemu_can_filter),
@@ -952,7 +951,6 @@ const VMStateDescription vmstate_can_sja = {
952951 .name = "can_sja",
953952 .version_id = 1,
954953 .minimum_version_id = 1,
955- .minimum_version_id_old = 1,
956954 .post_load = can_sja_post_load,
957955 .fields = (VMStateField[]) {
958956 VMSTATE_UINT8(mode, CanSJA1000State),
--- a/hw/net/can/ctucan_core.c
+++ b/hw/net/can/ctucan_core.c
@@ -617,7 +617,6 @@ const VMStateDescription vmstate_qemu_ctucan_tx_buffer = {
617617 .name = "qemu_ctucan_tx_buffer",
618618 .version_id = 1,
619619 .minimum_version_id = 1,
620- .minimum_version_id_old = 1,
621620 .fields = (VMStateField[]) {
622621 VMSTATE_UINT8_ARRAY(data, CtuCanCoreMsgBuffer, CTUCAN_CORE_MSG_MAX_LEN),
623622 VMSTATE_END_OF_LIST()
@@ -636,7 +635,6 @@ const VMStateDescription vmstate_ctucan = {
636635 .name = "ctucan",
637636 .version_id = 1,
638637 .minimum_version_id = 1,
639- .minimum_version_id_old = 1,
640638 .post_load = ctucan_post_load,
641639 .fields = (VMStateField[]) {
642640 VMSTATE_UINT32(mode_settings.u32, CtuCanCoreState),
--- a/hw/net/can/ctucan_pci.c
+++ b/hw/net/can/ctucan_pci.c
@@ -215,7 +215,6 @@ static const VMStateDescription vmstate_ctucan_pci = {
215215 .name = "ctucan_pci",
216216 .version_id = 1,
217217 .minimum_version_id = 1,
218- .minimum_version_id_old = 1,
219218 .fields = (VMStateField[]) {
220219 VMSTATE_PCI_DEVICE(dev, CtuCanPCIState),
221220 VMSTATE_STRUCT(ctucan_state[0], CtuCanPCIState, 0, vmstate_ctucan,
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -1049,7 +1049,6 @@ const VMStateDescription vmstate_ppc_timebase = {
10491049 .name = "timebase",
10501050 .version_id = 1,
10511051 .minimum_version_id = 1,
1052- .minimum_version_id_old = 1,
10531052 .pre_save = timebase_pre_save,
10541053 .fields = (VMStateField []) {
10551054 VMSTATE_UINT64(guest_timebase, PPCTimebase),
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2315,7 +2315,6 @@ static const VMStateDescription vmstate_megasas_gen2 = {
23152315 .name = "megasas-gen2",
23162316 .version_id = 0,
23172317 .minimum_version_id = 0,
2318- .minimum_version_id_old = 0,
23192318 .fields = (VMStateField[]) {
23202319 VMSTATE_PCI_DEVICE(parent_obj, MegasasState),
23212320 VMSTATE_MSIX(parent_obj, MegasasState),
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -1363,7 +1363,6 @@ static const VMStateDescription vmstate_mptsas = {
13631363 .name = "mptsas",
13641364 .version_id = 0,
13651365 .minimum_version_id = 0,
1366- .minimum_version_id_old = 0,
13671366 .post_load = mptsas_post_load,
13681367 .fields = (VMStateField[]) {
13691368 VMSTATE_PCI_DEVICE(dev, MPTSASState),
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -592,7 +592,6 @@ static const VMStateDescription vmstate_virtio_mmio = {
592592 .name = "virtio_mmio",
593593 .version_id = 1,
594594 .minimum_version_id = 1,
595- .minimum_version_id_old = 1,
596595 .fields = (VMStateField[]) {
597596 VMSTATE_END_OF_LIST()
598597 },
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -131,7 +131,6 @@ static const VMStateDescription vmstate_virtio_pci = {
131131 .name = "virtio_pci",
132132 .version_id = 1,
133133 .minimum_version_id = 1,
134- .minimum_version_id_old = 1,
135134 .fields = (VMStateField[]) {
136135 VMSTATE_END_OF_LIST()
137136 },
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2808,7 +2808,6 @@ static const VMStateDescription vmstate_virtio = {
28082808 .name = "virtio",
28092809 .version_id = 1,
28102810 .minimum_version_id = 1,
2811- .minimum_version_id_old = 1,
28122811 .fields = (VMStateField[]) {
28132812 VMSTATE_END_OF_LIST()
28142813 },
--- a/target/openrisc/machine.c
+++ b/target/openrisc/machine.c
@@ -25,7 +25,6 @@ static const VMStateDescription vmstate_tlb_entry = {
2525 .name = "tlb_entry",
2626 .version_id = 1,
2727 .minimum_version_id = 1,
28- .minimum_version_id_old = 1,
2928 .fields = (VMStateField[]) {
3029 VMSTATE_UINTTL(mr, OpenRISCTLBEntry),
3130 VMSTATE_UINTTL(tr, OpenRISCTLBEntry),
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -421,7 +421,6 @@ static const VMStateDescription vmstate_tm = {
421421 .name = "cpu/tm",
422422 .version_id = 1,
423423 .minimum_version_id = 1,
424- .minimum_version_id_old = 1,
425424 .needed = tm_needed,
426425 .fields = (VMStateField []) {
427426 VMSTATE_UINTTL_ARRAY(env.tm_gpr, PowerPCCPU, 32),
@@ -672,7 +671,6 @@ const VMStateDescription vmstate_ppc_cpu = {
672671 .name = "cpu",
673672 .version_id = 5,
674673 .minimum_version_id = 5,
675- .minimum_version_id_old = 4,
676674 .pre_save = cpu_pre_save,
677675 .post_load = cpu_post_load,
678676 .fields = (VMStateField[]) {
--- a/target/sparc/machine.c
+++ b/target/sparc/machine.c
@@ -10,7 +10,6 @@ static const VMStateDescription vmstate_cpu_timer = {
1010 .name = "cpu_timer",
1111 .version_id = 1,
1212 .minimum_version_id = 1,
13- .minimum_version_id_old = 1,
1413 .fields = (VMStateField[]) {
1514 VMSTATE_UINT32(frequency, CPUTimer),
1615 VMSTATE_UINT32(disabled, CPUTimer),
@@ -30,7 +29,6 @@ static const VMStateDescription vmstate_trap_state = {
3029 .name = "trap_state",
3130 .version_id = 1,
3231 .minimum_version_id = 1,
33- .minimum_version_id_old = 1,
3432 .fields = (VMStateField[]) {
3533 VMSTATE_UINT64(tpc, trap_state),
3634 VMSTATE_UINT64(tnpc, trap_state),
@@ -44,7 +42,6 @@ static const VMStateDescription vmstate_tlb_entry = {
4442 .name = "tlb_entry",
4543 .version_id = 1,
4644 .minimum_version_id = 1,
47- .minimum_version_id_old = 1,
4845 .fields = (VMStateField[]) {
4946 VMSTATE_UINT64(tag, SparcTLBEntry),
5047 VMSTATE_UINT64(tte, SparcTLBEntry),
@@ -113,7 +110,6 @@ const VMStateDescription vmstate_sparc_cpu = {
113110 .name = "cpu",
114111 .version_id = SPARC_VMSTATE_VER,
115112 .minimum_version_id = SPARC_VMSTATE_VER,
116- .minimum_version_id_old = SPARC_VMSTATE_VER,
117113 .pre_save = cpu_pre_save,
118114 .fields = (VMStateField[]) {
119115 VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),