]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
4 months agoMerge tag 'pull-20231230' of https://gitlab.com/rth7680/qemu into staging
Peter Maydell [Thu, 4 Jan 2024 10:23:34 +0000 (10:23 +0000)]
Merge tag 'pull-20231230' of https://gitlab.com/rth7680/qemu into staging

Mark VMStateField and VMStateDescription arrays const.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmWPOFsdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8cCQgAnQjy3Ic1i225AElh
# 0Ph3Aiw6WT9pECLoKmyroxHbTGuaEJoIXeaOhMAnowCTBLoKRR3/Ooq0DGOW+l/Z
# f5PwWSkjkb+OcS+dj/kgQBu58/Gk5G8ogksqKQvci8k2okhjHmITSQDu0dtwzDZr
# jVGh3gmGoat73jQyD/nAwgWFawlLkklOMR/yvnFX7EJIBepRVbkMPayoKlB+6W07
# 1kqhSwoI0vQCjhJ3Q7Q0GC4rrHK3KUq7o/25yvICf4EgPKfsaym1wAjDhdKToixl
# 9T+ALZG8SiZZkBlb6l3QZ7pqtqavxYtPdZ2Gx/nMu0RRu4G33d5AVGHRrXj9qttW
# 5mL7ZQ==
# =uQ4C
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 29 Dec 2023 21:21:31 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-20231230' of https://gitlab.com/rth7680/qemu: (71 commits)
  docs: Constify VMstate in examples
  tests/unit/test-vmstate: Constify VMState
  util/fifo8: Constify VMState
  replay: Constify VMState
  system: Constify VMState
  migration: Constify VMState
  cpu-target: Constify VMState
  backends: Constify VMState
  audio: Constify VMState
  hw/misc/macio: Constify VMState
  hw/watchdog: Constify VMState
  hw/virtio: Constify VMState
  hw/vfio: Constify VMState
  hw/usb: Constify VMState
  hw/tpm: Constify VMState
  hw/timer: Constify VMState
  hw/ssi: Constify VMState
  hw/sparc: Constify VMState
  hw/sensor: Constify VMState
  hw/sd: Constify VMState
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
4 months agodocs: Constify VMstate in examples
Richard Henderson [Thu, 21 Dec 2023 03:16:52 +0000 (14:16 +1100)]
docs: Constify VMstate in examples

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-72-richard.henderson@linaro.org>

4 months agotests/unit/test-vmstate: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:51 +0000 (14:16 +1100)]
tests/unit/test-vmstate: Constify VMState

While const data in tests is not particularly important,
this makes a grep test clear across the tree.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-71-richard.henderson@linaro.org>

4 months agoutil/fifo8: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:50 +0000 (14:16 +1100)]
util/fifo8: Constify VMState

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-70-richard.henderson@linaro.org>

4 months agoreplay: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:49 +0000 (14:16 +1100)]
replay: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-69-richard.henderson@linaro.org>

4 months agosystem: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:48 +0000 (14:16 +1100)]
system: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-68-richard.henderson@linaro.org>

4 months agomigration: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:47 +0000 (14:16 +1100)]
migration: Constify VMState

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-67-richard.henderson@linaro.org>

4 months agocpu-target: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:46 +0000 (14:16 +1100)]
cpu-target: Constify VMState

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20231221031652.119827-66-richard.henderson@linaro.org>

4 months agobackends: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:45 +0000 (14:16 +1100)]
backends: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-65-richard.henderson@linaro.org>

4 months agoaudio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:44 +0000 (14:16 +1100)]
audio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-64-richard.henderson@linaro.org>

4 months agohw/misc/macio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:43 +0000 (14:16 +1100)]
hw/misc/macio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-63-richard.henderson@linaro.org>

4 months agohw/watchdog: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:42 +0000 (14:16 +1100)]
hw/watchdog: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-62-richard.henderson@linaro.org>

4 months agohw/virtio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:41 +0000 (14:16 +1100)]
hw/virtio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-61-richard.henderson@linaro.org>

4 months agohw/vfio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:40 +0000 (14:16 +1100)]
hw/vfio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20231221031652.119827-60-richard.henderson@linaro.org>

4 months agohw/usb: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:39 +0000 (14:16 +1100)]
hw/usb: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-59-richard.henderson@linaro.org>

4 months agohw/tpm: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:38 +0000 (14:16 +1100)]
hw/tpm: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-58-richard.henderson@linaro.org>

