qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 31/71] hw/i386: Constify VMState
Date: Fri, 22 Dec 2023 10:54:19 +0800	[thread overview]
Message-ID: <ZYT6W8q965w3LvUm@intel.com> (raw)
In-Reply-To: <20231221031652.119827-32-richard.henderson@linaro.org>

On Thu, Dec 21, 2023 at 02:16:12PM +1100, Richard Henderson wrote:
> Date: Thu, 21 Dec 2023 14:16:12 +1100
> From: Richard Henderson <richard.henderson@linaro.org>
> Subject: [PATCH v2 31/71] hw/i386: Constify VMState
> X-Mailer: git-send-email 2.34.1
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

>  hw/i386/acpi-build.c       | 2 +-
>  hw/i386/intel_iommu.c      | 2 +-
>  hw/i386/kvm/clock.c        | 6 +++---
>  hw/i386/kvm/xen_evtchn.c   | 4 ++--
>  hw/i386/kvm/xen_gnttab.c   | 2 +-
>  hw/i386/kvm/xen_overlay.c  | 2 +-
>  hw/i386/kvm/xen_xenstore.c | 2 +-
>  hw/i386/kvmvapic.c         | 6 +++---
>  hw/i386/port92.c           | 2 +-
>  hw/i386/vmmouse.c          | 2 +-
>  hw/i386/xen/xen_platform.c | 2 +-
>  hw/i386/xen/xen_pvdevice.c | 2 +-
>  12 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 80db183b78..edc979379c 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -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()
>      },
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 5085a6fee3..ed5677c0ae 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -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),
> 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,
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 43f8a8f679..f2b0aff479 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -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),
> diff --git a/hw/i386/port92.c b/hw/i386/port92.c
> index e1379a4f98..1070bfbf36 100644
> --- a/hw/i386/port92.c
> +++ b/hw/i386/port92.c
> @@ -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()
>      }
> diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
> index 91320afa2f..a8d014d09a 100644
> --- a/hw/i386/vmmouse.c
> +++ b/hw/i386/vmmouse.c
> @@ -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),
> diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
> index ef7d3fc05f..708488af32 100644
> --- a/hw/i386/xen/xen_platform.c
> +++ b/hw/i386/xen/xen_platform.c
> @@ -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()
> diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
> index e62e06622b..ed621531d8 100644
> --- a/hw/i386/xen/xen_pvdevice.c
> +++ b/hw/i386/xen/xen_pvdevice.c
> @@ -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()
>      }
> -- 
> 2.34.1
> 
> 


  reply	other threads:[~2023-12-22  2:42 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  3:15 [PATCH v2 00/71] *: Constify VMState Richard Henderson
2023-12-21  3:15 ` [PATCH v2 01/71] migration: Make VMStateDescription.subsections const Richard Henderson
2023-12-21  3:15 ` [PATCH v2 02/71] target/arm: Constify VMState in machine.c Richard Henderson
2023-12-21  3:15 ` [PATCH v2 03/71] target/arm: Constify hvf/hvf.c Richard Henderson
2023-12-21  3:15 ` [PATCH v2 04/71] target/alpha: Constify VMState in machine.c Richard Henderson
2023-12-21  3:15 ` [PATCH v2 05/71] target/avr: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 06/71] target/cris: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 07/71] target/hppa: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 08/71] target/i386: " Richard Henderson
2023-12-22  2:51   ` Zhao Liu
2023-12-21  3:15 ` [PATCH v2 09/71] target/loongarch: " Richard Henderson
2023-12-21  6:43   ` gaosong
2023-12-21  3:15 ` [PATCH v2 10/71] target/m68k: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 11/71] target/microblaze: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 12/71] target/mips: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 13/71] target/openrisc: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 14/71] target/ppc: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 15/71] target/riscv: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 16/71] target/s390x: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 17/71] target/sparc: " Richard Henderson
2023-12-21  3:15 ` [PATCH v2 18/71] hw/arm: Constify VMState Richard Henderson
2023-12-21  3:16 ` [PATCH v2 19/71] hw/core: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 20/71] hw/9pfs: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 21/71] hw/acpi: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 22/71] hw/adc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 23/71] hw/audio: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 24/71] hw/block: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 25/71] hw/char: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 26/71] hw/display: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 27/71] hw/dma: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 28/71] hw/gpio: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 29/71] hw/hyperv: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 30/71] hw/i2c: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 31/71] hw/i386: " Richard Henderson
2023-12-22  2:54   ` Zhao Liu [this message]
2023-12-21  3:16 ` [PATCH v2 32/71] hw/ide: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 33/71] hw/input: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 34/71] hw/intc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 35/71] hw/ipack: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 36/71] hw/ipmi: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 37/71] hw/isa: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 38/71] hw/loongarch: " Richard Henderson
2023-12-21  6:44   ` gaosong
2023-12-21  3:16 ` [PATCH v2 39/71] hw/m68k: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 40/71] hw/misc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 41/71] hw/net: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 42/71] hw/nvram: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 43/71] hw/openrisc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 44/71] hw/pci: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 45/71] hw/pci-bridge: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 46/71] hw/pci-host: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 47/71] hw/ppc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 48/71] hw/riscv: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 49/71] hw/rtc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 50/71] hw/s390x: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 51/71] hw/scsi: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 52/71] hw/sd: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 53/71] hw/sensor: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 54/71] hw/sparc: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 55/71] hw/ssi: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 56/71] hw/timer: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 57/71] hw/tpm: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 58/71] hw/usb: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 59/71] hw/vfio: " Richard Henderson
2023-12-21  8:14   ` Cédric Le Goater
2023-12-21  3:16 ` [PATCH v2 60/71] hw/virtio: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 61/71] hw/watchdog: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 62/71] hw/misc/macio: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 63/71] audio: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 64/71] backends: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 65/71] cpu-target: " Richard Henderson
2023-12-22  2:55   ` Zhao Liu
2023-12-21  3:16 ` [PATCH v2 66/71] migration: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 67/71] system: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 68/71] replay: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 69/71] util/fifo8: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 70/71] tests/unit/test-vmstate: " Richard Henderson
2023-12-21  3:16 ` [PATCH v2 71/71] docs: Constify VMstate in examples Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZYT6W8q965w3LvUm@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).