hw/i386: Constify VMState
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20231221031652.119827-32-richard.henderson@linaro.org>
This commit is contained in:
parent
01d9442a88
commit
9231a01788
@ -2770,7 +2770,7 @@ static const VMStateDescription vmstate_acpi_build = {
|
||||
.name = "acpi_build",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(patched, AcpiBuildState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
|
@ -3289,7 +3289,7 @@ static const VMStateDescription vtd_vmstate = {
|
||||
.minimum_version_id = 1,
|
||||
.priority = MIG_PRI_IOMMU,
|
||||
.post_load = vtd_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(root, IntelIOMMUState),
|
||||
VMSTATE_UINT64(intr_root, IntelIOMMUState),
|
||||
VMSTATE_UINT64(iq, IntelIOMMUState),
|
||||
|
@ -245,7 +245,7 @@ static const VMStateDescription kvmclock_reliable_get_clock = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = kvmclock_clock_is_reliable_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_BOOL(clock_is_reliable, KVMClockState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
@ -295,11 +295,11 @@ static const VMStateDescription kvmclock_vmsd = {
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = kvmclock_pre_load,
|
||||
.pre_save = kvmclock_pre_save,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(clock, KVMClockState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
.subsections = (const VMStateDescription * const []) {
|
||||
&kvmclock_reliable_get_clock,
|
||||
NULL
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ static const VMStateDescription xen_evtchn_port_vmstate = {
|
||||
.name = "xen_evtchn_port",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(vcpu, XenEvtchnPort),
|
||||
VMSTATE_UINT16(type, XenEvtchnPort),
|
||||
VMSTATE_UINT16(u.val, XenEvtchnPort),
|
||||
@ -255,7 +255,7 @@ static const VMStateDescription xen_evtchn_vmstate = {
|
||||
.needed = xen_evtchn_is_needed,
|
||||
.pre_load = xen_evtchn_pre_load,
|
||||
.post_load = xen_evtchn_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(callback_param, XenEvtchnState),
|
||||
VMSTATE_UINT32(nr_ports, XenEvtchnState),
|
||||
VMSTATE_STRUCT_VARRAY_UINT32(port_table, XenEvtchnState, nr_ports, 1,
|
||||
|
@ -127,7 +127,7 @@ static const VMStateDescription xen_gnttab_vmstate = {
|
||||
.minimum_version_id = 1,
|
||||
.needed = xen_gnttab_is_needed,
|
||||
.post_load = xen_gnttab_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(nr_frames, XenGnttabState),
|
||||
VMSTATE_VARRAY_UINT32(gnt_frame_gpas, XenGnttabState, nr_frames, 0,
|
||||
vmstate_info_uint64, uint64_t),
|
||||
|
@ -139,7 +139,7 @@ static const VMStateDescription xen_overlay_vmstate = {
|
||||
.needed = xen_overlay_is_needed,
|
||||
.pre_save = xen_overlay_pre_save,
|
||||
.post_load = xen_overlay_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT64(shinfo_gpa, XenOverlayState),
|
||||
VMSTATE_BOOL(long_mode, XenOverlayState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -243,7 +243,7 @@ static const VMStateDescription xen_xenstore_vmstate = {
|
||||
.needed = xen_xenstore_is_needed,
|
||||
.pre_save = xen_xenstore_pre_save,
|
||||
.post_load = xen_xenstore_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8_ARRAY(req_data, XenXenstoreState,
|
||||
sizeof_field(XenXenstoreState, req_data)),
|
||||
VMSTATE_UINT8_ARRAY(rsp_data, XenXenstoreState,
|
||||
|
@ -802,7 +802,7 @@ static const VMStateDescription vmstate_handlers = {
|
||||
.name = "kvmvapic-handlers",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32(set_tpr, VAPICHandlers),
|
||||
VMSTATE_UINT32(set_tpr_eax, VAPICHandlers),
|
||||
VMSTATE_UINT32_ARRAY(get_tpr, VAPICHandlers, 8),
|
||||
@ -815,7 +815,7 @@ static const VMStateDescription vmstate_guest_rom = {
|
||||
.name = "kvmvapic-guest-rom",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UNUSED(8), /* signature */
|
||||
VMSTATE_UINT32(vaddr, GuestROMState),
|
||||
VMSTATE_UINT32(fixup_start, GuestROMState),
|
||||
@ -835,7 +835,7 @@ static const VMStateDescription vmstate_vapic = {
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = vapic_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(rom_state, VAPICROMState, 0, vmstate_guest_rom,
|
||||
GuestROMState),
|
||||
VMSTATE_UINT32(state, VAPICROMState),
|
||||
|
@ -54,7 +54,7 @@ static const VMStateDescription vmstate_port92_isa = {
|
||||
.name = "port92",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT8(outport, Port92State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ static const VMStateDescription vmstate_vmmouse = {
|
||||
.version_id = 0,
|
||||
.minimum_version_id = 0,
|
||||
.post_load = vmmouse_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_INT32_EQUAL(queue_size, VMMouseState, NULL),
|
||||
VMSTATE_UINT32_ARRAY(queue, VMMouseState, VMMOUSE_QUEUE_SIZE),
|
||||
VMSTATE_UINT16(nb_queue, VMMouseState),
|
||||
|
@ -537,7 +537,7 @@ static const VMStateDescription vmstate_xen_platform = {
|
||||
.version_id = 4,
|
||||
.minimum_version_id = 4,
|
||||
.post_load = xen_platform_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, PCIXenPlatformState),
|
||||
VMSTATE_UINT8(flags, PCIXenPlatformState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@ -77,7 +77,7 @@ static const VMStateDescription vmstate_xen_pvdevice = {
|
||||
.name = "xen-pvdevice",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_PCI_DEVICE(parent_obj, XenPVDevice),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user