mbox series

[00/10] qom: Constify class_data

Message ID 20250210102604.34284-1-philmd@linaro.org
Headers show
Series qom: Constify class_data | expand

Message

Philippe Mathieu-Daudé Feb. 10, 2025, 10:25 a.m. UTC
Following Richard's suggestion [*], make QOM class data *const*.

Note, rust code not modified...

[*] https://lore.kernel.org/qemu-devel/f4ec871d-e759-44bc-a10b-872322330a3f@linaro.org/

Philippe Mathieu-Daudé (10):
  target/i386: Constify X86CPUModel uses
  target/sparc: Constify SPARCCPUClass::cpu_def
  target/xtensa: Finalize config in xtensa_register_core()
  target/riscv: Declare RISCVCPUClass::misa_mxl_max as RISCVMXL
  target/riscv: Convert misa_mxl_max using GLib macros
  hw: Declare various const data as 'const'
  hw: Make class data 'const'
  qom: Have class_base_init() take a const data argument
  qom: Have class_init() take a const data argument
  qom: Constify class_data

 docs/devel/qom.rst                            |  8 +-
 docs/devel/reset.rst                          |  2 +-
 docs/devel/virtio-backends.rst                |  2 +-
 hw/sd/sdhci-internal.h                        |  2 +-
 hw/usb/hcd-uhci.h                             |  2 +-
 include/hw/boards.h                           |  2 +-
 include/hw/core/cpu.h                         |  2 +-
 include/hw/i386/pc.h                          |  5 +-
 include/hw/virtio/virtio-pci.h                |  2 +-
 include/qom/object.h                          |  8 +-
 target/arm/cpu.h                              |  2 +-
 target/i386/cpu.h                             |  2 +-
 target/ppc/cpu.h                              |  3 +-
 target/riscv/cpu.h                            |  2 +-
 target/sparc/cpu.h                            |  2 +-
 accel/hvf/hvf-accel-ops.c                     |  4 +-
 accel/kvm/kvm-accel-ops.c                     |  2 +-
 accel/kvm/kvm-all.c                           |  2 +-
 accel/qtest/qtest.c                           |  4 +-
 accel/tcg/tcg-accel-ops.c                     |  2 +-
 accel/tcg/tcg-all.c                           |  2 +-
 accel/xen/xen-all.c                           |  4 +-
 authz/list.c                                  |  2 +-
 authz/listfile.c                              |  2 +-
 authz/pamacct.c                               |  2 +-
 authz/simple.c                                |  2 +-
 backends/confidential-guest-support.c         |  3 +-
 backends/cryptodev-builtin.c                  |  2 +-
 backends/cryptodev-lkcf.c                     |  2 +-
 backends/cryptodev-vhost-user.c               |  2 +-
 backends/cryptodev.c                          |  2 +-
 backends/dbus-vmstate.c                       |  2 +-
 backends/host_iommu_device.c                  |  2 +-
 backends/hostmem-epc.c                        |  2 +-
 backends/hostmem-file.c                       |  2 +-
 backends/hostmem-memfd.c                      |  2 +-
 backends/hostmem-ram.c                        |  2 +-
 backends/hostmem-shm.c                        |  2 +-
 backends/hostmem.c                            |  2 +-
 backends/iommufd.c                            |  4 +-
 backends/rng-builtin.c                        |  2 +-
 backends/rng-egd.c                            |  2 +-
 backends/rng-random.c                         |  2 +-
 backends/rng.c                                |  2 +-
 backends/tpm/tpm_emulator.c                   |  2 +-
 backends/tpm/tpm_passthrough.c                |  2 +-
 backends/vhost-user.c                         |  2 +-
 block/throttle-groups.c                       |  3 +-
 chardev/baum.c                                |  2 +-
 chardev/char-console.c                        |  2 +-
 chardev/char-fd.c                             |  2 +-
 chardev/char-file.c                           |  2 +-
 chardev/char-hub.c                            |  2 +-
 chardev/char-mux.c                            |  2 +-
 chardev/char-null.c                           |  2 +-
 chardev/char-parallel.c                       |  2 +-
 chardev/char-pipe.c                           |  2 +-
 chardev/char-pty.c                            |  2 +-
 chardev/char-ringbuf.c                        |  2 +-
 chardev/char-serial.c                         |  2 +-
 chardev/char-socket.c                         |  2 +-
 chardev/char-stdio.c                          |  2 +-
 chardev/char-udp.c                            |  2 +-
 chardev/char-win-stdio.c                      |  2 +-
 chardev/char-win.c                            |  2 +-
 chardev/char.c                                |  2 +-
 chardev/msmouse.c                             |  2 +-
 chardev/spice.c                               |  6 +-
 chardev/testdev.c                             |  2 +-
 chardev/wctablet.c                            |  2 +-
 crypto/secret.c                               |  2 +-
 crypto/secret_common.c                        |  2 +-
 crypto/secret_keyring.c                       |  2 +-
 crypto/tls-cipher-suites.c                    |  3 +-
 crypto/tlscreds.c                             |  2 +-
 crypto/tlscredsanon.c                         |  2 +-
 crypto/tlscredspsk.c                          |  2 +-
 crypto/tlscredsx509.c                         |  2 +-
 event-loop-base.c                             |  3 +-
 gdbstub/system.c                              |  2 +-
 hw/9pfs/virtio-9p-device.c                    |  2 +-
 hw/acpi/erst.c                                |  2 +-
 hw/acpi/generic_event_device.c                |  2 +-
 hw/acpi/pci.c                                 |  4 +-
 hw/acpi/piix4.c                               |  2 +-
 hw/acpi/vmclock.c                             |  2 +-
 hw/acpi/vmgenid.c                             |  2 +-
 hw/adc/aspeed_adc.c                           | 10 +--
 hw/adc/npcm7xx_adc.c                          |  2 +-
 hw/adc/stm32f2xx_adc.c                        |  2 +-
 hw/adc/zynq-xadc.c                            |  2 +-
 hw/alpha/typhoon.c                            |  2 +-
 hw/arm/allwinner-a10.c                        |  2 +-
 hw/arm/allwinner-h3.c                         |  2 +-
 hw/arm/allwinner-r40.c                        |  2 +-
 hw/arm/armsse.c                               |  4 +-
 hw/arm/armv7m.c                               |  4 +-
 hw/arm/aspeed.c                               | 56 +++++++-----
 hw/arm/aspeed_ast10x0.c                       |  2 +-
 hw/arm/aspeed_ast2400.c                       |  4 +-
 hw/arm/aspeed_ast2600.c                       |  2 +-
 hw/arm/aspeed_ast27x0.c                       |  2 +-
 hw/arm/aspeed_soc_common.c                    |  2 +-
 hw/arm/b-l475e-iot01a.c                       |  2 +-
 hw/arm/bcm2835_peripherals.c                  |  2 +-
 hw/arm/bcm2836.c                              |  8 +-
 hw/arm/bcm2838.c                              |  2 +-
 hw/arm/bcm2838_peripherals.c                  |  2 +-
 hw/arm/collie.c                               |  2 +-
 hw/arm/digic.c                                |  2 +-
 hw/arm/exynos4210.c                           |  2 +-
 hw/arm/exynos4_boards.c                       |  4 +-
 hw/arm/fby35.c                                |  2 +-
 hw/arm/fsl-imx25.c                            |  2 +-
 hw/arm/fsl-imx31.c                            |  2 +-
 hw/arm/fsl-imx6.c                             |  2 +-
 hw/arm/fsl-imx6ul.c                           |  2 +-
 hw/arm/fsl-imx7.c                             |  2 +-
 hw/arm/highbank.c                             |  6 +-
 hw/arm/integratorcp.c                         |  6 +-
 hw/arm/microbit.c                             |  2 +-
 hw/arm/mps2-tz.c                              | 10 +--
 hw/arm/mps2.c                                 | 10 +--
 hw/arm/mps3r.c                                |  4 +-
 hw/arm/msf2-soc.c                             |  2 +-
 hw/arm/musca.c                                |  6 +-
 hw/arm/musicpal.c                             | 14 +--
 hw/arm/npcm7xx.c                              |  6 +-
 hw/arm/npcm7xx_boards.c                       | 12 +--
 hw/arm/nrf51_soc.c                            |  2 +-
 hw/arm/omap_sx1.c                             |  4 +-
 hw/arm/raspi.c                                | 10 +--
 hw/arm/raspi4b.c                              |  2 +-
 hw/arm/realview.c                             |  8 +-
 hw/arm/sbsa-ref.c                             |  2 +-
 hw/arm/smmu-common.c                          |  2 +-
 hw/arm/smmuv3.c                               |  4 +-
 hw/arm/stellaris.c                            | 10 +--
 hw/arm/stm32f100_soc.c                        |  2 +-
 hw/arm/stm32f205_soc.c                        |  2 +-
 hw/arm/stm32f405_soc.c                        |  2 +-
 hw/arm/stm32l4x5_soc.c                        |  8 +-
 hw/arm/strongarm.c                            | 13 +--
 hw/arm/versatilepb.c                          |  6 +-
 hw/arm/vexpress.c                             |  6 +-
 hw/arm/virt.c                                 |  4 +-
 hw/arm/xen-pvh.c                              |  2 +-
 hw/arm/xilinx_zynq.c                          |  2 +-
 hw/arm/xlnx-versal-virt.c                     |  2 +-
 hw/arm/xlnx-versal.c                          |  2 +-
 hw/arm/xlnx-zcu102.c                          |  2 +-
 hw/arm/xlnx-zynqmp.c                          |  2 +-
 hw/audio/ac97.c                               |  2 +-
 hw/audio/adlib.c                              |  2 +-
 hw/audio/asc.c                                |  2 +-
 hw/audio/cs4231.c                             |  2 +-
 hw/audio/cs4231a.c                            |  2 +-
 hw/audio/es1370.c                             |  2 +-
 hw/audio/gus.c                                |  2 +-
 hw/audio/hda-codec.c                          |  8 +-
 hw/audio/intel-hda.c                          |  8 +-
 hw/audio/marvell_88w8618.c                    |  2 +-
 hw/audio/pcspk.c                              |  2 +-
 hw/audio/pl041.c                              |  2 +-
 hw/audio/sb16.c                               |  2 +-
 hw/audio/via-ac97.c                           |  4 +-
 hw/audio/virtio-snd-pci.c                     |  2 +-
 hw/audio/virtio-snd.c                         |  2 +-
 hw/audio/wm8750.c                             |  2 +-
 hw/avr/arduino.c                              | 10 +--
 hw/avr/atmega.c                               | 10 +--
 hw/block/fdc-isa.c                            |  2 +-
 hw/block/fdc-sysbus.c                         |  6 +-
 hw/block/fdc.c                                |  2 +-
 hw/block/m25p80.c                             |  6 +-
 hw/block/nand.c                               |  2 +-
 hw/block/pflash_cfi01.c                       |  2 +-
 hw/block/pflash_cfi02.c                       |  2 +-
 hw/block/swim.c                               |  4 +-
 hw/block/vhost-user-blk.c                     |  2 +-
 hw/block/virtio-blk.c                         |  2 +-
 hw/block/xen-block.c                          |  6 +-
 hw/char/avr_usart.c                           |  2 +-
 hw/char/bcm2835_aux.c                         |  2 +-
 hw/char/cadence_uart.c                        |  2 +-
 hw/char/cmsdk-apb-uart.c                      |  2 +-
 hw/char/debugcon.c                            |  2 +-
 hw/char/digic-uart.c                          |  2 +-
 hw/char/diva-gsp.c                            |  4 +-
 hw/char/escc.c                                |  2 +-
 hw/char/exynos4210_uart.c                     |  2 +-
 hw/char/goldfish_tty.c                        |  2 +-
 hw/char/grlib_apbuart.c                       |  2 +-
 hw/char/ibex_uart.c                           |  2 +-
 hw/char/imx_serial.c                          |  2 +-
 hw/char/ipoctal232.c                          |  2 +-
 hw/char/mcf_uart.c                            |  2 +-
 hw/char/mchp_pfsoc_mmuart.c                   |  2 +-
 hw/char/nrf51_uart.c                          |  2 +-
 hw/char/parallel.c                            |  2 +-
 hw/char/pl011.c                               |  2 +-
 hw/char/renesas_sci.c                         |  2 +-
 hw/char/sclpconsole-lm.c                      |  2 +-
 hw/char/sclpconsole.c                         |  2 +-
 hw/char/serial-isa.c                          |  2 +-
 hw/char/serial-mm.c                           |  2 +-
 hw/char/serial-pci-multi.c                    |  6 +-
 hw/char/serial-pci.c                          |  2 +-
 hw/char/serial.c                              |  2 +-
 hw/char/sh_serial.c                           |  2 +-
 hw/char/shakti_uart.c                         |  2 +-
 hw/char/sifive_uart.c                         |  2 +-
 hw/char/spapr_vty.c                           |  2 +-
 hw/char/stm32f2xx_usart.c                     |  2 +-
 hw/char/stm32l4x5_usart.c                     |  9 +-
 hw/char/terminal3270.c                        |  2 +-
 hw/char/virtio-console.c                      |  4 +-
 hw/char/virtio-serial-bus.c                   |  6 +-
 hw/char/xen_console.c                         |  2 +-
 hw/char/xilinx_uartlite.c                     |  2 +-
 hw/core/bus.c                                 |  2 +-
 hw/core/clock.c                               |  2 +-
 hw/core/cpu-common.c                          |  2 +-
 hw/core/generic-loader.c                      |  2 +-
 hw/core/guest-loader.c                        |  2 +-
 hw/core/machine.c                             |  4 +-
 hw/core/or-irq.c                              |  2 +-
 hw/core/platform-bus.c                        |  2 +-
 hw/core/qdev.c                                |  4 +-
 hw/core/register.c                            |  2 +-
 hw/core/reset.c                               |  2 +-
 hw/core/resetcontainer.c                      |  3 +-
 hw/core/split-irq.c                           |  2 +-
 hw/core/sysbus.c                              |  4 +-
 hw/cpu/a15mpcore.c                            |  2 +-
 hw/cpu/a9mpcore.c                             |  2 +-
 hw/cpu/arm11mpcore.c                          |  2 +-
 hw/cpu/cluster.c                              |  2 +-
 hw/cpu/core.c                                 |  2 +-
 hw/cpu/realview_mpcore.c                      |  2 +-
 hw/cxl/switch-mailbox-cci.c                   |  2 +-
 hw/display/artist.c                           |  2 +-
 hw/display/ati.c                              |  2 +-
 hw/display/bcm2835_fb.c                       |  2 +-
 hw/display/bochs-display.c                    |  2 +-
 hw/display/cg3.c                              |  2 +-
 hw/display/cirrus_vga.c                       |  2 +-
 hw/display/cirrus_vga_isa.c                   |  2 +-
 hw/display/dm163.c                            |  2 +-
 hw/display/dpcd.c                             |  2 +-
 hw/display/exynos4210_fimd.c                  |  2 +-
 hw/display/g364fb.c                           |  2 +-
 hw/display/i2c-ddc.c                          |  2 +-
 hw/display/jazz_led.c                         |  2 +-
 hw/display/macfb.c                            |  4 +-
 hw/display/next-fb.c                          |  2 +-
 hw/display/pl110.c                            |  2 +-
 hw/display/qxl.c                              |  6 +-
 hw/display/ramfb-standalone.c                 |  2 +-
 hw/display/sii9022.c                          |  2 +-
 hw/display/sm501.c                            |  4 +-
 hw/display/ssd0303.c                          |  2 +-
 hw/display/ssd0323.c                          |  2 +-
 hw/display/tcx.c                              |  2 +-
 hw/display/vga-isa.c                          |  2 +-
 hw/display/vga-mmio.c                         |  2 +-
 hw/display/vga-pci.c                          |  6 +-
 hw/display/vhost-user-gpu.c                   |  2 +-
 hw/display/virtio-gpu-base.c                  |  2 +-
 hw/display/virtio-gpu-gl.c                    |  2 +-
 hw/display/virtio-gpu-pci.c                   |  2 +-
 hw/display/virtio-gpu-rutabaga.c              |  2 +-
 hw/display/virtio-gpu.c                       |  2 +-
 hw/display/virtio-vga.c                       |  2 +-
 hw/display/vmware_vga.c                       |  2 +-
 hw/display/xlnx_dp.c                          |  2 +-
 hw/dma/bcm2835_dma.c                          |  2 +-
 hw/dma/i82374.c                               |  2 +-
 hw/dma/i8257.c                                |  2 +-
 hw/dma/pl080.c                                |  2 +-
 hw/dma/pl330.c                                |  2 +-
 hw/dma/rc4030.c                               |  4 +-
 hw/dma/sifive_pdma.c                          |  2 +-
 hw/dma/sparc32_dma.c                          | 10 ++-
 hw/dma/xilinx_axidma.c                        |  5 +-
 hw/dma/xlnx-zdma.c                            |  2 +-
 hw/dma/xlnx-zynq-devcfg.c                     |  2 +-
 hw/dma/xlnx_csu_dma.c                         |  2 +-
 hw/dma/xlnx_dpdma.c                           |  2 +-
 hw/fsi/aspeed_apb2opb.c                       |  2 +-
 hw/fsi/cfam.c                                 |  2 +-
 hw/fsi/fsi-master.c                           |  2 +-
 hw/fsi/fsi.c                                  |  2 +-
 hw/fsi/lbus.c                                 |  2 +-
 hw/gpio/aspeed_gpio.c                         | 16 ++--
 hw/gpio/bcm2835_gpio.c                        |  2 +-
 hw/gpio/bcm2838_gpio.c                        |  2 +-
 hw/gpio/gpio_key.c                            |  2 +-
 hw/gpio/imx_gpio.c                            |  2 +-
 hw/gpio/mpc8xxx.c                             |  2 +-
 hw/gpio/npcm7xx_gpio.c                        |  2 +-
 hw/gpio/nrf51_gpio.c                          |  2 +-
 hw/gpio/omap_gpio.c                           |  2 +-
 hw/gpio/pca9552.c                             |  4 +-
 hw/gpio/pca9554.c                             |  2 +-
 hw/gpio/pcf8574.c                             |  2 +-
 hw/gpio/pl061.c                               |  2 +-
 hw/gpio/sifive_gpio.c                         |  2 +-
 hw/gpio/stm32l4x5_gpio.c                      |  2 +-
 hw/gpio/zaurus.c                              |  2 +-
 hw/hppa/machine.c                             |  4 +-
 hw/hyperv/hv-balloon.c                        |  2 +-
 hw/hyperv/hyperv.c                            |  2 +-
 hw/hyperv/hyperv_testdev.c                    |  2 +-
 hw/hyperv/syndbg.c                            |  2 +-
 hw/hyperv/vmbus.c                             |  6 +-
 hw/i2c/allwinner-i2c.c                        |  2 +-
 hw/i2c/aspeed_i2c.c                           | 17 ++--
 hw/i2c/bcm2835_i2c.c                          |  2 +-
 hw/i2c/bitbang_i2c.c                          |  2 +-
 hw/i2c/core.c                                 |  2 +-
 hw/i2c/exynos4210_i2c.c                       |  2 +-
 hw/i2c/i2c_mux_pca954x.c                      |  6 +-
 hw/i2c/imx_i2c.c                              |  2 +-
 hw/i2c/microbit_i2c.c                         |  2 +-
 hw/i2c/mpc_i2c.c                              |  2 +-
 hw/i2c/npcm7xx_smbus.c                        |  2 +-
 hw/i2c/omap_i2c.c                             |  2 +-
 hw/i2c/pmbus_device.c                         |  2 +-
 hw/i2c/ppc4xx_i2c.c                           |  2 +-
 hw/i2c/smbus_eeprom.c                         |  2 +-
 hw/i2c/smbus_ich9.c                           |  2 +-
 hw/i2c/smbus_slave.c                          |  2 +-
 hw/i386/amd_iommu.c                           |  7 +-
 hw/i386/intel_iommu.c                         |  4 +-
 hw/i386/kvm/apic.c                            |  2 +-
 hw/i386/kvm/clock.c                           |  2 +-
 hw/i386/kvm/i8254.c                           |  2 +-
 hw/i386/kvm/i8259.c                           |  2 +-
 hw/i386/kvm/ioapic.c                          |  2 +-
 hw/i386/kvm/xen_evtchn.c                      |  2 +-
 hw/i386/kvm/xen_gnttab.c                      |  2 +-
 hw/i386/kvm/xen_overlay.c                     |  2 +-
 hw/i386/kvm/xen_primary_console.c             |  2 +-
 hw/i386/kvm/xen_xenstore.c                    |  2 +-
 hw/i386/microvm.c                             |  2 +-
 hw/i386/nitro_enclave.c                       |  2 +-
 hw/i386/pc.c                                  |  2 +-
 hw/i386/port92.c                              |  2 +-
 hw/i386/sgx-epc.c                             |  2 +-
 hw/i386/vapic.c                               |  2 +-
 hw/i386/vmmouse.c                             |  2 +-
 hw/i386/vmport.c                              |  2 +-
 hw/i386/x86-iommu.c                           |  2 +-
 hw/i386/x86.c                                 |  2 +-
 hw/i386/xen/xen-pvh.c                         |  2 +-
 hw/i386/xen/xen_apic.c                        |  2 +-
 hw/i386/xen/xen_platform.c                    |  2 +-
 hw/i386/xen/xen_pvdevice.c                    |  2 +-
 hw/ide/ahci-allwinner.c                       |  2 +-
 hw/ide/ahci-sysbus.c                          |  2 +-
 hw/ide/cf.c                                   |  2 +-
 hw/ide/cmd646.c                               |  2 +-
 hw/ide/ich.c                                  |  2 +-
 hw/ide/ide-bus.c                              |  2 +-
 hw/ide/ide-dev.c                              |  6 +-
 hw/ide/isa.c                                  |  2 +-
 hw/ide/macio.c                                |  2 +-
 hw/ide/mmio.c                                 |  2 +-
 hw/ide/piix.c                                 |  4 +-
 hw/ide/sii3112.c                              |  2 +-
 hw/ide/via.c                                  |  2 +-
 hw/input/adb-kbd.c                            |  2 +-
 hw/input/adb-mouse.c                          |  2 +-
 hw/input/adb.c                                |  4 +-
 hw/input/lasips2.c                            |  8 +-
 hw/input/pckbd.c                              |  4 +-
 hw/input/pl050.c                              |  6 +-
 hw/input/ps2.c                                |  6 +-
 hw/input/stellaris_gamepad.c                  |  2 +-
 hw/input/virtio-input-hid.c                   |  6 +-
 hw/input/virtio-input-host.c                  |  2 +-
 hw/input/virtio-input.c                       |  2 +-
 hw/intc/allwinner-a10-pic.c                   |  2 +-
 hw/intc/apic.c                                |  2 +-
 hw/intc/apic_common.c                         |  2 +-
 hw/intc/arm_gic.c                             |  2 +-
 hw/intc/arm_gic_common.c                      |  2 +-
 hw/intc/arm_gic_kvm.c                         |  2 +-
 hw/intc/arm_gicv2m.c                          |  2 +-
 hw/intc/arm_gicv3.c                           |  2 +-
 hw/intc/arm_gicv3_common.c                    |  2 +-
 hw/intc/arm_gicv3_its.c                       |  2 +-
 hw/intc/arm_gicv3_its_common.c                |  2 +-
 hw/intc/arm_gicv3_its_kvm.c                   |  2 +-
 hw/intc/arm_gicv3_kvm.c                       |  2 +-
 hw/intc/armv7m_nvic.c                         |  2 +-
 hw/intc/aspeed_intc.c                         |  4 +-
 hw/intc/aspeed_vic.c                          |  2 +-
 hw/intc/bcm2835_ic.c                          |  2 +-
 hw/intc/bcm2836_control.c                     |  2 +-
 hw/intc/exynos4210_combiner.c                 |  2 +-
 hw/intc/exynos4210_gic.c                      |  2 +-
 hw/intc/goldfish_pic.c                        |  2 +-
 hw/intc/grlib_irqmp.c                         |  2 +-
 hw/intc/heathrow_pic.c                        |  2 +-
 hw/intc/i8259.c                               |  2 +-
 hw/intc/i8259_common.c                        |  2 +-
 hw/intc/imx_avic.c                            |  2 +-
 hw/intc/imx_gpcv2.c                           |  2 +-
 hw/intc/ioapic.c                              |  2 +-
 hw/intc/ioapic_common.c                       |  2 +-
 hw/intc/loongarch_extioi.c                    |  2 +-
 hw/intc/loongarch_extioi_common.c             |  3 +-
 hw/intc/loongarch_ipi.c                       |  2 +-
 hw/intc/loongarch_pch_msi.c                   |  2 +-
 hw/intc/loongarch_pch_pic.c                   |  2 +-
 hw/intc/loongarch_pic_common.c                |  3 +-
 hw/intc/loongson_ipi.c                        |  2 +-
 hw/intc/loongson_ipi_common.c                 |  2 +-
 hw/intc/m68k_irqc.c                           |  2 +-
 hw/intc/mips_gic.c                            |  2 +-
 hw/intc/omap_intc.c                           |  2 +-
 hw/intc/ompic.c                               |  2 +-
 hw/intc/openpic.c                             |  2 +-
 hw/intc/openpic_kvm.c                         |  2 +-
 hw/intc/pl190.c                               |  2 +-
 hw/intc/pnv_xive.c                            |  2 +-
 hw/intc/pnv_xive2.c                           |  2 +-
 hw/intc/ppc-uic.c                             |  2 +-
 hw/intc/realview_gic.c                        |  2 +-
 hw/intc/riscv_aclint.c                        |  4 +-
 hw/intc/riscv_aplic.c                         |  2 +-
 hw/intc/riscv_imsic.c                         |  2 +-
 hw/intc/rx_icu.c                              |  2 +-
 hw/intc/s390_flic.c                           |  4 +-
 hw/intc/s390_flic_kvm.c                       |  2 +-
 hw/intc/sifive_plic.c                         |  2 +-
 hw/intc/slavio_intctl.c                       |  2 +-
 hw/intc/spapr_xive.c                          |  2 +-
 hw/intc/xics.c                                |  4 +-
 hw/intc/xics_pnv.c                            |  2 +-
 hw/intc/xics_spapr.c                          |  2 +-
 hw/intc/xilinx_intc.c                         |  2 +-
 hw/intc/xive.c                                |  8 +-
 hw/intc/xive2.c                               |  4 +-
 hw/intc/xlnx-pmu-iomod-intc.c                 |  2 +-
 hw/intc/xlnx-zynqmp-ipi.c                     |  2 +-
 hw/ipack/ipack.c                              |  2 +-
 hw/ipack/tpci200.c                            |  2 +-
 hw/ipmi/ipmi.c                                |  4 +-
 hw/ipmi/ipmi_bmc_extern.c                     |  2 +-
 hw/ipmi/ipmi_bmc_sim.c                        |  2 +-
 hw/ipmi/isa_ipmi_bt.c                         |  2 +-
 hw/ipmi/isa_ipmi_kcs.c                        |  2 +-
 hw/ipmi/pci_ipmi_bt.c                         |  2 +-
 hw/ipmi/pci_ipmi_kcs.c                        |  2 +-
 hw/ipmi/smbus_ipmi.c                          |  2 +-
 hw/isa/fdc37m81x-superio.c                    |  2 +-
 hw/isa/i82378.c                               |  2 +-
 hw/isa/isa-bus.c                              |  6 +-
 hw/isa/isa-superio.c                          |  2 +-
 hw/isa/lpc_ich9.c                             |  2 +-
 hw/isa/pc87312.c                              |  2 +-
 hw/isa/piix.c                                 |  6 +-
 hw/isa/smc37c669-superio.c                    |  2 +-
 hw/isa/vt82c686.c                             | 18 ++--
 hw/loongarch/virt.c                           |  2 +-
 hw/m68k/mcf5206.c                             |  2 +-
 hw/m68k/mcf_intc.c                            |  2 +-
 hw/m68k/next-cube.c                           |  8 +-
 hw/m68k/next-kbd.c                            |  2 +-
 hw/m68k/q800-glue.c                           |  2 +-
 hw/m68k/q800.c                                |  2 +-
 hw/m68k/virt.c                                |  4 +-
 hw/mem/cxl_type3.c                            |  2 +-
 hw/mem/npcm7xx_mc.c                           |  2 +-
 hw/mem/nvdimm.c                               |  2 +-
 hw/mem/pc-dimm.c                              |  2 +-
 hw/mem/sparse-mem.c                           |  2 +-
 hw/microblaze/petalogix_s3adsp1800_mmu.c      |  3 +-
 hw/microblaze/xlnx-zynqmp-pmu.c               |  2 +-
 hw/mips/cps.c                                 |  2 +-
 hw/mips/jazz.c                                |  4 +-
 hw/mips/loongson3_virt.c                      |  2 +-
 hw/misc/a9scu.c                               |  2 +-
 hw/misc/allwinner-a10-ccm.c                   |  2 +-
 hw/misc/allwinner-a10-dramc.c                 |  2 +-
 hw/misc/allwinner-cpucfg.c                    |  2 +-
 hw/misc/allwinner-h3-ccu.c                    |  2 +-
 hw/misc/allwinner-h3-dramc.c                  |  2 +-
 hw/misc/allwinner-h3-sysctrl.c                |  3 +-
 hw/misc/allwinner-r40-ccu.c                   |  2 +-
 hw/misc/allwinner-r40-dramc.c                 |  2 +-
 hw/misc/allwinner-sid.c                       |  2 +-
 hw/misc/allwinner-sramc.c                     |  4 +-
 hw/misc/applesmc.c                            |  2 +-
 hw/misc/arm11scu.c                            |  2 +-
 hw/misc/arm_l2x0.c                            |  2 +-
 hw/misc/arm_sysctl.c                          |  2 +-
 hw/misc/armsse-cpu-pwrctrl.c                  |  2 +-
 hw/misc/armsse-cpuid.c                        |  2 +-
 hw/misc/armsse-mhu.c                          |  2 +-
 hw/misc/armv7m_ras.c                          |  2 +-
 hw/misc/aspeed_hace.c                         | 10 +--
 hw/misc/aspeed_i3c.c                          |  4 +-
 hw/misc/aspeed_lpc.c                          |  2 +-
 hw/misc/aspeed_peci.c                         |  2 +-
 hw/misc/aspeed_sbc.c                          |  4 +-
 hw/misc/aspeed_scu.c                          | 14 +--
 hw/misc/aspeed_sdmc.c                         | 10 +--
 hw/misc/aspeed_sli.c                          |  6 +-
 hw/misc/aspeed_xdma.c                         |  8 +-
 hw/misc/auxbus.c                              |  6 +-
 hw/misc/avr_power.c                           |  2 +-
 hw/misc/axp2xx.c                              |  6 +-
 hw/misc/bcm2835_cprman.c                      | 10 +--
 hw/misc/bcm2835_mbox.c                        |  2 +-
 hw/misc/bcm2835_mphi.c                        |  2 +-
 hw/misc/bcm2835_powermgt.c                    |  2 +-
 hw/misc/bcm2835_property.c                    |  2 +-
 hw/misc/bcm2835_rng.c                         |  2 +-
 hw/misc/bcm2835_thermal.c                     |  2 +-
 hw/misc/debugexit.c                           |  2 +-
 hw/misc/djmemc.c                              |  2 +-
 hw/misc/eccmemctl.c                           |  2 +-
 hw/misc/edu.c                                 |  2 +-
 hw/misc/empty_slot.c                          |  2 +-
 hw/misc/exynos4210_clk.c                      |  2 +-
 hw/misc/exynos4210_pmu.c                      |  2 +-
 hw/misc/exynos4210_rng.c                      |  2 +-
 hw/misc/grlib_ahb_apb_pnp.c                   |  4 +-
 hw/misc/i2c-echo.c                            |  2 +-
 hw/misc/imx25_ccm.c                           |  2 +-
 hw/misc/imx31_ccm.c                           |  2 +-
 hw/misc/imx6_ccm.c                            |  2 +-
 hw/misc/imx6_src.c                            |  2 +-
 hw/misc/imx6ul_ccm.c                          |  2 +-
 hw/misc/imx7_ccm.c                            |  4 +-
 hw/misc/imx7_gpr.c                            |  2 +-
 hw/misc/imx7_snvs.c                           |  2 +-
 hw/misc/imx7_src.c                            |  2 +-
 hw/misc/imx_rngc.c                            |  2 +-
 hw/misc/iosb.c                                |  2 +-
 hw/misc/iotkit-secctl.c                       |  2 +-
 hw/misc/iotkit-sysctl.c                       |  2 +-
 hw/misc/iotkit-sysinfo.c                      |  2 +-
 hw/misc/ivshmem-flat.c                        |  2 +-
 hw/misc/ivshmem-pci.c                         |  6 +-
 hw/misc/lasi.c                                |  2 +-
 hw/misc/led.c                                 |  2 +-
 hw/misc/mac_via.c                             |  4 +-
 hw/misc/macio/cuda.c                          |  4 +-
 hw/misc/macio/gpio.c                          |  2 +-
 hw/misc/macio/mac_dbdma.c                     |  2 +-
 hw/misc/macio/macio.c                         |  6 +-
 hw/misc/macio/pmu.c                           |  4 +-
 hw/misc/mchp_pfsoc_dmc.c                      |  5 +-
 hw/misc/mchp_pfsoc_ioscb.c                    |  2 +-
 hw/misc/mchp_pfsoc_sysreg.c                   |  2 +-
 hw/misc/mips_cmgcr.c                          |  2 +-
 hw/misc/mips_cpc.c                            |  2 +-
 hw/misc/mips_itu.c                            |  2 +-
 hw/misc/mos6522.c                             |  2 +-
 hw/misc/mps2-fpgaio.c                         |  2 +-
 hw/misc/mps2-scc.c                            |  2 +-
 hw/misc/msf2-sysreg.c                         |  2 +-
 hw/misc/npcm7xx_clk.c                         |  8 +-
 hw/misc/npcm7xx_gcr.c                         |  2 +-
 hw/misc/npcm7xx_mft.c                         |  2 +-
 hw/misc/npcm7xx_pwm.c                         |  2 +-
 hw/misc/npcm7xx_rng.c                         |  2 +-
 hw/misc/nrf51_rng.c                           |  2 +-
 hw/misc/pc-testdev.c                          |  2 +-
 hw/misc/pci-testdev.c                         |  2 +-
 hw/misc/pvpanic-isa.c                         |  2 +-
 hw/misc/pvpanic-pci.c                         |  2 +-
 hw/misc/sbsa_ec.c                             |  2 +-
 hw/misc/sifive_e_aon.c                        |  2 +-
 hw/misc/sifive_u_otp.c                        |  2 +-
 hw/misc/sifive_u_prci.c                       |  2 +-
 hw/misc/slavio_misc.c                         |  2 +-
 hw/misc/stm32_rcc.c                           |  2 +-
 hw/misc/stm32f2xx_syscfg.c                    |  2 +-
 hw/misc/stm32f4xx_exti.c                      |  2 +-
 hw/misc/stm32f4xx_syscfg.c                    |  2 +-
 hw/misc/stm32l4x5_exti.c                      |  2 +-
 hw/misc/stm32l4x5_rcc.c                       |  6 +-
 hw/misc/stm32l4x5_syscfg.c                    |  2 +-
 hw/misc/tz-mpc.c                              |  4 +-
 hw/misc/tz-msc.c                              |  2 +-
 hw/misc/tz-ppc.c                              |  2 +-
 hw/misc/unimp.c                               |  2 +-
 hw/misc/virt_ctrl.c                           |  2 +-
 hw/misc/vmcoreinfo.c                          |  2 +-
 hw/misc/xlnx-versal-cframe-reg.c              |  4 +-
 hw/misc/xlnx-versal-cfu.c                     |  6 +-
 hw/misc/xlnx-versal-crl.c                     |  2 +-
 hw/misc/xlnx-versal-pmc-iou-slcr.c            |  3 +-
 hw/misc/xlnx-versal-trng.c                    |  2 +-
 hw/misc/xlnx-versal-xramc.c                   |  2 +-
 hw/misc/xlnx-zynqmp-apu-ctrl.c                |  2 +-
 hw/misc/xlnx-zynqmp-crf.c                     |  2 +-
 hw/misc/zynq_slcr.c                           |  2 +-
 hw/net/allwinner-sun8i-emac.c                 |  3 +-
 hw/net/allwinner_emac.c                       |  2 +-
 hw/net/cadence_gem.c                          |  2 +-
 hw/net/can/can_kvaser_pci.c                   |  2 +-
 hw/net/can/can_mioe3680_pci.c                 |  2 +-
 hw/net/can/can_pcm3680_pci.c                  |  2 +-
 hw/net/can/ctucan_pci.c                       |  2 +-
 hw/net/can/xlnx-versal-canfd.c                |  2 +-
 hw/net/can/xlnx-zynqmp-can.c                  |  2 +-
 hw/net/dp8393x.c                              |  2 +-
 hw/net/e1000.c                                |  4 +-
 hw/net/e1000e.c                               |  2 +-
 hw/net/eepro100.c                             |  2 +-
 hw/net/fsl_etsec/etsec.c                      |  2 +-
 hw/net/ftgmac100.c                            |  4 +-
 hw/net/igb.c                                  |  2 +-
 hw/net/igbvf.c                                |  2 +-
 hw/net/imx_fec.c                              |  2 +-
 hw/net/lan9118.c                              |  2 +-
 hw/net/lan9118_phy.c                          |  2 +-
 hw/net/lance.c                                |  2 +-
 hw/net/lasi_i82596.c                          |  2 +-
 hw/net/mcf_fec.c                              |  2 +-
 hw/net/mipsnet.c                              |  2 +-
 hw/net/msf2-emac.c                            |  2 +-
 hw/net/mv88w8618_eth.c                        |  2 +-
 hw/net/ne2000-isa.c                           |  2 +-
 hw/net/ne2000-pci.c                           |  2 +-
 hw/net/npcm7xx_emc.c                          |  2 +-
 hw/net/npcm_gmac.c                            |  2 +-
 hw/net/opencores_eth.c                        |  2 +-
 hw/net/pcnet-pci.c                            |  2 +-
 hw/net/rocker/rocker.c                        |  2 +-
 hw/net/rtl8139.c                              |  2 +-
 hw/net/smc91c111.c                            |  2 +-
 hw/net/spapr_llan.c                           |  2 +-
 hw/net/stellaris_enet.c                       |  2 +-
 hw/net/sungem.c                               |  2 +-
 hw/net/sunhme.c                               |  2 +-
 hw/net/tulip.c                                |  2 +-
 hw/net/virtio-net.c                           |  2 +-
 hw/net/vmxnet3.c                              |  2 +-
 hw/net/xen_nic.c                              |  2 +-
 hw/net/xgmac.c                                |  2 +-
 hw/net/xilinx_axienet.c                       |  7 +-
 hw/net/xilinx_ethlite.c                       |  2 +-
 hw/nubus/mac-nubus-bridge.c                   |  2 +-
 hw/nubus/nubus-bridge.c                       |  2 +-
 hw/nubus/nubus-bus.c                          |  2 +-
 hw/nubus/nubus-device.c                       |  2 +-
 hw/nubus/nubus-virtio-mmio.c                  |  2 +-
 hw/nvme/ctrl.c                                |  2 +-
 hw/nvme/ns.c                                  |  2 +-
 hw/nvme/subsys.c                              |  2 +-
 hw/nvram/bcm2835_otp.c                        |  2 +-
 hw/nvram/ds1225y.c                            |  2 +-
 hw/nvram/eeprom_at24c.c                       |  2 +-
 hw/nvram/fw_cfg.c                             |  6 +-
 hw/nvram/mac_nvram.c                          |  2 +-
 hw/nvram/npcm7xx_otp.c                        |  6 +-
 hw/nvram/nrf51_nvm.c                          |  2 +-
 hw/nvram/spapr_nvram.c                        |  2 +-
 hw/nvram/xlnx-bbram.c                         |  2 +-
 hw/nvram/xlnx-efuse.c                         |  2 +-
 hw/nvram/xlnx-versal-efuse-cache.c            |  2 +-
 hw/nvram/xlnx-versal-efuse-ctrl.c             |  2 +-
 hw/nvram/xlnx-zynqmp-efuse.c                  |  2 +-
 hw/openrisc/openrisc_sim.c                    |  2 +-
 hw/openrisc/virt.c                            |  2 +-
 hw/pci-bridge/cxl_downstream.c                |  2 +-
 hw/pci-bridge/cxl_root_port.c                 |  2 +-
 hw/pci-bridge/cxl_upstream.c                  |  2 +-
 hw/pci-bridge/gen_pcie_root_port.c            |  2 +-
 hw/pci-bridge/i82801b11.c                     |  2 +-
 hw/pci-bridge/ioh3420.c                       |  2 +-
 hw/pci-bridge/pci_bridge_dev.c                |  4 +-
 hw/pci-bridge/pci_expander_bridge.c           | 12 +--
 hw/pci-bridge/pcie_pci_bridge.c               |  2 +-
 hw/pci-bridge/pcie_root_port.c                |  2 +-
 hw/pci-bridge/simba.c                         |  2 +-
 hw/pci-bridge/xio3130_downstream.c            |  2 +-
 hw/pci-bridge/xio3130_upstream.c              |  2 +-
 hw/pci-host/articia.c                         |  6 +-
 hw/pci-host/astro.c                           |  6 +-
 hw/pci-host/bonito.c                          |  4 +-
 hw/pci-host/designware.c                      |  6 +-
 hw/pci-host/dino.c                            |  2 +-
 hw/pci-host/gpex.c                            |  4 +-
 hw/pci-host/grackle.c                         |  4 +-
 hw/pci-host/gt64120.c                         |  4 +-
 hw/pci-host/i440fx.c                          |  4 +-
 hw/pci-host/mv64361.c                         |  6 +-
 hw/pci-host/pnv_phb.c                         |  4 +-
 hw/pci-host/pnv_phb3.c                        |  6 +-
 hw/pci-host/pnv_phb3_msi.c                    |  2 +-
 hw/pci-host/pnv_phb3_pbcq.c                   |  2 +-
 hw/pci-host/pnv_phb4.c                        |  6 +-
 hw/pci-host/pnv_phb4_pec.c                    |  4 +-
 hw/pci-host/ppc440_pcix.c                     |  2 +-
 hw/pci-host/ppc4xx_pci.c                      |  4 +-
 hw/pci-host/ppce500.c                         |  4 +-
 hw/pci-host/q35.c                             |  4 +-
 hw/pci-host/raven.c                           |  4 +-
 hw/pci-host/remote.c                          |  2 +-
 hw/pci-host/sabre.c                           |  4 +-
 hw/pci-host/sh_pci.c                          |  4 +-
 hw/pci-host/uninorth.c                        | 19 ++--
 hw/pci-host/versatile.c                       |  4 +-
 hw/pci-host/xen_igd_pt.c                      |  3 +-
 hw/pci-host/xilinx-pcie.c                     |  4 +-
 hw/pci/pci.c                                  |  8 +-
 hw/pci/pci_bridge.c                           |  2 +-
 hw/pci/pci_host.c                             |  2 +-
 hw/pci/pcie_port.c                            |  4 +-
 hw/ppc/e500plat.c                             |  2 +-
 hw/ppc/mac_newworld.c                         |  2 +-
 hw/ppc/mac_oldworld.c                         |  2 +-
 hw/ppc/mpc8544ds.c                            |  2 +-
 hw/ppc/pef.c                                  |  2 +-
 hw/ppc/pegasos2.c                             |  2 +-
 hw/ppc/pnv.c                                  | 25 +++---
 hw/ppc/pnv_adu.c                              |  2 +-
 hw/ppc/pnv_chiptod.c                          |  6 +-
 hw/ppc/pnv_core.c                             | 14 +--
 hw/ppc/pnv_homer.c                            |  8 +-
 hw/ppc/pnv_i2c.c                              |  2 +-
 hw/ppc/pnv_lpc.c                              |  8 +-
 hw/ppc/pnv_n1_chiplet.c                       |  2 +-
 hw/ppc/pnv_nest_pervasive.c                   |  2 +-
 hw/ppc/pnv_occ.c                              |  8 +-
 hw/ppc/pnv_pnor.c                             |  2 +-
 hw/ppc/pnv_psi.c                              |  8 +-
 hw/ppc/pnv_sbe.c                              |  6 +-
 hw/ppc/ppc405_boards.c                        |  6 +-
 hw/ppc/ppc405_uc.c                            | 16 ++--
 hw/ppc/ppc440_uc.c                            |  2 +-
 hw/ppc/ppc4xx_devs.c                          |  8 +-
 hw/ppc/ppc4xx_sdram.c                         |  4 +-
 hw/ppc/ppce500_spin.c                         |  2 +-
 hw/ppc/prep_systemio.c                        |  2 +-
 hw/ppc/rs6000_mc.c                            |  2 +-
 hw/ppc/spapr.c                                |  4 +-
 hw/ppc/spapr_cpu_core.c                       |  4 +-
 hw/ppc/spapr_drc.c                            | 16 ++--
 hw/ppc/spapr_iommu.c                          |  5 +-
 hw/ppc/spapr_nvdimm.c                         |  2 +-
 hw/ppc/spapr_pci.c                            |  2 +-
 hw/ppc/spapr_rng.c                            |  2 +-
 hw/ppc/spapr_rtc.c                            |  2 +-
 hw/ppc/spapr_tpm_proxy.c                      |  2 +-
 hw/ppc/spapr_vio.c                            |  6 +-
 hw/remote/machine.c                           |  2 +-
 hw/remote/proxy.c                             |  2 +-
 hw/remote/remote-obj.c                        |  2 +-
 hw/remote/vfio-user-obj.c                     |  2 +-
 hw/riscv/microchip_pfsoc.c                    |  5 +-
 hw/riscv/opentitan.c                          |  4 +-
 hw/riscv/riscv-iommu-pci.c                    |  2 +-
 hw/riscv/riscv-iommu-sys.c                    |  2 +-
 hw/riscv/riscv-iommu.c                        |  4 +-
 hw/riscv/riscv_hart.c                         |  2 +-
 hw/riscv/shakti_c.c                           |  4 +-
 hw/riscv/sifive_e.c                           |  4 +-
 hw/riscv/sifive_u.c                           |  4 +-
 hw/riscv/spike.c                              |  2 +-
 hw/riscv/virt.c                               |  2 +-
 hw/rtc/allwinner-rtc.c                        |  8 +-
 hw/rtc/aspeed_rtc.c                           |  2 +-
 hw/rtc/ds1338.c                               |  2 +-
 hw/rtc/exynos4210_rtc.c                       |  2 +-
 hw/rtc/goldfish_rtc.c                         |  2 +-
 hw/rtc/ls7a_rtc.c                             |  2 +-
 hw/rtc/m41t80.c                               |  2 +-
 hw/rtc/m48t59-isa.c                           |  6 +-
 hw/rtc/m48t59.c                               |  7 +-
 hw/rtc/mc146818rtc.c                          |  2 +-
 hw/rtc/pl031.c                                |  2 +-
 hw/rtc/sun4v-rtc.c                            |  2 +-
 hw/rtc/xlnx-zynqmp-rtc.c                      |  2 +-
 hw/rx/rx-gdbsim.c                             |  6 +-
 hw/rx/rx62n.c                                 |  6 +-
 hw/s390x/3270-ccw.c                           |  2 +-
 hw/s390x/ap-bridge.c                          |  4 +-
 hw/s390x/ap-device.c                          |  2 +-
 hw/s390x/ccw-device.c                         |  2 +-
 hw/s390x/css-bridge.c                         |  4 +-
 hw/s390x/event-facility.c                     |  4 +-
 hw/s390x/ipl.c                                |  2 +-
 hw/s390x/s390-ccw.c                           |  2 +-
 hw/s390x/s390-pci-bus.c                       |  7 +-
 hw/s390x/s390-skeys-kvm.c                     |  2 +-
 hw/s390x/s390-skeys.c                         |  4 +-
 hw/s390x/s390-stattrib-kvm.c                  |  2 +-
 hw/s390x/s390-stattrib.c                      |  4 +-
 hw/s390x/s390-virtio-ccw.c                    |  4 +-
 hw/s390x/sclp.c                               |  2 +-
 hw/s390x/sclpcpu.c                            |  2 +-
 hw/s390x/sclpquiesce.c                        |  2 +-
 hw/s390x/tod-kvm.c                            |  2 +-
 hw/s390x/tod-tcg.c                            |  2 +-
 hw/s390x/tod.c                                |  2 +-
 hw/s390x/vhost-scsi-ccw.c                     |  2 +-
 hw/s390x/vhost-user-fs-ccw.c                  |  2 +-
 hw/s390x/vhost-vsock-ccw.c                    |  2 +-
 hw/s390x/virtio-ccw-9p.c                      |  2 +-
 hw/s390x/virtio-ccw-balloon.c                 |  2 +-
 hw/s390x/virtio-ccw-blk.c                     |  2 +-
 hw/s390x/virtio-ccw-crypto.c                  |  2 +-
 hw/s390x/virtio-ccw-gpu.c                     |  2 +-
 hw/s390x/virtio-ccw-input.c                   |  2 +-
 hw/s390x/virtio-ccw-mem.c                     |  2 +-
 hw/s390x/virtio-ccw-net.c                     |  2 +-
 hw/s390x/virtio-ccw-rng.c                     |  2 +-
 hw/s390x/virtio-ccw-scsi.c                    |  2 +-
 hw/s390x/virtio-ccw-serial.c                  |  2 +-
 hw/s390x/virtio-ccw.c                         |  4 +-
 hw/scsi/esp-pci.c                             |  4 +-
 hw/scsi/esp.c                                 |  4 +-
 hw/scsi/lsi53c895a.c                          |  4 +-
 hw/scsi/megasas.c                             |  4 +-
 hw/scsi/mptsas.c                              |  2 +-
 hw/scsi/scsi-bus.c                            |  4 +-
 hw/scsi/scsi-disk.c                           |  8 +-
 hw/scsi/scsi-generic.c                        |  2 +-
 hw/scsi/spapr_vscsi.c                         |  2 +-
 hw/scsi/vhost-scsi.c                          |  2 +-
 hw/scsi/vhost-user-scsi.c                     |  2 +-
 hw/scsi/virtio-scsi.c                         |  4 +-
 hw/scsi/vmw_pvscsi.c                          |  2 +-
 hw/sd/allwinner-sdhost.c                      | 15 ++--
 hw/sd/aspeed_sdhci.c                          | 10 +--
 hw/sd/bcm2835_sdhost.c                        |  2 +-
 hw/sd/cadence_sdhci.c                         |  2 +-
 hw/sd/npcm7xx_sdhci.c                         |  2 +-
 hw/sd/omap_mmc.c                              |  2 +-
 hw/sd/pl181.c                                 |  4 +-
 hw/sd/sd.c                                    |  8 +-
 hw/sd/sdhci-pci.c                             |  2 +-
 hw/sd/sdhci.c                                 |  6 +-
 hw/sd/ssi-sd.c                                |  2 +-
 hw/sensor/adm1266.c                           |  2 +-
 hw/sensor/adm1272.c                           |  2 +-
 hw/sensor/dps310.c                            |  2 +-
 hw/sensor/emc141x.c                           |  6 +-
 hw/sensor/isl_pmbus_vr.c                      | 10 +--
 hw/sensor/lsm303dlhc_mag.c                    |  2 +-
 hw/sensor/max31785.c                          |  2 +-
 hw/sensor/max34451.c                          |  2 +-
 hw/sensor/tmp105.c                            |  2 +-
 hw/sensor/tmp421.c                            |  6 +-
 hw/sparc/sun4m.c                              | 28 +++---
 hw/sparc/sun4m_iommu.c                        |  5 +-
 hw/sparc64/niagara.c                          |  2 +-
 hw/sparc64/sun4u.c                            | 12 +--
 hw/sparc64/sun4u_iommu.c                      |  5 +-
 hw/ssi/allwinner-a10-spi.c                    |  2 +-
 hw/ssi/aspeed_smc.c                           | 36 ++++----
 hw/ssi/bcm2835_spi.c                          |  2 +-
 hw/ssi/ibex_spi_host.c                        |  2 +-
 hw/ssi/imx_spi.c                              |  2 +-
 hw/ssi/mss-spi.c                              |  2 +-
 hw/ssi/npcm7xx_fiu.c                          |  2 +-
 hw/ssi/npcm_pspi.c                            |  2 +-
 hw/ssi/pl022.c                                |  2 +-
 hw/ssi/pnv_spi.c                              |  2 +-
 hw/ssi/sifive_spi.c                           |  2 +-
 hw/ssi/ssi.c                                  |  4 +-
 hw/ssi/stm32f2xx_spi.c                        |  2 +-
 hw/ssi/xilinx_spi.c                           |  2 +-
 hw/ssi/xilinx_spips.c                         |  6 +-
 hw/ssi/xlnx-versal-ospi.c                     |  2 +-
 hw/timer/a9gtimer.c                           |  2 +-
 hw/timer/allwinner-a10-pit.c                  |  2 +-
 hw/timer/arm_mptimer.c                        |  2 +-
 hw/timer/arm_timer.c                          |  2 +-
 hw/timer/armv7m_systick.c                     |  2 +-
 hw/timer/aspeed_timer.c                       | 12 +--
 hw/timer/avr_timer16.c                        |  2 +-
 hw/timer/bcm2835_systmr.c                     |  2 +-
 hw/timer/cadence_ttc.c                        |  2 +-
 hw/timer/cmsdk-apb-dualtimer.c                |  2 +-
 hw/timer/cmsdk-apb-timer.c                    |  2 +-
 hw/timer/digic-timer.c                        |  2 +-
 hw/timer/exynos4210_mct.c                     |  2 +-
 hw/timer/exynos4210_pwm.c                     |  2 +-
 hw/timer/grlib_gptimer.c                      |  2 +-
 hw/timer/hpet.c                               |  2 +-
 hw/timer/i8254.c                              |  2 +-
 hw/timer/i8254_common.c                       |  2 +-
 hw/timer/ibex_timer.c                         |  2 +-
 hw/timer/imx_epit.c                           |  2 +-
 hw/timer/imx_gpt.c                            |  2 +-
 hw/timer/mss-timer.c                          |  2 +-
 hw/timer/npcm7xx_timer.c                      |  2 +-
 hw/timer/nrf51_timer.c                        |  2 +-
 hw/timer/pxa2xx_timer.c                       |  4 +-
 hw/timer/renesas_cmt.c                        |  2 +-
 hw/timer/renesas_tmr.c                        |  2 +-
 hw/timer/sifive_pwm.c                         |  2 +-
 hw/timer/slavio_timer.c                       |  2 +-
 hw/timer/sse-counter.c                        |  2 +-
 hw/timer/sse-timer.c                          |  2 +-
 hw/timer/stellaris-gptm.c                     |  2 +-
 hw/timer/stm32f2xx_timer.c                    |  2 +-
 hw/timer/xilinx_timer.c                       |  2 +-
 hw/tpm/tpm_crb.c                              |  2 +-
 hw/tpm/tpm_spapr.c                            |  2 +-
 hw/tpm/tpm_tis_i2c.c                          |  2 +-
 hw/tpm/tpm_tis_isa.c                          |  2 +-
 hw/tpm/tpm_tis_sysbus.c                       |  2 +-
 hw/tricore/tc27x_soc.c                        |  4 +-
 hw/tricore/triboard.c                         |  2 +-
 hw/tricore/tricore_testdevice.c               |  2 +-
 hw/ufs/lu.c                                   |  2 +-
 hw/ufs/ufs.c                                  |  4 +-
 hw/usb/bus.c                                  |  4 +-
 hw/usb/canokey.c                              |  2 +-
 hw/usb/ccid-card-emulated.c                   |  2 +-
 hw/usb/ccid-card-passthru.c                   |  2 +-
 hw/usb/chipidea.c                             |  2 +-
 hw/usb/dev-audio.c                            |  2 +-
 hw/usb/dev-hid.c                              |  8 +-
 hw/usb/dev-hub.c                              |  2 +-
 hw/usb/dev-mtp.c                              |  2 +-
 hw/usb/dev-network.c                          |  2 +-
 hw/usb/dev-serial.c                           |  6 +-
 hw/usb/dev-smartcard-reader.c                 |  4 +-
 hw/usb/dev-storage-bot.c                      |  2 +-
 hw/usb/dev-storage-classic.c                  |  2 +-
 hw/usb/dev-storage.c                          |  2 +-
 hw/usb/dev-uas.c                              |  2 +-
 hw/usb/dev-wacom.c                            |  2 +-
 hw/usb/hcd-dwc2.c                             |  2 +-
 hw/usb/hcd-dwc3.c                             |  2 +-
 hw/usb/hcd-ehci-pci.c                         |  6 +-
 hw/usb/hcd-ehci-sysbus.c                      | 16 ++--
 hw/usb/hcd-ohci-pci.c                         |  2 +-
 hw/usb/hcd-ohci-sysbus.c                      |  2 +-
 hw/usb/hcd-uhci.c                             |  6 +-
 hw/usb/hcd-xhci-nec.c                         |  2 +-
 hw/usb/hcd-xhci-pci.c                         |  4 +-
 hw/usb/hcd-xhci-sysbus.c                      |  2 +-
 hw/usb/hcd-xhci.c                             |  2 +-
 hw/usb/host-libusb.c                          |  2 +-
 hw/usb/imx-usb-phy.c                          |  2 +-
 hw/usb/redirect.c                             |  2 +-
 hw/usb/u2f-emulated.c                         |  2 +-
 hw/usb/u2f-passthru.c                         |  2 +-
 hw/usb/u2f.c                                  |  2 +-
 hw/usb/xlnx-usb-subsystem.c                   |  2 +-
 hw/usb/xlnx-versal-usb2-ctrl-regs.c           |  2 +-
 hw/vfio/amd-xgbe.c                            |  2 +-
 hw/vfio/ap.c                                  |  2 +-
 hw/vfio/calxeda-xgmac.c                       |  2 +-
 hw/vfio/ccw.c                                 |  2 +-
 hw/vfio/container.c                           |  4 +-
 hw/vfio/igd.c                                 |  3 +-
 hw/vfio/iommufd.c                             |  4 +-
 hw/vfio/pci.c                                 |  5 +-
 hw/vfio/platform.c                            |  2 +-
 hw/vfio/spapr.c                               |  2 +-
 hw/virtio/vdpa-dev-pci.c                      |  3 +-
 hw/virtio/vdpa-dev.c                          |  2 +-
 hw/virtio/vhost-scsi-pci.c                    |  2 +-
 hw/virtio/vhost-user-base.c                   |  2 +-
 hw/virtio/vhost-user-blk-pci.c                |  2 +-
 hw/virtio/vhost-user-device-pci.c             |  3 +-
 hw/virtio/vhost-user-device.c                 |  2 +-
 hw/virtio/vhost-user-fs-pci.c                 |  2 +-
 hw/virtio/vhost-user-fs.c                     |  2 +-
 hw/virtio/vhost-user-gpio-pci.c               |  2 +-
 hw/virtio/vhost-user-gpio.c                   |  2 +-
 hw/virtio/vhost-user-i2c-pci.c                |  2 +-
 hw/virtio/vhost-user-i2c.c                    |  2 +-
 hw/virtio/vhost-user-input.c                  |  2 +-
 hw/virtio/vhost-user-rng-pci.c                |  2 +-
 hw/virtio/vhost-user-rng.c                    |  2 +-
 hw/virtio/vhost-user-scmi-pci.c               |  2 +-
 hw/virtio/vhost-user-scmi.c                   |  2 +-
 hw/virtio/vhost-user-scsi-pci.c               |  2 +-
 hw/virtio/vhost-user-snd-pci.c                |  2 +-
 hw/virtio/vhost-user-snd.c                    |  2 +-
 hw/virtio/vhost-user-vsock-pci.c              |  3 +-
 hw/virtio/vhost-user-vsock.c                  |  2 +-
 hw/virtio/vhost-vsock-common.c                |  2 +-
 hw/virtio/vhost-vsock-pci.c                   |  2 +-
 hw/virtio/vhost-vsock.c                       |  2 +-
 hw/virtio/virtio-9p-pci.c                     |  2 +-
 hw/virtio/virtio-balloon-pci.c                |  2 +-
 hw/virtio/virtio-balloon.c                    |  2 +-
 hw/virtio/virtio-blk-pci.c                    |  2 +-
 hw/virtio/virtio-bus.c                        |  2 +-
 hw/virtio/virtio-crypto-pci.c                 |  2 +-
 hw/virtio/virtio-crypto.c                     |  2 +-
 hw/virtio/virtio-input-pci.c                  |  7 +-
 hw/virtio/virtio-iommu-pci.c                  |  2 +-
 hw/virtio/virtio-iommu.c                      |  4 +-
 hw/virtio/virtio-mem-pci.c                    |  2 +-
 hw/virtio/virtio-mem.c                        |  5 +-
 hw/virtio/virtio-mmio.c                       |  4 +-
 hw/virtio/virtio-net-pci.c                    |  2 +-
 hw/virtio/virtio-nsm-pci.c                    |  2 +-
 hw/virtio/virtio-nsm.c                        |  2 +-
 hw/virtio/virtio-pci.c                        | 12 +--
 hw/virtio/virtio-pmem-pci.c                   |  2 +-
 hw/virtio/virtio-pmem.c                       |  2 +-
 hw/virtio/virtio-rng-pci.c                    |  2 +-
 hw/virtio/virtio-rng.c                        |  2 +-
 hw/virtio/virtio-scsi-pci.c                   |  2 +-
 hw/virtio/virtio-serial-pci.c                 |  2 +-
 hw/virtio/virtio.c                            |  2 +-
 hw/watchdog/allwinner-wdt.c                   |  6 +-
 hw/watchdog/cmsdk-apb-watchdog.c              |  2 +-
 hw/watchdog/sbsa_gwdt.c                       |  2 +-
 hw/watchdog/spapr_watchdog.c                  |  2 +-
 hw/watchdog/wdt_aspeed.c                      | 12 +--
 hw/watchdog/wdt_diag288.c                     |  2 +-
 hw/watchdog/wdt_i6300esb.c                    |  2 +-
 hw/watchdog/wdt_ib700.c                       |  2 +-
 hw/watchdog/wdt_imx2.c                        |  2 +-
 hw/xen/xen-bus.c                              |  4 +-
 hw/xen/xen-legacy-backend.c                   |  4 +-
 hw/xen/xen-pvh-common.c                       |  2 +-
 hw/xen/xen_pt.c                               |  2 +-
 hw/xen/xen_pt_graphics.c                      |  2 +-
 hw/xtensa/xtfpga.c                            | 16 ++--
 io/channel-buffer.c                           |  2 +-
 io/channel-command.c                          |  2 +-
 io/channel-file.c                             |  2 +-
 io/channel-null.c                             |  2 +-
 io/channel-socket.c                           |  2 +-
 io/channel-tls.c                              |  2 +-
 io/channel-websock.c                          |  2 +-
 iothread.c                                    |  2 +-
 migration/channel-block.c                     |  2 +-
 migration/migration.c                         |  2 +-
 migration/rdma.c                              |  2 +-
 net/can/can_core.c                            |  2 +-
 net/can/can_host.c                            |  2 +-
 net/can/can_socketcan.c                       |  2 +-
 net/colo-compare.c                            |  2 +-
 net/dump.c                                    |  2 +-
 net/filter-buffer.c                           |  2 +-
 net/filter-mirror.c                           |  4 +-
 net/filter-replay.c                           |  2 +-
 net/filter-rewriter.c                         |  2 +-
 net/filter.c                                  |  2 +-
 qom/object.c                                  |  8 +-
 scsi/pr-manager-helper.c                      |  2 +-
 system/qtest.c                                |  2 +-
 target/alpha/cpu.c                            |  2 +-
 target/arm/cpu.c                              |  6 +-
 target/arm/cpu64.c                            |  6 +-
 target/arm/tcg/cpu-v7m.c                      |  2 +-
 target/avr/cpu.c                              |  2 +-
 target/hexagon/cpu.c                          |  2 +-
 target/hppa/cpu.c                             |  2 +-
 target/i386/confidential-guest.c              |  2 +-
 target/i386/cpu.c                             | 16 ++--
 target/i386/host-cpu.c                        |  2 +-
 target/i386/hvf/hvf-cpu.c                     |  2 +-
 target/i386/kvm/kvm-cpu.c                     |  2 +-
 target/i386/nvmm/nvmm-accel-ops.c             |  2 +-
 target/i386/nvmm/nvmm-all.c                   |  2 +-
 target/i386/sev.c                             |  6 +-
 target/i386/tcg/tcg-cpu.c                     |  2 +-
 target/i386/whpx/whpx-accel-ops.c             |  2 +-
 target/i386/whpx/whpx-all.c                   |  2 +-
 target/i386/whpx/whpx-apic.c                  |  2 +-
 target/loongarch/cpu.c                        |  6 +-
 target/m68k/cpu.c                             |  6 +-
 target/microblaze/cpu.c                       |  2 +-
 target/mips/cpu.c                             |  6 +-
 target/openrisc/cpu.c                         |  2 +-
 target/ppc/cpu-models.c                       |  2 +-
 target/ppc/cpu_init.c                         | 90 +++++++++----------
 target/ppc/kvm.c                              |  4 +-
 target/riscv/cpu.c                            | 16 ++--
 target/riscv/kvm/kvm-cpu.c                    |  2 +-
 target/riscv/tcg/tcg-cpu.c                    |  2 +-
 target/rx/cpu.c                               |  2 +-
 target/s390x/cpu.c                            |  2 +-
 target/s390x/cpu_models.c                     | 14 +--
 target/s390x/kvm/pv.c                         |  2 +-
 target/sh4/cpu.c                              |  8 +-
 target/sparc/cpu.c                            |  6 +-
 target/tricore/cpu.c                          |  2 +-
 target/xtensa/cpu.c                           |  2 +-
 target/xtensa/helper.c                        | 10 ++-
 tests/unit/check-qom-interface.c              |  2 +-
 tests/unit/check-qom-proplist.c               |  6 +-
 tests/unit/test-qdev-global-props.c           |  8 +-
 tests/unit/test-smp-parse.c                   | 23 ++---
 ui/console-vc.c                               |  6 +-
 ui/console.c                                  |  4 +-
 ui/dbus-chardev.c                             |  2 +-
 ui/dbus.c                                     |  4 +-
 ui/gtk.c                                      |  2 +-
 ui/input-barrier.c                            |  2 +-
 ui/input-linux.c                              |  2 +-
 ui/spice-app.c                                |  2 +-
 ui/vdagent.c                                  |  2 +-
 util/main-loop.c                              |  2 +-
 util/thread-context.c                         |  2 +-
 hw/display/apple-gfx-mmio.m                   |  2 +-
 hw/display/apple-gfx-pci.m                    |  2 +-
 .../codeconverter/qom_type_info.py            |  3 +-
 .../codeconverter/test_regexps.py             |  2 +-
 1112 files changed, 1803 insertions(+), 1738 deletions(-)

