aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/kvm
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-12-21 14:16:12 +1100
committerRichard Henderson <richard.henderson@linaro.org>2023-12-29 11:17:30 +1100
commit9231a01788af7c3d1156186ee9f073cf9804c8a7 (patch)
treea45f811c3d35a4673cbc7dfcc873dc82a1cb9588 /hw/i386/kvm
parent01d9442a889f545a41151066f6a577822166d21e (diff)
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>
Diffstat (limited to 'hw/i386/kvm')
-rw-r--r--hw/i386/kvm/clock.c6
-rw-r--r--hw/i386/kvm/xen_evtchn.c4
-rw-r--r--hw/i386/kvm/xen_gnttab.c2
-rw-r--r--hw/i386/kvm/xen_overlay.c2
-rw-r--r--hw/i386/kvm/xen_xenstore.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index e756b0aa43..40aa9a32c3 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -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
}
diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c
index 02b8cbf8df..9a5f3caa24 100644
--- a/hw/i386/kvm/xen_evtchn.c
+++ b/hw/i386/kvm/xen_evtchn.c
@@ -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,
diff --git a/hw/i386/kvm/xen_gnttab.c b/hw/i386/kvm/xen_gnttab.c
index 0a24f53f20..a0cc30f619 100644
--- a/hw/i386/kvm/xen_gnttab.c
+++ b/hw/i386/kvm/xen_gnttab.c
@@ -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),
diff --git a/hw/i386/kvm/xen_overlay.c b/hw/i386/kvm/xen_overlay.c
index 39fda1b72c..526f7a6077 100644
--- a/hw/i386/kvm/xen_overlay.c
+++ b/hw/i386/kvm/xen_overlay.c
@@ -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()
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 6e651960b3..c3633f7829 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -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,