mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150612' into staging
migration/next for 20150612 # gpg: Signature made Fri Jun 12 05:56:21 2015 BST using RSA key ID 5872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" * remotes/juanquintela/tags/migration/20150612: (21 commits) Remove unneeded memset Rename RDMA structures to make destination clear Teach analyze-migration.py about section footers Add a protective section footer Disable section footers on older machine types Merge section header writing Move loadvm_handlers into MigrationIncomingState Move copy out of qemu_peek_buffer Create MigrationIncomingState qemu_ram_foreach_block: pass up error value, and down the ramblock name Split header writing out of qemu_savevm_state_begin Add qemu_get_counted_string to read a string prefixed by a count byte migration: Use normal VMStateDescriptions for Subsections migration: create savevm_state migration: Remove duplicated assignment of SETUP status rdma: Fix qemu crash when IPv6 address is used for migration arch_init: Clean up the duplicate variable 'len' defining in ram_load() migration: reduce include files migration: Add myself to the copyright list of both files migration: move savevm.c inside migration/ ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -1014,8 +1014,6 @@ M: Amit Shah <amit.shah@redhat.com>
|
||||
S: Maintained
|
||||
F: include/migration/
|
||||
F: migration/
|
||||
F: savevm.c
|
||||
F: arch_init.c
|
||||
F: scripts/vmstate-static-checker.py
|
||||
F: tests/vmstate-static-checker-data/
|
||||
|
||||
|
||||
+2
-1
@@ -132,9 +132,10 @@ obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
|
||||
obj-y += qtest.o bootdevice.o
|
||||
obj-y += hw/
|
||||
obj-$(CONFIG_KVM) += kvm-all.o
|
||||
obj-y += memory.o savevm.o cputlb.o
|
||||
obj-y += memory.o cputlb.o
|
||||
obj-y += memory_mapping.o
|
||||
obj-y += dump.o
|
||||
obj-y += migration/ram.o migration/savevm.o
|
||||
LIBS := $(libs_softmmu) $(LIBS)
|
||||
|
||||
# xen support
|
||||
|
||||
-1611
File diff suppressed because it is too large
Load Diff
@@ -480,6 +480,7 @@ static const VMStateDescription icount_vmstate_timers = {
|
||||
.name = "timer/icount",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = icount_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT64(qemu_icount_bias, TimersState),
|
||||
VMSTATE_INT64(qemu_icount, TimersState),
|
||||
@@ -497,13 +498,9 @@ static const VMStateDescription vmstate_timers = {
|
||||
VMSTATE_INT64_V(cpu_clock_offset, TimersState, 2),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &icount_vmstate_timers,
|
||||
.needed = icount_state_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&icount_vmstate_timers,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-7
@@ -257,6 +257,7 @@ const VMStateDescription vmstate_ide_drive_pio_state = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = ide_drive_pio_pre_save,
|
||||
.post_load = ide_drive_pio_post_load,
|
||||
.needed = ide_drive_pio_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(req_nb_sectors, IDEState),
|
||||
VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1,
|
||||
@@ -279,13 +280,9 @@ const VMStateDescription vmstate_ide_drive = {
|
||||
.... several fields ....
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_ide_drive_pio_state,
|
||||
.needed = ide_drive_pio_state_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_ide_drive_pio_state,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -454,6 +454,7 @@ static const VMStateDescription vmstate_cpu_common_exception_index = {
|
||||
.name = "cpu_common/exception_index",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = cpu_common_exception_index_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(exception_index, CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -471,13 +472,9 @@ const VMStateDescription vmstate_cpu_common = {
|
||||
VMSTATE_UINT32(interrupt_request, CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_cpu_common_exception_index,
|
||||
.needed = cpu_common_exception_index_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_cpu_common_exception_index,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3348,14 +3345,20 @@ bool cpu_physical_memory_is_io(hwaddr phys_addr)
|
||||
return res;
|
||||
}
|
||||
|
||||
void qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque)
|
||||
int qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque)
|
||||
{
|
||||
RAMBlock *block;
|
||||
int ret = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
|
||||
func(block->host, block->offset, block->used_length, opaque);
|
||||
ret = func(block->idstr, block->host, block->offset,
|
||||
block->used_length, opaque);
|
||||
if (ret) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
rcu_read_unlock();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
+4
-6
@@ -152,6 +152,7 @@ static const VMStateDescription vmstate_memhp_state = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.minimum_version_id_old = 1,
|
||||
.needed = vmstate_test_use_memhp,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -175,12 +176,9 @@ const VMStateDescription vmstate_ich9_pm = {
|
||||
VMSTATE_UINT32(smi_sts, ICH9LPCPMRegs),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_memhp_state,
|
||||
.needed = vmstate_test_use_memhp,
|
||||
},
|
||||
VMSTATE_END_OF_LIST()
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_memhp_state,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-6
@@ -260,6 +260,7 @@ static const VMStateDescription vmstate_memhp_state = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.minimum_version_id_old = 1,
|
||||
.needed = vmstate_test_use_memhp,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, PIIX4PMState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -298,12 +299,9 @@ static const VMStateDescription vmstate_acpi = {
|
||||
vmstate_test_use_acpi_pci_hotplug),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_memhp_state,
|
||||
.needed = vmstate_test_use_memhp,
|
||||
},
|
||||
VMSTATE_END_OF_LIST()
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_memhp_state,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+16
-26
@@ -699,6 +699,7 @@ static const VMStateDescription vmstate_fdrive_media_changed = {
|
||||
.name = "fdrive/media_changed",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdrive_media_changed_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(media_changed, FDrive),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -716,6 +717,7 @@ static const VMStateDescription vmstate_fdrive_media_rate = {
|
||||
.name = "fdrive/media_rate",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdrive_media_rate_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(media_rate, FDrive),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -733,6 +735,7 @@ static const VMStateDescription vmstate_fdrive_perpendicular = {
|
||||
.name = "fdrive/perpendicular",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdrive_perpendicular_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(perpendicular, FDrive),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -756,19 +759,11 @@ static const VMStateDescription vmstate_fdrive = {
|
||||
VMSTATE_UINT8(sect, FDrive),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_fdrive_media_changed,
|
||||
.needed = &fdrive_media_changed_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_fdrive_media_rate,
|
||||
.needed = &fdrive_media_rate_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_fdrive_perpendicular,
|
||||
.needed = &fdrive_perpendicular_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_fdrive_media_changed,
|
||||
&vmstate_fdrive_media_rate,
|
||||
&vmstate_fdrive_perpendicular,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
@@ -833,6 +828,7 @@ static const VMStateDescription vmstate_fdc_reset_sensei = {
|
||||
.name = "fdc/reset_sensei",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdc_reset_sensei_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(reset_sensei, FDCtrl),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -850,6 +846,7 @@ static const VMStateDescription vmstate_fdc_result_timer = {
|
||||
.name = "fdc/result_timer",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdc_result_timer_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_TIMER_PTR(result_timer, FDCtrl),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -867,6 +864,7 @@ static const VMStateDescription vmstate_fdc_phase = {
|
||||
.name = "fdc/phase",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = fdc_phase_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(phase, FDCtrl),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -911,19 +909,11 @@ static const VMStateDescription vmstate_fdc = {
|
||||
vmstate_fdrive, FDrive),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_fdc_reset_sensei,
|
||||
.needed = fdc_reset_sensei_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_fdc_result_timer,
|
||||
.needed = fdc_result_timer_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_fdc_phase,
|
||||
.needed = fdc_phase_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_fdc_reset_sensei,
|
||||
&vmstate_fdc_result_timer,
|
||||
&vmstate_fdc_phase,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+16
-25
@@ -662,6 +662,7 @@ static const VMStateDescription vmstate_serial_thr_ipending = {
|
||||
.name = "serial/thr_ipending",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_thr_ipending_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(thr_ipending, SerialState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -678,6 +679,7 @@ static const VMStateDescription vmstate_serial_tsr = {
|
||||
.name = "serial/tsr",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_tsr_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(tsr_retry, SerialState),
|
||||
VMSTATE_UINT8(thr, SerialState),
|
||||
@@ -697,6 +699,7 @@ static const VMStateDescription vmstate_serial_recv_fifo = {
|
||||
.name = "serial/recv_fifo",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_recv_fifo_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_STRUCT(recv_fifo, SerialState, 1, vmstate_fifo8, Fifo8),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -713,6 +716,7 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
|
||||
.name = "serial/xmit_fifo",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_xmit_fifo_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_STRUCT(xmit_fifo, SerialState, 1, vmstate_fifo8, Fifo8),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -729,6 +733,7 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
|
||||
.name = "serial/fifo_timeout_timer",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_fifo_timeout_timer_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_TIMER_PTR(fifo_timeout_timer, SerialState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -745,6 +750,7 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
|
||||
.name = "serial/timeout_ipending",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = serial_timeout_ipending_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(timeout_ipending, SerialState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -760,6 +766,7 @@ static bool serial_poll_needed(void *opaque)
|
||||
static const VMStateDescription vmstate_serial_poll = {
|
||||
.name = "serial/poll",
|
||||
.version_id = 1,
|
||||
.needed = serial_poll_needed,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(poll_msl, SerialState),
|
||||
@@ -788,31 +795,15 @@ const VMStateDescription vmstate_serial = {
|
||||
VMSTATE_UINT8_V(fcr_vmstate, SerialState, 3),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_serial_thr_ipending,
|
||||
.needed = &serial_thr_ipending_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_tsr,
|
||||
.needed = &serial_tsr_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_recv_fifo,
|
||||
.needed = &serial_recv_fifo_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_xmit_fifo,
|
||||
.needed = &serial_xmit_fifo_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_fifo_timeout_timer,
|
||||
.needed = &serial_fifo_timeout_timer_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_timeout_ipending,
|
||||
.needed = &serial_timeout_ipending_needed,
|
||||
} , {
|
||||
.vmsd = &vmstate_serial_poll,
|
||||
.needed = &serial_poll_needed,
|
||||
} , {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_serial_thr_ipending,
|
||||
&vmstate_serial_tsr,
|
||||
&vmstate_serial_recv_fifo,
|
||||
&vmstate_serial_xmit_fifo,
|
||||
&vmstate_serial_fifo_timeout_timer,
|
||||
&vmstate_serial_timeout_ipending,
|
||||
&vmstate_serial_poll,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-7
@@ -2220,6 +2220,7 @@ static VMStateDescription qxl_vmstate_monitors_config = {
|
||||
.name = "qxl/monitors-config",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = qxl_monitors_config_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64(guest_monitors_config, PCIQXLDevice),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -2253,13 +2254,9 @@ static VMStateDescription qxl_vmstate = {
|
||||
VMSTATE_UINT64(guest_cursor, PCIQXLDevice),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &qxl_vmstate_monitors_config,
|
||||
.needed = qxl_monitors_config_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&qxl_vmstate_monitors_config,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-7
@@ -2035,6 +2035,7 @@ static const VMStateDescription vmstate_vga_endian = {
|
||||
.name = "vga.endian",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = vga_endian_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(big_endian_fb, VGACommonState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -2078,13 +2079,9 @@ const VMStateDescription vmstate_vga_common = {
|
||||
VMSTATE_UINT32(vbe_bank_mask, VGACommonState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_vga_endian,
|
||||
.needed = vga_endian_state_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_vga_endian,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#ifdef CONFIG_XEN
|
||||
# include <xen/hvm/hvm_info_table.h>
|
||||
#endif
|
||||
#include "migration/migration.h"
|
||||
|
||||
#define MAX_IDE_BUS 2
|
||||
|
||||
@@ -305,6 +306,7 @@ static void pc_init1(MachineState *machine)
|
||||
|
||||
static void pc_compat_2_3(MachineState *machine)
|
||||
{
|
||||
savevm_skip_section_footers();
|
||||
}
|
||||
|
||||
static void pc_compat_2_2(MachineState *machine)
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "hw/usb.h"
|
||||
#include "hw/cpu/icc_bus.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "migration/migration.h"
|
||||
|
||||
/* ICH9 AHCI has 6 ports */
|
||||
#define MAX_SATA_PORTS 6
|
||||
@@ -289,6 +290,7 @@ static void pc_q35_init(MachineState *machine)
|
||||
|
||||
static void pc_compat_2_3(MachineState *machine)
|
||||
{
|
||||
savevm_skip_section_footers();
|
||||
}
|
||||
|
||||
static void pc_compat_2_2(MachineState *machine)
|
||||
|
||||
+12
-20
@@ -2561,6 +2561,7 @@ static const VMStateDescription vmstate_ide_atapi_gesn_state = {
|
||||
.name ="ide_drive/atapi/gesn_state",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ide_atapi_gesn_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(events.new_media, IDEState),
|
||||
VMSTATE_BOOL(events.eject_request, IDEState),
|
||||
@@ -2572,6 +2573,7 @@ static const VMStateDescription vmstate_ide_tray_state = {
|
||||
.name = "ide_drive/tray_state",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ide_tray_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(tray_open, IDEState),
|
||||
VMSTATE_BOOL(tray_locked, IDEState),
|
||||
@@ -2585,6 +2587,7 @@ static const VMStateDescription vmstate_ide_drive_pio_state = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_save = ide_drive_pio_pre_save,
|
||||
.post_load = ide_drive_pio_post_load,
|
||||
.needed = ide_drive_pio_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(req_nb_sectors, IDEState),
|
||||
VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1,
|
||||
@@ -2626,19 +2629,11 @@ const VMStateDescription vmstate_ide_drive = {
|
||||
VMSTATE_UINT8_V(cdrom_changed, IDEState, 3),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_ide_drive_pio_state,
|
||||
.needed = ide_drive_pio_state_needed,
|
||||
}, {
|
||||
.vmsd = &vmstate_ide_tray_state,
|
||||
.needed = ide_tray_state_needed,
|
||||
}, {
|
||||
.vmsd = &vmstate_ide_atapi_gesn_state,
|
||||
.needed = ide_atapi_gesn_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_ide_drive_pio_state,
|
||||
&vmstate_ide_tray_state,
|
||||
&vmstate_ide_atapi_gesn_state,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2646,6 +2641,7 @@ static const VMStateDescription vmstate_ide_error_status = {
|
||||
.name ="ide_bus/error",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ide_error_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(error_status, IDEBus),
|
||||
VMSTATE_INT64_V(retry_sector_num, IDEBus, 2),
|
||||
@@ -2664,13 +2660,9 @@ const VMStateDescription vmstate_ide_bus = {
|
||||
VMSTATE_UINT8(unit, IDEBus),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_ide_error_status,
|
||||
.needed = ide_error_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_ide_error_status,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+6
-10
@@ -350,6 +350,7 @@ static const VMStateDescription vmstate_bmdma_current = {
|
||||
.name = "ide bmdma_current",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ide_bmdma_current_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(cur_addr, BMDMAState),
|
||||
VMSTATE_UINT32(cur_prd_last, BMDMAState),
|
||||
@@ -363,6 +364,7 @@ static const VMStateDescription vmstate_bmdma_status = {
|
||||
.name ="ide bmdma/status",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ide_bmdma_status_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(status, BMDMAState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -383,16 +385,10 @@ static const VMStateDescription vmstate_bmdma = {
|
||||
VMSTATE_UINT8(migration_retry_unit, BMDMAState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_bmdma_current,
|
||||
.needed = ide_bmdma_current_needed,
|
||||
}, {
|
||||
.vmsd = &vmstate_bmdma_status,
|
||||
.needed = ide_bmdma_status_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_bmdma_current,
|
||||
&vmstate_bmdma_status,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+15
-17
@@ -391,23 +391,24 @@ static int kbd_outport_post_load(void *opaque, int version_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_kbd_outport = {
|
||||
.name = "pckbd_outport",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = kbd_outport_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(outport, KBDState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static bool kbd_outport_needed(void *opaque)
|
||||
{
|
||||
KBDState *s = opaque;
|
||||
return s->outport != kbd_outport_default(s);
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_kbd_outport = {
|
||||
.name = "pckbd_outport",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = kbd_outport_post_load,
|
||||
.needed = kbd_outport_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(outport, KBDState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static int kbd_post_load(void *opaque, int version_id)
|
||||
{
|
||||
KBDState *s = opaque;
|
||||
@@ -430,12 +431,9 @@ static const VMStateDescription vmstate_kbd = {
|
||||
VMSTATE_UINT8(pending, KBDState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_kbd_outport,
|
||||
.needed = kbd_outport_needed,
|
||||
},
|
||||
VMSTATE_END_OF_LIST()
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_kbd_outport,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-7
@@ -677,6 +677,7 @@ static const VMStateDescription vmstate_ps2_keyboard_ledstate = {
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.post_load = ps2_kbd_ledstate_post_load,
|
||||
.needed = ps2_keyboard_ledstate_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(ledstate, PS2KbdState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -717,13 +718,9 @@ static const VMStateDescription vmstate_ps2_keyboard = {
|
||||
VMSTATE_INT32_V(scancode_set, PS2KbdState,3),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection []) {
|
||||
{
|
||||
.vmsd = &vmstate_ps2_keyboard_ledstate,
|
||||
.needed = ps2_keyboard_ledstate_needed,
|
||||
}, {
|
||||
/* empty */
|
||||
}
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_ps2_keyboard_ledstate,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -369,6 +369,7 @@ static const VMStateDescription vmstate_apic_common_sipi = {
|
||||
.name = "apic_sipi",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = apic_common_sipi_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_INT32(sipi_vector, APICCommonState),
|
||||
VMSTATE_INT32(wait_for_sipi, APICCommonState),
|
||||
@@ -408,12 +409,9 @@ static const VMStateDescription vmstate_apic_common = {
|
||||
APICCommonState), /* open-coded timer state */
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_apic_common_sipi,
|
||||
.needed = apic_common_sipi_needed,
|
||||
},
|
||||
VMSTATE_END_OF_LIST()
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_apic_common_sipi,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-6
@@ -650,6 +650,7 @@ static const VMStateDescription vmstate_ich9_rst_cnt = {
|
||||
.name = "ICH9LPC/rst_cnt",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = ich9_rst_cnt_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT8(rst_cnt, ICH9LPCState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -669,12 +670,9 @@ static const VMStateDescription vmstate_ich9_lpc = {
|
||||
VMSTATE_UINT32(sci_level, ICH9LPCState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (VMStateSubsection[]) {
|
||||
{
|
||||
.vmsd = &vmstate_ich9_rst_cnt,
|
||||
.needed = ich9_rst_cnt_needed
|
||||
},
|
||||
{ 0 }
|
||||
.subsections = (const VMStateDescription*[]) {
|
||||
&vmstate_ich9_rst_cnt,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user