4 months agohw/timer: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:37 +0000 (14:16 +1100)]
hw/timer: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-57-richard.henderson@linaro.org>

4 months agohw/ssi: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:36 +0000 (14:16 +1100)]
hw/ssi: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-56-richard.henderson@linaro.org>

4 months agohw/sparc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:35 +0000 (14:16 +1100)]
hw/sparc: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-55-richard.henderson@linaro.org>

4 months agohw/sensor: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:34 +0000 (14:16 +1100)]
hw/sensor: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-54-richard.henderson@linaro.org>

4 months agohw/sd: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:33 +0000 (14:16 +1100)]
hw/sd: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-53-richard.henderson@linaro.org>

4 months agohw/scsi: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:32 +0000 (14:16 +1100)]
hw/scsi: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-52-richard.henderson@linaro.org>

4 months agohw/s390x: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:31 +0000 (14:16 +1100)]
hw/s390x: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-51-richard.henderson@linaro.org>

4 months agohw/rtc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:30 +0000 (14:16 +1100)]
hw/rtc: Constify VMState

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-50-richard.henderson@linaro.org>

4 months agohw/riscv: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:29 +0000 (14:16 +1100)]
hw/riscv: Constify VMState

Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-49-richard.henderson@linaro.org>

4 months agohw/ppc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:28 +0000 (14:16 +1100)]
hw/ppc: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-48-richard.henderson@linaro.org>

4 months agohw/pci-host: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:27 +0000 (14:16 +1100)]
hw/pci-host: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-47-richard.henderson@linaro.org>

4 months agohw/pci-bridge: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:26 +0000 (14:16 +1100)]
hw/pci-bridge: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-46-richard.henderson@linaro.org>

4 months agohw/pci: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:25 +0000 (14:16 +1100)]
hw/pci: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-45-richard.henderson@linaro.org>

4 months agohw/openrisc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:24 +0000 (14:16 +1100)]
hw/openrisc: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-44-richard.henderson@linaro.org>

4 months agohw/nvram: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:23 +0000 (14:16 +1100)]
hw/nvram: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-43-richard.henderson@linaro.org>

4 months agohw/net: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:22 +0000 (14:16 +1100)]
hw/net: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-42-richard.henderson@linaro.org>

4 months agohw/misc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:21 +0000 (14:16 +1100)]
hw/misc: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-41-richard.henderson@linaro.org>

4 months agohw/m68k: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:20 +0000 (14:16 +1100)]
hw/m68k: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-40-richard.henderson@linaro.org>

4 months agohw/loongarch: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:19 +0000 (14:16 +1100)]
hw/loongarch: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20231221031652.119827-39-richard.henderson@linaro.org>

4 months agohw/isa: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:18 +0000 (14:16 +1100)]
hw/isa: Constify VMState

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-38-richard.henderson@linaro.org>

4 months agohw/ipmi: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:17 +0000 (14:16 +1100)]
hw/ipmi: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-37-richard.henderson@linaro.org>

4 months agohw/ipack: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:16 +0000 (14:16 +1100)]
hw/ipack: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-36-richard.henderson@linaro.org>

4 months agohw/intc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:15 +0000 (14:16 +1100)]
hw/intc: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-35-richard.henderson@linaro.org>

4 months agohw/input: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:14 +0000 (14:16 +1100)]
hw/input: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-34-richard.henderson@linaro.org>

4 months agohw/ide: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:13 +0000 (14:16 +1100)]
hw/ide: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-33-richard.henderson@linaro.org>

4 months agohw/i386: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:12 +0000 (14:16 +1100)]
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>

4 months agohw/i2c: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:11 +0000 (14:16 +1100)]
hw/i2c: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-31-richard.henderson@linaro.org>

4 months agohw/hyperv: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:10 +0000 (14:16 +1100)]
hw/hyperv: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-30-richard.henderson@linaro.org>

4 months agohw/gpio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:09 +0000 (14:16 +1100)]
hw/gpio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-29-richard.henderson@linaro.org>

4 months agohw/dma: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:08 +0000 (14:16 +1100)]
hw/dma: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-28-richard.henderson@linaro.org>

4 months agohw/display: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:07 +0000 (14:16 +1100)]
hw/display: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-27-richard.henderson@linaro.org>

4 months agohw/char: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:06 +0000 (14:16 +1100)]
hw/char: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-26-richard.henderson@linaro.org>

4 months agohw/block: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:05 +0000 (14:16 +1100)]
hw/block: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-25-richard.henderson@linaro.org>