Comments

Paolo Bonzini Feb. 10, 2025, 12:30 p.m. UTC | #1
On 2/10/25 11:25, Philippe Mathieu-Daudé wrote:
> Following Richard's suggestion [*], make QOM class data *const*.
> 
> Note, rust code not modified...

Untested but it should be something like

diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-api/src/qom.rs
index f36be2831eb..8603f7cc657 100644
--- a/rust/qemu-api/src/qom.rs
+++ b/rust/qemu-api/src/qom.rs
@@ -180,7 +180,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
  
  unsafe extern "C" fn rust_class_init<T: ObjectType + ClassInitImpl<T::Class>>(
      klass: *mut ObjectClass,
-    _data: *mut c_void,
+    _data: *const c_void,
  ) {
      let mut klass = NonNull::new(klass)
          .unwrap()
@@ -523,7 +523,7 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
      /// the effects of copying the contents of the parent's class struct
      /// to the descendants.
      const CLASS_BASE_INIT: Option<
-        unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void),
+        unsafe extern "C" fn(klass: *mut ObjectClass, data: *const c_void),
      > = None;
  
      const TYPE_INFO: TypeInfo = TypeInfo {
@@ -544,7 +544,7 @@ pub trait ObjectImpl: ObjectType + ClassInitImpl<Self::Class> {
          class_size: core::mem::size_of::<Self::Class>(),
          class_init: Some(rust_class_init::<Self>),
          class_base_init: Self::CLASS_BASE_INIT,
-        class_data: core::ptr::null_mut(),
+        class_data: core::ptr::null(),
          interfaces: core::ptr::null_mut(),
      };


to be split across patches 8-10.

Paolo
Philippe Mathieu-Daudé Feb. 10, 2025, 1:29 p.m. UTC | #2
On 10/2/25 13:30, Paolo Bonzini wrote:
> On 2/10/25 11:25, Philippe Mathieu-Daudé wrote:
>> Following Richard's suggestion [*], make QOM class data *const*.
>>
>> Note, rust code not modified...
> 
> Untested but it should be something like
> 
> diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-api/src/qom.rs
> index f36be2831eb..8603f7cc657 100644
> --- a/rust/qemu-api/src/qom.rs
> +++ b/rust/qemu-api/src/qom.rs
> @@ -180,7 +180,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> 
> Result<(), fmt::Error> {
> 
>   unsafe extern "C" fn rust_class_init<T: ObjectType + 
> ClassInitImpl<T::Class>>(
>       klass: *mut ObjectClass,
> -    _data: *mut c_void,
> +    _data: *const c_void,
>   ) {
>       let mut klass = NonNull::new(klass)
>           .unwrap()
> @@ -523,7 +523,7 @@ pub trait ObjectImpl: ObjectType + 
> ClassInitImpl<Self::Class> {
>       /// the effects of copying the contents of the parent's class struct
>       /// to the descendants.
>       const CLASS_BASE_INIT: Option<
> -        unsafe extern "C" fn(klass: *mut ObjectClass, data: *mut c_void),
> +        unsafe extern "C" fn(klass: *mut ObjectClass, data: *const 
> c_void),
>       > = None;
> 
>       const TYPE_INFO: TypeInfo = TypeInfo {
> @@ -544,7 +544,7 @@ pub trait ObjectImpl: ObjectType + 
> ClassInitImpl<Self::Class> {
>           class_size: core::mem::size_of::<Self::Class>(),
>           class_init: Some(rust_class_init::<Self>),
>           class_base_init: Self::CLASS_BASE_INIT,
> -        class_data: core::ptr::null_mut(),
> +        class_data: core::ptr::null(),
>           interfaces: core::ptr::null_mut(),
>       };
> 
> 
> to be split across patches 8-10.

Thanks!