4 months agohw/audio: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:04 +0000 (14:16 +1100)]
hw/audio: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-24-richard.henderson@linaro.org>

4 months agohw/adc: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:03 +0000 (14:16 +1100)]
hw/adc: Constify VMState

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-23-richard.henderson@linaro.org>

4 months agohw/acpi: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:02 +0000 (14:16 +1100)]
hw/acpi: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-22-richard.henderson@linaro.org>

4 months agohw/9pfs: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:01 +0000 (14:16 +1100)]
hw/9pfs: Constify VMState

Acked-by: Greg Kurz <groug@kaod.org>
Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-21-richard.henderson@linaro.org>

4 months agohw/core: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:16:00 +0000 (14:16 +1100)]
hw/core: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-20-richard.henderson@linaro.org>

4 months agohw/arm: Constify VMState
Richard Henderson [Thu, 21 Dec 2023 03:15:59 +0000 (14:15 +1100)]
hw/arm: Constify VMState

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-19-richard.henderson@linaro.org>

4 months agotarget/sparc: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:58 +0000 (14:15 +1100)]
target/sparc: Constify VMState in machine.c

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-18-richard.henderson@linaro.org>

4 months agotarget/s390x: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:57 +0000 (14:15 +1100)]
target/s390x: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-17-richard.henderson@linaro.org>

4 months agotarget/riscv: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:56 +0000 (14:15 +1100)]
target/riscv: Constify VMState in machine.c

Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-16-richard.henderson@linaro.org>

4 months agotarget/ppc: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:55 +0000 (14:15 +1100)]
target/ppc: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-15-richard.henderson@linaro.org>

4 months agotarget/openrisc: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:54 +0000 (14:15 +1100)]
target/openrisc: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-14-richard.henderson@linaro.org>

4 months agotarget/mips: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:53 +0000 (14:15 +1100)]
target/mips: Constify VMState in machine.c

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-13-richard.henderson@linaro.org>

4 months agotarget/microblaze: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:52 +0000 (14:15 +1100)]
target/microblaze: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-12-richard.henderson@linaro.org>

4 months agotarget/m68k: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:51 +0000 (14:15 +1100)]
target/m68k: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-11-richard.henderson@linaro.org>

4 months agotarget/loongarch: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:50 +0000 (14:15 +1100)]
target/loongarch: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20231221031652.119827-10-richard.henderson@linaro.org>

4 months agotarget/i386: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:49 +0000 (14:15 +1100)]
target/i386: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20231221031652.119827-9-richard.henderson@linaro.org>

4 months agotarget/hppa: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:48 +0000 (14:15 +1100)]
target/hppa: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-8-richard.henderson@linaro.org>

4 months agotarget/cris: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:47 +0000 (14:15 +1100)]
target/cris: Constify VMState in machine.c

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-7-richard.henderson@linaro.org>

4 months agotarget/avr: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:46 +0000 (14:15 +1100)]
target/avr: Constify VMState in machine.c

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-6-richard.henderson@linaro.org>

4 months agotarget/alpha: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:45 +0000 (14:15 +1100)]
target/alpha: Constify VMState in machine.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-5-richard.henderson@linaro.org>

4 months agotarget/arm: Constify hvf/hvf.c
Richard Henderson [Thu, 21 Dec 2023 03:15:44 +0000 (14:15 +1100)]
target/arm: Constify hvf/hvf.c

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-4-richard.henderson@linaro.org>

4 months agotarget/arm: Constify VMState in machine.c
Richard Henderson [Thu, 21 Dec 2023 03:15:43 +0000 (14:15 +1100)]
target/arm: Constify VMState in machine.c

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-3-richard.henderson@linaro.org>

4 months agomigration: Make VMStateDescription.subsections const
Richard Henderson [Thu, 21 Dec 2023 03:15:42 +0000 (14:15 +1100)]
migration: Make VMStateDescription.subsections const

Allow the array of pointers to itself be const.
Propagate this through the copies of this field.

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-2-richard.henderson@linaro.org>

4 months agoMerge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging
Stefan Hajnoczi [Wed, 27 Dec 2023 10:15:32 +0000 (05:15 -0500)]
Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging

Pull request

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmWL9k0ACgkQnKSrs4Gr
# c8hf1wgAtQTvIdkZxr4cZgzfgS889H8sqw3ksjQlzsD1eaU3iEV9AMZu9gOScTlB
# n4SBjO4uG9nOUfAGhq5UuwVthynlqcPPJ21HD8XPlLIC1fNEaKVbUx1JcEIIjzdm
# Mg7PPgV4tQaVHwj5HyuYZox9H/r4aQeDZZL+oG8/jbal0RVJPVwCWi4v0viceBCq
# SKFQkWAo/kgFgmRpTbtLAhjKcW6TXbVKz+PGTcLyMdDq+SkIcX4kvDoygAZ5uAn7
# bO6QBZE5gVhqZ32rqAC28bJGC9L9hCD8e38KOpdfCfwVtjn2pSYGZxxSB/bxsruv
# ZlrKGfeNS8KravQZ/jHYE2+CvgTh4w==
# =uzd7
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 27 Dec 2023 05:02:53 EST
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [ultimate]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [ultimate]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu:
  tracing: install trace events file only if necessary

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 months agotracing: install trace events file only if necessary
Carlos Santos [Sat, 8 Apr 2023 01:04:10 +0000 (22:04 -0300)]
tracing: install trace events file only if necessary

It is not useful when configuring with --enable-trace-backends=nop.

Signed-off-by: Carlos Santos <casantos@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230408010410.281263-1-casantos@redhat.com>

4 months agoMerge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into...
Stefan Hajnoczi [Tue, 26 Dec 2023 11:07:16 +0000 (06:07 -0500)]
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging

virtio,pc,pci: features, cleanups, fixes

vhost-scsi support for worker ioctls

fixes, cleanups all over the place.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmWKohIPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpG2YH/1rJGV8TQm4V8kcGP9wOknPAMFADnEFdFmrB
# V+JEDnyKrdcEZLPRh0b846peWRJhC13iL7Ks3VNjeVsfE9TyzNyNDpUzCJPfYFjR
# 3m8ChLDvE9tKBA5/hXMIcgDXaYcPIrPvHyl4HG8EQn7oaeMpS2uecKqDpDDvNXGq
# oNamNvqimFSqA+3ChzA+0Qt07Ts7xFEw4OEXSwfRXlsam/dhQG0SI+crRheHuvFb
# HR8EwmNydA1D/M51AuBNuvX36u3SnPWm7Anp5711SZ1b59unshI0ztIqIJnGkvYe
# qpUJSmxR6ulwWe4nQfb+GhBsuJ2j2ORC7YfXyAT7mw8rds8loaI=
# =cNy2
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 26 Dec 2023 04:51:14 EST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (21 commits)
  vdpa: move memory listener to vhost_vdpa_shared
  vdpa: use dev_shared in vdpa_iommu
  vdpa: use VhostVDPAShared in vdpa_dma_map and unmap
  vdpa: move iommu_list to vhost_vdpa_shared
  vdpa: remove msg type of vhost_vdpa
  vdpa: move backend_cap to vhost_vdpa_shared
  vdpa: move iotlb_batch_begin_sent to vhost_vdpa_shared
  vdpa: move file descriptor to vhost_vdpa_shared
  vdpa: use vdpa shared for tracing
  vdpa: move shadow_data to vhost_vdpa_shared
  vdpa: move iova_range to vhost_vdpa_shared
  vdpa: move iova tree to the shared struct
  vdpa: add VhostVDPAShared
  vdpa: do not set virtio status bits if unneeded
  Fix bugs when VM shutdown with virtio-gpu unplugged
  vhost-scsi: fix usage of error_reportf_err()
  hw/acpi: propagate vcpu hotplug after switch to modern interface
  vhost-scsi: Add support for a worker thread per virtqueue
  vhost: Add worker backend callouts
  tests: bios-tables-test: Rename smbios type 4 related test functions
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 months agoMerge tag 'dirtylimit-dirtyrate-pull-request-20231225' of https://github.com/newfrida...
Stefan Hajnoczi [Tue, 26 Dec 2023 11:06:50 +0000 (06:06 -0500)]
Merge tag 'dirtylimit-dirtyrate-pull-request-20231225' of https://github.com/newfriday/qemu into staging

dirtylimit dirtyrate pull request 20231225

Nitpick about an unused parameter
Please apply, thanks,
Yong

# -----BEGIN PGP SIGNATURE-----
#
# iQJKBAABCAA0FiEEaF0CINwmSCgVLlfC3/Ij1rP+y5wFAmWJVtkWHHlvbmcuaHVh
# bmdAc21hcnR4LmNvbQAKCRDf8iPWs/7LnLexEADjuQ7dtbv2vq1ksqDq6fct++FK
# sGPe6P9UAyJrB0qxW3jKRn2P4E/xiPHpmi+BbOOu8PppeZt86NFlzun681vMpkKu
# d3oAlwRtX8eklk3oub+yBXzkAfsGr+EHEWms/12ATsd6apItxi47zUUw/2aznujz
# TlZR7qOD1kjvPHOVnP07fQ3NYiPIITpzSqVgo3fxE+upmb+dnELIkyGTAvJY2Pjz
# Uh4CtG/sQq8OJJwUn1TFmhB1Ujw9oo8v/lOtIpsxfcKtQcAwyvgmyfndOMZ/h6O3
# ri3axypg8PyGyidYEh0JSoR3OVUIt5eoqPNp+sQTNeZsjTIwKjpBGUOLXbIA56nB
# Z/ZRbxSKj+JRD9qQZ2NODE1QurgEuT51aWkEeBEsx0OtUINcjZkwWeQmiasJQw1T
# 4z4Hez0ipuET9MmeTbWkVh9rO3Bsxi9QxiXEiN6YPNqTqLhwomXU+MIlrCsZQzjB
# l4Jij9byeWL9ntx3qwtSWJGHV6Qql16UkPo+c2Co/q2rdx/FqiYrMgCtLee1yo5n
# lSCKmrVMLaLyQv7jnLY8txhU7/CXNnwij4YSgfi7nujOgM6L3uwYc9Tp5kcQHE/b
# o/Mr6oOi79Z+rdByk4pPUKaJV7FnbWMoUgjsqWPJgedGt0K9StRsXCGR1wYMUVdU
# R8Dv0IZyyGuSf6MhNw==
# =Y00D
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 25 Dec 2023 05:18:01 EST
# gpg:                using RSA key 685D0220DC264828152E57C2DFF223D6B3FECB9C
# gpg:                issuer "yong.huang@smartx.com"
# gpg: Good signature from "Yong Huang <yong.huang@smartx.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 685D 0220 DC26 4828 152E  57C2 DFF2 23D6 B3FE CB9C

* tag 'dirtylimit-dirtyrate-pull-request-20231225' of https://github.com/newfriday/qemu:
  migration/dirtyrate: Remove an extra parameter

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 months agoMerge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging
Stefan Hajnoczi [Tue, 26 Dec 2023 11:06:10 +0000 (06:06 -0500)]
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging

trivial patches for 2023-12-25

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmWJOBUPHG1qdEB0bHMu
# bXNrLnJ1AAoJEHAbT2saaT5ZigcIAL21an9qATltedufz/QH5gf21g54LBtiBfny
# LN6yyMYj0j+Kydwr1FErub4b2Ek7xIT69ywpXhW7bI3ultCsVf5wVG8Gaa8iVq8L
# j6wV7PHn4+BErv4ZZmHhS0Pb8zeNJ8sDX0pBAZnATzXsaRYXN726a0D70kRZCZi9
# MGPjzUeuS9VoBzYr3kiBILDw3NBArIJusdcFVs4cmoxCDRcAVtwLwQqcvS6XXyr8
# /IfN8NCm54qnwa+mlHWrY9MFM0t7htDL2HLPjiRevLbMMBiJ9bKzVoMCsSK7gn4U
# OFZX49vjtuR0KPflRmmkHGbadU1/QyG+Rj5Un9M+wHhsMEZjoRY=
# =G1GO
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 25 Dec 2023 03:06:45 EST
# gpg:                using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59
# gpg:                issuer "mjt@tls.msk.ru"
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" [full]
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>" [full]
# gpg:                 aka "Michael Tokarev <mjt@debian.org>" [full]
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu:
  virtio-blk: Fix potential nullpointer read access in virtio_blk_data_plane_destroy
  include/ui/rect.h: fix qemu_rect_init() mis-assignment
  accel/kvm: Turn DPRINTF macro use into tracepoints
  docs/tools/qemu-img.rst: fix typo (sumarizes)
  qemu-options: Tell more for -display cocoa
  qemu-options: Unify the help entries for cocoa
  target/riscv/kvm: do not use non-portable strerrorname_np()

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 months agoMerge tag 'm68k-pull-2023-12-22' of https://gitlab.com/huth/qemu into staging
Stefan Hajnoczi [Tue, 26 Dec 2023 11:05:20 +0000 (06:05 -0500)]
Merge tag 'm68k-pull-2023-12-22' of https://gitlab.com/huth/qemu into staging

* Add dummy next-cube ethernet register to allow diagnostic to timeout
* Don't pulse next-cube SCSI DMA IRQ upon reception of FLUSH command
* Rework next-cube mmio ops and system control register handling functions
* Embed next-cube MemoryRegions into NeXTState

# -----BEGIN PGP SIGNATURE-----
#
# iQJHBAABCAAxFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmWFkbYTHGh1dGhAdHV4
# ZmFtaWx5Lm9yZwAKCRAu2dd0/nAttczHD/9DJKhSFPw+4dLF9kTk7hhs1FMBlD+x
# rrrfiP5U33fvL/+3ZzriovKjPkt2M/2C9/bg2G+smugg56gcWKXfNRX+bB8nx1J9
# +rlFhKa3pHvG7EXDWkWjbzceMS3W3T2RBzx1RNs/TmLnCWAmx0J//ADGqfZm6Bxf
# 1C65S8uUFN4VRWKdiynSkCfOwIockFPVE6A8G1QkCfBdhzWfMORcm1AplwOQLzKo
# qF6zU9s5i4b0FAj3NWgnK2W3l8PhYYasn18wpQ6krmBuFIJlTvuNpbIAiLfZyaeh
# Svb9gN/41AAiGiq25NUkAcXmWehFWeBzZ5Dpnxw3HfVJkqiBmB2GMUGIvrBbSsvH
# mBqDX/0IGGSrvUM8B7Zij6wFhrjtrhhufpDmn9hqb+x8v/YOOLt/qT6QCHyrUJZs
# LGcEoL2B1NgVWflyvEzJaC6TbLm2zmzHSto2HA90vL9P9taKmqaxeXGS8mt3o4iN
# Ev4Q/oQnUulHKYyVGqpt0DGRxSO6C8+0uoSCKYSehqPnACGtCJXpa33fYZyFg6ax
# wsNqA8PY8FKJ3vTSazkDhIcWJvkat6U0EMWaeO21XOsZTw/I2bY7ztMnWeaV9UJh
# 76ZTOO3sxlZt4tDM5ddpW6PobFp4T+qA8KQOWp+ecVfi7xvzXp7zahxR+gYFtcsR
# qkJ8/X5SfiCtgg==
# =y0ez
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 22 Dec 2023 08:40:06 EST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "huth@tuxfamily.org"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'm68k-pull-2023-12-22' of https://gitlab.com/huth/qemu:
  next-cube.c: move machine MemoryRegions into NeXTState
  next-cube.c: remove val and size arguments from nextscr2_write()
  next-cube.c: move LED logic to new next_scr2_led_update() function
  next-cube.c: move static old_scr2 variable to NeXTPC
  next-cube.c: move static phase variable to NextRtc
  next-cube.c: move static led variable to NeXTPC
  next-cube.c: update and improve dma_ops
  next-cube.c: update scr_ops to properly use modern memory API
  next-cube.c: update mmio_ops to properly use modern memory API
  next-cube.c: don't pulse SCSI DMA IRQ upon reception of FLUSH command
  next-cube.c: add dummy Ethernet register to allow diagnostic to timeout

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
4 months agovdpa: move memory listener to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:22 +0000 (18:43 +0100)]
vdpa: move memory listener to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the memory listener to a common place rather than always in the
first / last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-14-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: use dev_shared in vdpa_iommu
Eugenio Pérez [Thu, 21 Dec 2023 17:43:21 +0000 (18:43 +0100)]
vdpa: use dev_shared in vdpa_iommu

The memory listener functions can call these too.  Make vdpa_iommu work
with VhostVDPAShared.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-13-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: use VhostVDPAShared in vdpa_dma_map and unmap
Eugenio Pérez [Thu, 21 Dec 2023 17:43:20 +0000 (18:43 +0100)]
vdpa: use VhostVDPAShared in vdpa_dma_map and unmap

The callers only have the shared information by the end of this series.
Start converting this functions.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-12-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move iommu_list to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:19 +0000 (18:43 +0100)]
vdpa: move iommu_list to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the iommu_list member to VhostVDPAShared so all vhost_vdpa can use
it, rather than always in the first / last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-11-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: remove msg type of vhost_vdpa
Eugenio Pérez [Thu, 21 Dec 2023 17:43:18 +0000 (18:43 +0100)]
vdpa: remove msg type of vhost_vdpa

It is always VHOST_IOTLB_MSG_V2. We can always make it back per
vhost_dev if needed.

This change makes easier for vhost_vdpa_map and unmap not to depend on
vhost_vdpa but only in VhostVDPAShared.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-10-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move backend_cap to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:17 +0000 (18:43 +0100)]
vdpa: move backend_cap to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the backend_cap member to VhostVDPAShared so all vhost_vdpa can use
it, rather than always in the first / last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-9-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move iotlb_batch_begin_sent to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:16 +0000 (18:43 +0100)]
vdpa: move iotlb_batch_begin_sent to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the iotlb_batch_begin_sent member to VhostVDPAShared so all
vhost_vdpa can use it, rather than always in the first / last
vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-8-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move file descriptor to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:15 +0000 (18:43 +0100)]
vdpa: move file descriptor to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the file descriptor to VhostVDPAShared so all vhost_vdpa can use
it, rather than always in the first / last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-7-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: use vdpa shared for tracing
Eugenio Pérez [Thu, 21 Dec 2023 17:43:14 +0000 (18:43 +0100)]
vdpa: use vdpa shared for tracing

By the end of this series dma_map and dma_unmap functions don't have the
vdpa device for tracing.  Movinge trace function to shared member one.
Print it also in the vdpa initialization so log reader can relate them.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-6-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move shadow_data to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:13 +0000 (18:43 +0100)]
vdpa: move shadow_data to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the shadow_data member to VhostVDPAShared so all vhost_vdpa can use
it, rather than always in the first or last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-5-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move iova_range to vhost_vdpa_shared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:12 +0000 (18:43 +0100)]
vdpa: move iova_range to vhost_vdpa_shared

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the iova range to VhostVDPAShared so all vhost_vdpa can use it,
rather than always in the first or last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-4-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: move iova tree to the shared struct
Eugenio Pérez [Thu, 21 Dec 2023 17:43:11 +0000 (18:43 +0100)]
vdpa: move iova tree to the shared struct

Next patches will register the vhost_vdpa memory listener while the VM
is migrating at the destination, so we can map the memory to the device
before stopping the VM at the source.  The main goal is to reduce the
downtime.

However, the destination QEMU is unaware of which vhost_vdpa device will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the CVQ device.  Otherwise, it  will be the first one.

Move the iova tree to VhostVDPAShared so all vhost_vdpa can use it,
rather than always in the first or last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-3-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: add VhostVDPAShared
Eugenio Pérez [Thu, 21 Dec 2023 17:43:10 +0000 (18:43 +0100)]
vdpa: add VhostVDPAShared

It will hold properties shared among all vhost_vdpa instances associated
with of the same device.  For example, we just need one iova_tree or one
memory listener for the entire device.

Next patches will register the vhost_vdpa memory listener at the
beginning of the VM migration at the destination. This enables QEMU to
map the memory to the device before stopping the VM at the source,
instead of doing while both source and destination are stopped, thus
minimizing the downtime.

However, the destination QEMU is unaware of which vhost_vdpa struct will
register its memory_listener.  If the source guest has CVQ enabled, it
will be the one associated with the CVQ.  Otherwise, it will be the
first one.

Save the memory operations related members in a common place rather than
always in the first / last vhost_vdpa.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20231221174322.3130442-2-eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovdpa: do not set virtio status bits if unneeded
Eugenio Pérez [Fri, 15 Dec 2023 17:28:19 +0000 (18:28 +0100)]
vdpa: do not set virtio status bits if unneeded

Next commits will set DRIVER and ACKNOWLEDGE flags repeatedly in the
case of a migration destination.  Let's save ioctls with this.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20231215172830.2540987-2-eperezma@redhat.com>

4 months agoFix bugs when VM shutdown with virtio-gpu unplugged
wangmeiling [Thu, 14 Dec 2023 07:22:08 +0000 (07:22 +0000)]
Fix bugs when VM shutdown with virtio-gpu unplugged

Virtio-gpu malloc memory for the queue when it realized, but the queues was not
released when it unrealized, which resulting in a memory leak. In addition,
vm_change_state_handler is not cleaned up, which is related to vdev and will
lead to segmentation fault when VM shutdown.

Signed-off-by: wangmeiling <wangmeiling21@huawei.com>
Signed-off-by: Binfeng Wu <wubinfeng@huawei.com>
Message-Id: <7bbbc0f3-2ad9-83ca-b39b-f976d0837daf@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovhost-scsi: fix usage of error_reportf_err()
Dongli Zhang [Thu, 14 Dec 2023 00:31:17 +0000 (16:31 -0800)]
vhost-scsi: fix usage of error_reportf_err()

It is required to use error_report() instead of error_reportf_err(), if the
prior function does not take local_err as the argument. As a result, the
local_err is always NULL and segment fault may happen.

vhost_scsi_start()
-> vhost_scsi_set_endpoint(s) --> does not allocate local_err
-> error_reportf_err()
   -> error_vprepend()
      -> g_string_append(newmsg, (*errp)->msg) --> (*errp) is NULL

In addition, add ": " at the end of other error_reportf_err() logs.

Fixes: 7962e432b4e4 ("vhost-user-scsi: support reconnect to backend")
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Message-Id: <20231214003117.43960-1-dongli.zhang@oracle.com>
Reviewed-by: Feng Li <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agohw/acpi: propagate vcpu hotplug after switch to modern interface
Aaron Young [Tue, 12 Dec 2023 16:51:43 +0000 (08:51 -0800)]
hw/acpi: propagate vcpu hotplug after switch to modern interface

If a vcpu with an apic-id that is not supported by the legacy
interface (>255) is hot-plugged, the legacy code will dynamically switch
to the modern interface. However, the hotplug event is not forwarded to
the new interface resulting in the vcpu not being fully/properly added
to the machine config. This BUG is evidenced by OVMF when it
it attempts to count the vcpus and reports an inconsistent vcpu count
reported by the fw_cfg interface and the modern hotpug interface.

Fix is to propagate the hotplug event after making the switch from
the legacy interface to the modern interface.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Aaron Young <aaron.young@oracle.com>
Message-Id: <0e8a9baebbb29f2a6c87fd08e43dc2ac4019759a.1702398644.git.Aaron.Young@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovhost-scsi: Add support for a worker thread per virtqueue
Mike Christie [Mon, 4 Dec 2023 23:16:18 +0000 (17:16 -0600)]
vhost-scsi: Add support for a worker thread per virtqueue

This adds support for vhost-scsi to be able to create a worker thread
per virtqueue. Right now for vhost-net we get a worker thread per
tx/rx virtqueue pair which scales nicely as we add more virtqueues and
CPUs, but for scsi we get the single worker thread that's shared by all
virtqueues. When trying to send IO to more than 2 virtqueues the single
thread becomes a bottlneck.

This patch adds a new setting, worker_per_virtqueue, which can be set
to:

false: Existing behavior where we get the single worker thread.
true: Create a worker per IO virtqueue.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20231204231618.21962-3-michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
4 months agovhost: Add worker backend callouts
Mike Christie [Mon, 4 Dec 2023 23:16:17 +0000 (17:16 -0600)]
vhost: Add worker backend callouts

This adds the vhost backend callouts for the worker ioctls added in the
6.4 linux kernel commit:

c1ecd8e95007 ("vhost: allow userspace to create workers")

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20231204231618.21962-2-michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agotests: bios-tables-test: Rename smbios type 4 related test functions
Zhao Liu [Mon, 27 Nov 2023 16:02:02 +0000 (00:02 +0800)]
tests: bios-tables-test: Rename smbios type 4 related test functions

In fact, type4-count, core-count, core-count2, thread-count and
thread-count2 are tested with KVM not TCG.

Rename these test functions to reflect KVM base instead of TCG.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20231127160202.1037290-1-zhao1.liu@linux.intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agovirtio: rng: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX
Mathieu Poirier [Wed, 25 Oct 2023 17:18:41 +0000 (11:18 -0600)]
virtio: rng: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

Since the driver doesn't support interrupts, we must return early when
index is set to VIRTIO_CONFIG_IRQ_IDX.  Basically the same thing Viresh
did for "91208dd297f2 virtio: i2c: Check notifier helpers for
VIRTIO_CONFIG_IRQ_IDX".

Fixes: 544f0278afca ("virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX")
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Message-Id: <20231025171841.3379663-1-mathieu.poirier@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
4 months agomigration/dirtyrate: Remove an extra parameter
Wafer [Mon, 4 Dec 2023 01:22:30 +0000 (09:22 +0800)]
migration/dirtyrate: Remove an extra parameter

vcpu_dirty_stat_collect() has an unused parameter so remove it.

Signed-off-by: Wafer <wafer@jaguarmicro.com>
Reviewed-by: Hyman Huang <yong.huang@smartx.com>
Message-Id: <20231204012230.4123-1-wafer@jaguarmicro.com>