aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS10
-rw-r--r--accel/xen/xen-all.c2
-rw-r--r--audio/audio.c2
-rw-r--r--backends/dbus-vmstate.c5
-rw-r--r--block/block-backend.c2
-rw-r--r--default-configs/devices/lm32-softmmu.mak2
-rw-r--r--disas/nanomips.cpp2
-rw-r--r--gdbstub.c2
-rw-r--r--hw/block/pflash_cfi01.c2
-rw-r--r--hw/block/virtio-blk.c2
-rw-r--r--hw/char/meson.build4
-rw-r--r--hw/display/qxl.c2
-rw-r--r--hw/display/vhost-user-gpu.c1
-rw-r--r--hw/display/virtio-gpu-3d.c3
-rw-r--r--hw/i386/kvm/clock.c2
-rw-r--r--hw/i386/kvm/i8254.c2
-rw-r--r--hw/i386/kvmvapic.c2
-rw-r--r--hw/i386/xen/xen-hvm.c2
-rw-r--r--hw/ide/core.c2
-rw-r--r--hw/intc/arm_gicv3_its_kvm.c2
-rw-r--r--hw/intc/arm_gicv3_kvm.c2
-rw-r--r--hw/intc/meson.build2
-rw-r--r--hw/intc/spapr_xive_kvm.c2
-rw-r--r--hw/lm32/Kconfig10
-rw-r--r--hw/lm32/meson.build2
-rw-r--r--hw/misc/mac_via.c2
-rw-r--r--hw/misc/trace-events2
-rw-r--r--hw/net/allwinner-sun8i-emac.c2
-rw-r--r--hw/net/e1000e_core.c2
-rw-r--r--hw/nvram/spapr_nvram.c2
-rw-r--r--hw/ppc/pnv_bmc.c2
-rw-r--r--hw/ppc/pnv_xscom.c2
-rw-r--r--hw/ppc/ppc.c2
-rw-r--r--hw/ppc/ppc_booke.c2
-rw-r--r--hw/s390x/tod-kvm.c2
-rw-r--r--hw/scsi/scsi-bus.c2
-rw-r--r--hw/scsi/scsi-disk.c1
-rw-r--r--hw/timer/meson.build2
-rw-r--r--hw/usb/ccid-card-emulated.c2
-rw-r--r--hw/usb/hcd-ehci.c2
-rw-r--r--hw/usb/hcd-ohci.c2
-rw-r--r--hw/usb/host-libusb.c2
-rw-r--r--hw/usb/redirect.c2
-rw-r--r--hw/vfio/migration.c2
-rw-r--r--hw/virtio/vhost.c2
-rw-r--r--hw/virtio/virtio-rng.c2
-rw-r--r--hw/virtio/virtio.c2
-rw-r--r--include/exec/memory.h32
-rw-r--r--include/hw/elf_ops.h2
-rw-r--r--include/hw/ppc/pnv_xscom.h2
-rw-r--r--include/hw/s390x/css.h2
-rw-r--r--include/qemu-common.h2
-rw-r--r--include/qemu/id.h1
-rw-r--r--include/sysemu/runstate.h12
-rw-r--r--net/net.c8
-rw-r--r--qemu-options.hx10
-rw-r--r--scripts/tracetool/__init__.py2
-rw-r--r--softmmu/memory.c14
-rw-r--r--softmmu/qemu-seccomp.c16
-rw-r--r--softmmu/runstate.c4
-rw-r--r--target/arm/kvm.c2
-rw-r--r--target/arm/kvm_arm.h2
-rwxr-xr-xtarget/hexagon/gen_tcg_funcs.py14
-rw-r--r--target/i386/cpu.c2
-rw-r--r--target/i386/kvm/kvm.c2
-rw-r--r--target/i386/machine.c2
-rw-r--r--target/i386/sev.c2
-rw-r--r--target/i386/whpx/whpx-all.c2
-rw-r--r--target/m68k/op_helper.c2
-rw-r--r--target/mips/kvm.c4
-rw-r--r--target/ppc/cpu-qom.h2
-rw-r--r--target/riscv/cpu.c2
-rw-r--r--tests/fp/fp-test.c8
-rw-r--r--tests/qtest/fuzz-test.c3
-rw-r--r--ui/console.c2
-rw-r--r--ui/gtk.c2
-rw-r--r--ui/spice-core.c2
-rw-r--r--ui/vnc-auth-sasl.c4
-rw-r--r--util/id.c1
79 files changed, 147 insertions, 134 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 7da465d..8e9f0d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1869,7 +1869,7 @@ S: Odd Fixes
F: hw/9pfs/
X: hw/9pfs/xen-9p*
F: fsdev/
-F: docs/interop/virtfs-proxy-helper.rst
+F: docs/tools/virtfs-proxy-helper.rst
F: tests/qtest/virtio-9p-test.c
T: git https://gitlab.com/gkurz/qemu.git 9p-next
T: git https://github.com/cschoenebeck/qemu.git 9p.next
@@ -1900,7 +1900,7 @@ S: Supported
F: tools/virtiofsd/*
F: hw/virtio/vhost-user-fs*
F: include/hw/virtio/vhost-user-fs.h
-F: docs/interop/virtiofsd.rst
+F: docs/tools/virtiofsd.rst
virtio-input
M: Gerd Hoffmann <kraxel@redhat.com>
@@ -2214,7 +2214,7 @@ F: block/
F: hw/block/
F: include/block/
F: qemu-img*
-F: docs/interop/qemu-img.rst
+F: docs/tools/qemu-img.rst
F: qemu-io*
F: tests/qemu-iotests/
F: util/qemu-progress.c
@@ -2671,7 +2671,7 @@ F: qapi/trace.json
F: scripts/tracetool.py
F: scripts/tracetool/
F: scripts/qemu-trace-stap*
-F: docs/interop/qemu-trace-stap.rst
+F: docs/tools/qemu-trace-stap.rst
F: docs/devel/tracing.txt
T: git https://github.com/stefanha/qemu.git tracing
@@ -3066,7 +3066,7 @@ F: include/block/nbd*
F: qemu-nbd.*
F: blockdev-nbd.c
F: docs/interop/nbd.txt
-F: docs/interop/qemu-nbd.rst
+F: docs/tools/qemu-nbd.rst
T: git https://repo.or.cz/qemu/ericb.git nbd
T: git https://src.openvz.org/scm/~vsementsov/qemu.git nbd
diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index e9d2d6a..69aa7d0 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -122,7 +122,7 @@ static void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
}
-static void xen_change_state_handler(void *opaque, int running,
+static void xen_change_state_handler(void *opaque, bool running,
RunState state)
{
if (running) {
diff --git a/audio/audio.c b/audio/audio.c
index 6734c8a..534278e 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1540,7 +1540,7 @@ static int audio_driver_init(AudioState *s, struct audio_driver *drv,
}
}
-static void audio_vm_change_state_handler (void *opaque, int running,
+static void audio_vm_change_state_handler (void *opaque, bool running,
RunState state)
{
AudioState *s = opaque;
diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c
index bd050e8..2a0d2e4 100644
--- a/backends/dbus-vmstate.c
+++ b/backends/dbus-vmstate.c
@@ -229,7 +229,10 @@ static int dbus_vmstate_post_load(void *opaque, int version_id)
&bytes_read, NULL, &err)) {
goto error;
}
- g_return_val_if_fail(bytes_read == len, -1);
+ if (bytes_read != len) {
+ error_report("%s: Short read", __func__);
+ return -1;
+ }
id[len] = 0;
trace_dbus_vmstate_loading(id);
diff --git a/block/block-backend.c b/block/block-backend.c
index e493f17..413af51 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -163,7 +163,7 @@ static const char *blk_root_get_name(BdrvChild *child)
return blk_name(child->opaque);
}
-static void blk_vm_state_changed(void *opaque, int running, RunState state)
+static void blk_vm_state_changed(void *opaque, bool running, RunState state)
{
Error *local_err = NULL;
BlockBackend *blk = opaque;
diff --git a/default-configs/devices/lm32-softmmu.mak b/default-configs/devices/lm32-softmmu.mak
index 115b3e3..1bce3f6 100644
--- a/default-configs/devices/lm32-softmmu.mak
+++ b/default-configs/devices/lm32-softmmu.mak
@@ -8,5 +8,5 @@ CONFIG_SEMIHOSTING=y
# Boards:
#
-CONFIG_LM32=y
+CONFIG_LM32_EVR=y
CONFIG_MILKYMIST=y
diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp
index 90e63b8..2b09655 100644
--- a/disas/nanomips.cpp
+++ b/disas/nanomips.cpp
@@ -837,7 +837,7 @@ int NMD::Disassemble(const uint16 * data, std::string & dis,
* an ASE attribute and the requested version
* not having that attribute
*/
- dis = "ASE attribute missmatch";
+ dis = "ASE attribute mismatch";
return -5;
}
disassembly_function dis_fn = table[i].disassembly;
diff --git a/gdbstub.c b/gdbstub.c
index 7a4cc075..054665e 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2754,7 +2754,7 @@ void gdb_set_stop_cpu(CPUState *cpu)
}
#ifndef CONFIG_USER_ONLY
-static void gdb_vm_state_change(void *opaque, int running, RunState state)
+static void gdb_vm_state_change(void *opaque, bool running, RunState state)
{
CPUState *cpu = gdbserver_state.c_cpu;
g_autoptr(GString) buf = g_string_new(NULL);
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 22287a1..526b704 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -1014,7 +1014,7 @@ void pflash_cfi01_legacy_drive(PFlashCFI01 *fl, DriveInfo *dinfo)
loc_pop(&loc);
}
-static void postload_update_cb(void *opaque, int running, RunState state)
+static void postload_update_cb(void *opaque, bool running, RunState state)
{
PFlashCFI01 *pfl = opaque;
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index e8600b0..3d2072c 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -870,7 +870,7 @@ static void virtio_blk_dma_restart_bh(void *opaque)
virtio_blk_process_queued_requests(s, true);
}
-static void virtio_blk_dma_restart_cb(void *opaque, int running,
+static void virtio_blk_dma_restart_cb(void *opaque, bool running,
RunState state)
{
VirtIOBlock *s = opaque;
diff --git a/hw/char/meson.build b/hw/char/meson.build
index afe9a0a..7ba38db 100644
--- a/hw/char/meson.build
+++ b/hw/char/meson.build
@@ -8,8 +8,8 @@ softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c'))
softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_DEVICES', if_true: files('lm32_juart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_DEVICES', if_true: files('lm32_uart.c'))
softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c'))
softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 6784d32..93907e8 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1992,7 +1992,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
}
}
-static void qxl_vm_change_state_handler(void *opaque, int running,
+static void qxl_vm_change_state_handler(void *opaque, bool running,
RunState state)
{
PCIQXLDevice *qxl = opaque;
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index a01f931..6cdaa1c 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -325,7 +325,6 @@ vhost_user_gpu_chr_read(void *opaque)
}
msg = g_malloc(VHOST_USER_GPU_HDR_SIZE + size);
- g_return_if_fail(msg != NULL);
r = qemu_chr_fe_read_all(&g->vhost_chr,
(uint8_t *)&msg->payload, size);
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 9eb4890..d989648 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -438,7 +438,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
break;
case VIRTIO_GPU_CMD_RESOURCE_FLUSH:
virgl_cmd_resource_flush(g, cmd);
- break;
+ break;
case VIRTIO_GPU_CMD_RESOURCE_UNREF:
virgl_cmd_resource_unref(g, cmd);
break;
@@ -456,7 +456,6 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
case VIRTIO_GPU_CMD_GET_CAPSET:
virgl_cmd_get_capset(g, cmd);
break;
-
case VIRTIO_GPU_CMD_GET_DISPLAY_INFO:
virtio_gpu_get_display_info(g, cmd);
break;
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 2d8a366..51872dd 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -162,7 +162,7 @@ static void do_kvmclock_ctrl(CPUState *cpu, run_on_cpu_data data)
}
}
-static void kvmclock_vm_state_change(void *opaque, int running,
+static void kvmclock_vm_state_change(void *opaque, bool running,
RunState state)
{
KVMClockState *s = opaque;
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index c73254e..c558893 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -239,7 +239,7 @@ static void kvm_pit_irq_control(void *opaque, int n, int enable)
kvm_pit_put(pit);
}
-static void kvm_pit_vm_state_change(void *opaque, int running,
+static void kvm_pit_vm_state_change(void *opaque, bool running,
RunState state)
{
KVMPITState *s = opaque;
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 2c18980..4631544 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -748,7 +748,7 @@ static void do_vapic_enable(CPUState *cs, run_on_cpu_data data)
s->state = VAPIC_ACTIVE;
}
-static void kvmvapic_vm_state_change(void *opaque, int running,
+static void kvmvapic_vm_state_change(void *opaque, bool running,
RunState state)
{
MachineState *ms = MACHINE(qdev_get_machine());
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 68821d9..7ce672e 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -1235,7 +1235,7 @@ static void xen_main_loop_prepare(XenIOState *state)
}
-static void xen_hvm_change_state_handler(void *opaque, int running,
+static void xen_hvm_change_state_handler(void *opaque, bool running,
RunState rstate)
{
XenIOState *state = opaque;
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 81db2c9..fd69ca3 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2677,7 +2677,7 @@ static void ide_restart_bh(void *opaque)
}
}
-static void ide_restart_cb(void *opaque, int running, RunState state)
+static void ide_restart_cb(void *opaque, bool running, RunState state)
{
IDEBus *bus = opaque;
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index 057cb53..b554d2e 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -71,7 +71,7 @@ static int kvm_its_send_msi(GICv3ITSState *s, uint32_t value, uint16_t devid)
*
* The tables get flushed to guest RAM whenever the VM gets stopped.
*/
-static void vm_change_state_handler(void *opaque, int running,
+static void vm_change_state_handler(void *opaque, bool running,
RunState state)
{
GICv3ITSState *s = (GICv3ITSState *)opaque;
diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
index d040a5d..65a4c88 100644
--- a/hw/intc/arm_gicv3_kvm.c
+++ b/hw/intc/arm_gicv3_kvm.c
@@ -743,7 +743,7 @@ static const ARMCPRegInfo gicv3_cpuif_reginfo[] = {
*
* The tables get flushed to guest RAM whenever the VM gets stopped.
*/
-static void vm_change_state_handler(void *opaque, int running,
+static void vm_change_state_handler(void *opaque, bool running,
RunState state)
{
GICv3State *s = (GICv3State *)opaque;
diff --git a/hw/intc/meson.build b/hw/intc/meson.build
index b3d9345..8df3656 100644
--- a/hw/intc/meson.build
+++ b/hw/intc/meson.build
@@ -14,7 +14,7 @@ softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
softmmu_ss.add(when: 'CONFIG_I8259', if_true: files('i8259_common.c', 'i8259.c'))
softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_avic.c', 'imx_gpcv2.c'))
softmmu_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic_common.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_pic.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_DEVICES', if_true: files('lm32_pic.c'))
softmmu_ss.add(when: 'CONFIG_OPENPIC', if_true: files('openpic.c'))
softmmu_ss.add(when: 'CONFIG_PL190', if_true: files('pl190.c'))
softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_intc.c'))
diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c
index acc8c36..c008331 100644
--- a/hw/intc/spapr_xive_kvm.c
+++ b/hw/intc/spapr_xive_kvm.c
@@ -504,7 +504,7 @@ static int kvmppc_xive_get_queues(SpaprXive *xive, Error **errp)
* runs again. If an interrupt was queued while the VM was stopped,
* simply generate a trigger.
*/
-static void kvmppc_xive_change_state_handler(void *opaque, int running,
+static void kvmppc_xive_change_state_handler(void *opaque, bool running,
RunState state)
{
SpaprXive *xive = opaque;
diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
index ed2e306..8ac9420 100644
--- a/hw/lm32/Kconfig
+++ b/hw/lm32/Kconfig
@@ -1,14 +1,18 @@
-config LM32
+config LM32_DEVICES
bool
select PTIMER
- select PFLASH_CFI02
config MILKYMIST
bool
# FIXME: disabling it results in compile-time errors
select MILKYMIST_TMU2 if OPENGL && X11
- select PTIMER
select PFLASH_CFI01
select FRAMEBUFFER
select SD
select USB_OHCI
+ select LM32_DEVICES
+
+config LM32_EVR
+ bool
+ select LM32_DEVICES
+ select PFLASH_CFI02
diff --git a/hw/lm32/meson.build b/hw/lm32/meson.build
index 8caf0a7..42d6f8d 100644
--- a/hw/lm32/meson.build
+++ b/hw/lm32/meson.build
@@ -1,6 +1,6 @@
lm32_ss = ss.source_set()
# LM32 boards
-lm32_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_boards.c'))
+lm32_ss.add(when: 'CONFIG_LM32_EVR', if_true: files('lm32_boards.c'))
lm32_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist.c'))
hw_arch += {'lm32': lm32_ss}
diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c
index 488d086..ca2f939 100644
--- a/hw/misc/mac_via.c
+++ b/hw/misc/mac_via.c
@@ -1098,7 +1098,7 @@ static void mac_via_init(Object *obj)
TYPE_ADB_BUS, DEVICE(obj), "adb.0");
}
-static void postload_update_cb(void *opaque, int running, RunState state)
+static void postload_update_cb(void *opaque, bool running, RunState state)
{
MacVIAState *m = MAC_VIA(opaque);
diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index 4b15db8..cae0055 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -127,7 +127,7 @@ npcm7xx_pwm_update_freq(const char *id, uint8_t index, uint32_t old_value, uint3
npcm7xx_pwm_update_duty(const char *id, uint8_t index, uint32_t old_value, uint32_t new_value) "%s pwm[%u] Update Duty: old_duty: %u, new_duty: %u"
# stm32f4xx_syscfg.c
-stm32f4xx_syscfg_set_irq(int gpio, int line, int level) "Interupt: GPIO: %d, Line: %d; Level: %d"
+stm32f4xx_syscfg_set_irq(int gpio, int line, int level) "Interrupt: GPIO: %d, Line: %d; Level: %d"
stm32f4xx_pulse_exti(int irq) "Pulse EXTI: %d"
stm32f4xx_syscfg_read(uint64_t addr) "reg read: addr: 0x%" PRIx64 " "
stm32f4xx_syscfg_write(uint64_t addr, uint64_t data) "reg write: addr: 0x%" PRIx64 " val: 0x%" PRIx64 ""
diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c
index 0427689..bf91803 100644
--- a/hw/net/allwinner-sun8i-emac.c
+++ b/hw/net/allwinner-sun8i-emac.c
@@ -579,7 +579,7 @@ static uint64_t allwinner_sun8i_emac_read(void *opaque, hwaddr offset,
case REG_INT_STA: /* Interrupt Status */
value = s->int_sta;
break;
- case REG_INT_EN: /* Interupt Enable */
+ case REG_INT_EN: /* Interrupt Enable */
value = s->int_en;
break;
case REG_TX_CTL_0: /* Transmit Control 0 */
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 4dcb92d..b75f2ab 100644
--- a/hw/net/e1000e_core.c
+++ b/hw/net/e1000e_core.c
@@ -3298,7 +3298,7 @@ e1000e_autoneg_resume(E1000ECore *core)
}
static void
-e1000e_vm_state_change(void *opaque, int running, RunState state)
+e1000e_vm_state_change(void *opaque, bool running, RunState state)
{
E1000ECore *core = opaque;
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 9e51bc8..01f7752 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -217,7 +217,7 @@ static int spapr_nvram_pre_load(void *opaque)
return 0;
}
-static void postload_update_cb(void *opaque, int running, RunState state)
+static void postload_update_cb(void *opaque, bool running, RunState state)
{
SpaprNvram *nvram = opaque;
diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c
index b9bf573..75a22ce 100644
--- a/hw/ppc/pnv_bmc.c
+++ b/hw/ppc/pnv_bmc.c
@@ -233,7 +233,7 @@ static void hiomap_cmd(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len,
case HIOMAP_C_RESET:
case HIOMAP_C_LOCK:
default:
- qemu_log_mask(LOG_GUEST_ERROR, "HIOMAP: unknow command %02X\n", cmd[2]);
+ qemu_log_mask(LOG_GUEST_ERROR, "HIOMAP: unknown command %02X\n", cmd[2]);
break;
}
}
diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
index e9ae156..be7018e 100644
--- a/hw/ppc/pnv_xscom.c
+++ b/hw/ppc/pnv_xscom.c
@@ -308,7 +308,7 @@ void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset, MemoryRegion *mr)
}
void pnv_xscom_region_init(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index 5cbbff1..bf28d6b 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -1059,7 +1059,7 @@ static void timebase_load(PPCTimebase *tb)
}
}
-void cpu_ppc_clock_vm_state_change(void *opaque, int running,
+void cpu_ppc_clock_vm_state_change(void *opaque, bool running,
RunState state)
{
PPCTimebase *tb = opaque;
diff --git a/hw/ppc/ppc_booke.c b/hw/ppc/ppc_booke.c
index 652a21b..974c0c8 100644
--- a/hw/ppc/ppc_booke.c
+++ b/hw/ppc/ppc_booke.c
@@ -317,7 +317,7 @@ static void ppc_booke_timer_reset_handle(void *opaque)
* action will be taken. To avoid this we always clear the watchdog state when
* state changes to running.
*/
-static void cpu_state_change_handler(void *opaque, int running, RunState state)
+static void cpu_state_change_handler(void *opaque, bool running, RunState state)
{
PowerPCCPU *cpu = opaque;
CPUPPCState *env = &cpu->env;
diff --git a/hw/s390x/tod-kvm.c b/hw/s390x/tod-kvm.c
index 6e21d83..0b94477 100644
--- a/hw/s390x/tod-kvm.c
+++ b/hw/s390x/tod-kvm.c
@@ -78,7 +78,7 @@ static void kvm_s390_tod_set(S390TODState *td, const S390TOD *tod, Error **errp)
}
}
-static void kvm_s390_tod_vm_state_change(void *opaque, int running,
+static void kvm_s390_tod_vm_state_change(void *opaque, bool running,
RunState state)
{
S390TODState *td = opaque;
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 2d674f9..2a0a98c 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -181,7 +181,7 @@ void scsi_req_retry(SCSIRequest *req)
req->retry = true;
}
-static void scsi_dma_restart_cb(void *opaque, int running, RunState state)
+static void scsi_dma_restart_cb(void *opaque, bool running, RunState state)
{
SCSIDevice *s = opaque;
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index bd7103c..2eaea7e 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2565,6 +2565,7 @@ static void scsi_disk_new_request_dump(uint32_t lun, uint32_t tag, uint8_t *buf)
int len = scsi_cdb_length(buf);
char *line_buffer, *p;
+ assert(len > 0 && len <= 16);
line_buffer = g_malloc(len * 5 + 1);
for (i = 0, p = line_buffer; i < len; i++) {
diff --git a/hw/timer/meson.build b/hw/timer/meson.build
index a429792..598d058 100644
--- a/hw/timer/meson.build
+++ b/hw/timer/meson.build
@@ -19,7 +19,7 @@ softmmu_ss.add(when: 'CONFIG_HPET', if_true: files('hpet.c'))
softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c'))
softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c'))
softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c'))
-softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_timer.c'))
+softmmu_ss.add(when: 'CONFIG_LM32_DEVICES', if_true: files('lm32_timer.c'))
softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-sysctl.c'))
softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c'))
softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 2d566f7..5c76bed 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -301,7 +301,7 @@ static void *event_thread(void *arg)
} else {
if (event->reader != card->reader) {
fprintf(stderr,
- "ERROR: wrong reader: quiting event_thread\n");
+ "ERROR: wrong reader: quitting event_thread\n");
break;
}
}
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 212eb05..f71af0a 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -2436,7 +2436,7 @@ static int usb_ehci_post_load(void *opaque, int version_id)
return 0;
}
-static void usb_ehci_vm_state_change(void *opaque, int running, RunState state)
+static void usb_ehci_vm_state_change(void *opaque, bool running, RunState state)
{
EHCIState *ehci = opaque;
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index f8c64c8..1cf2816 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1126,7 +1126,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
OHCI_SET_BM(td.flags, TD_EC, 3);
break;
}
- /* An error occured so we have to clear the interrupt counter. See
+ /* An error occurred so we have to clear the interrupt counter. See
* spec at 6.4.4 on page 104 */
ohci->done_count = 0;
}
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 354713a..2518306f 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1783,7 +1783,7 @@ type_init(usb_host_register_types)
static QEMUTimer *usb_auto_timer;
static VMChangeStateEntry *usb_vmstate;
-static void usb_host_vm_state(void *unused, int running, RunState state)
+static void usb_host_vm_state(void *unused, bool running, RunState state)
{
if (running) {
usb_host_auto_check(unused);
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 7e9e3fe..17f06f3 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1395,7 +1395,7 @@ static void usbredir_chardev_event(void *opaque, QEMUChrEvent event)
* init + destroy
*/
-static void usbredir_vm_state_change(void *priv, int running, RunState state)
+static void usbredir_vm_state_change(void *priv, bool running, RunState state)
{
USBRedirDevice *dev = priv;
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 00daa50..134bdcc 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -727,7 +727,7 @@ static SaveVMHandlers savevm_vfio_handlers = {
/* ---------------------------------------------------------------------- */
-static void vfio_vmstate_change(void *opaque, int running, RunState state)
+static void vfio_vmstate_change(void *opaque, bool running, RunState state)
{
VFIODevice *vbasedev = opaque;
VFIOMigration *migration = vbasedev->migration;
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 2a01662..e2163a0 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -909,7 +909,7 @@ check_dev_state:
r = 0;
}
if (r) {
- /* An error is occured. */
+ /* An error occurred. */
dev->log_enabled = false;
}
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 76ce937..cc8e9f7 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -133,7 +133,7 @@ static uint64_t get_features(VirtIODevice *vdev, uint64_t f, Error **errp)
return f;
}
-static void virtio_rng_vm_state_change(void *opaque, int running,
+static void virtio_rng_vm_state_change(void *opaque, bool running,
RunState state)
{
VirtIORNG *vrng = opaque;
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 1fd1917..07f4e60 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3208,7 +3208,7 @@ void virtio_cleanup(VirtIODevice *vdev)
qemu_del_vm_change_state_handler(vdev->vmstate);
}
-static void virtio_vmstate_change(void *opaque, int running, RunState state)
+static void virtio_vmstate_change(void *opaque, bool running, RunState state)
{
VirtIODevice *vdev = opaque;
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
diff --git a/include/exec/memory.h b/include/exec/memory.h
index c6fb714..54ccf1a 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -828,7 +828,7 @@ static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
* @size: size of the region; any subregions beyond this size will be clipped
*/
void memory_region_init(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size);
@@ -876,7 +876,7 @@ void memory_region_unref(MemoryRegion *mr);
* @size: size of the region.
*/
void memory_region_init_io(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
@@ -898,7 +898,7 @@ void memory_region_init_io(MemoryRegion *mr,
* RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_nomigrate(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp);
@@ -920,7 +920,7 @@ void memory_region_init_ram_nomigrate(MemoryRegion *mr,
* The only difference is part of the RAM region can be remapped.
*/
void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
bool share,
@@ -946,7 +946,7 @@ void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr,
* RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_resizeable_ram(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
uint64_t max_size,
@@ -979,7 +979,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
* RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_from_file(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
uint64_t align,
@@ -1005,7 +1005,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
* RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_from_fd(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
bool share,
@@ -1030,7 +1030,7 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr,
* RAM memory region to be migrated; that is the responsibility of the caller.
*/
void memory_region_init_ram_ptr(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
void *ptr);
@@ -1058,7 +1058,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
* (For RAM device memory regions, migrating the contents rarely makes sense.)
*/
void memory_region_init_ram_device_ptr(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
void *ptr);
@@ -1076,7 +1076,7 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr,
* @size: size of the region.
*/
void memory_region_init_alias(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
MemoryRegion *orig,
hwaddr offset,
@@ -1101,7 +1101,7 @@ void memory_region_init_alias(MemoryRegion *mr,
* @errp: pointer to Error*, to store an error if it happens.
*/
void memory_region_init_rom_nomigrate(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp);
@@ -1124,7 +1124,7 @@ void memory_region_init_rom_nomigrate(MemoryRegion *mr,
* @errp: pointer to Error*, to store an error if it happens.
*/
void memory_region_init_rom_device_nomigrate(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
@@ -1183,7 +1183,7 @@ void memory_region_init_iommu(void *_iommu_mr,
* If you pass a non-NULL non-device @owner then we will assert.
*/
void memory_region_init_ram(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp);
@@ -1210,7 +1210,7 @@ void memory_region_init_ram(MemoryRegion *mr,
* @errp: pointer to Error*, to store an error if it happens.
*/
void memory_region_init_rom(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp);
@@ -1241,7 +1241,7 @@ void memory_region_init_rom(MemoryRegion *mr,
* @errp: pointer to Error*, to store an error if it happens.
*/
void memory_region_init_rom_device(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
@@ -1254,7 +1254,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
*
* @mr: the memory region being queried.
*/
-struct Object *memory_region_owner(MemoryRegion *mr);
+Object *memory_region_owner(MemoryRegion *mr);
/**
* memory_region_size: get a memory region's size.
diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h
index 78409ab..6ee458e 100644
--- a/include/hw/elf_ops.h
+++ b/include/hw/elf_ops.h
@@ -417,7 +417,7 @@ static int glue(load_elf, SZ)(const char *name, int fd,
/*
* Since we want to be able to modify the mapped buffer, we set the
- * 'writeble' parameter to 'true'. Modifications to the buffer are not
+ * 'writable' parameter to 'true'. Modifications to the buffer are not
* written back to the file.
*/
mapped_file = g_mapped_file_new_from_fd(fd, true, NULL);
diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
index 8578f5a..2ff9f7a 100644
--- a/include/hw/ppc/pnv_xscom.h
+++ b/include/hw/ppc/pnv_xscom.h
@@ -139,7 +139,7 @@ int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset,
void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset,
MemoryRegion *mr);
void pnv_xscom_region_init(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h
index 08c869a..7901ab2 100644
--- a/include/hw/s390x/css.h
+++ b/include/hw/s390x/css.h
@@ -133,7 +133,7 @@ struct SubchDev {
bool ccw_fmt_1;
bool thinint_active;
uint8_t ccw_no_data_cnt;
- uint16_t migrated_schid; /* used for missmatch detection */
+ uint16_t migrated_schid; /* used for mismatch detection */
CcwDataStream cds;
/* transport-provided data: */
int (*ccw_cb) (SubchDev *, CCW1);
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 6546214..73bcf76 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -13,7 +13,7 @@
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
/* Copyright string for -version arguments, About dialogs, etc */
-#define QEMU_COPYRIGHT "Copyright (c) 2003-2020 " \
+#define QEMU_COPYRIGHT "Copyright (c) 2003-2021 " \
"Fabrice Bellard and the QEMU Project developers"
/* Bug reporting information for --help arguments, About dialogs, etc */
diff --git a/include/qemu/id.h b/include/qemu/id.h
index b55c406..46b759b 100644
--- a/include/qemu/id.h
+++ b/include/qemu/id.h
@@ -5,6 +5,7 @@ typedef enum IdSubSystems {
ID_QDEV,
ID_BLOCK,
ID_CHR,
+ ID_NET,
ID_MAX /* last element, used as array size */
} IdSubSystems;
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
index e557f47..a535691 100644
--- a/include/sysemu/runstate.h
+++ b/include/sysemu/runstate.h
@@ -6,11 +6,11 @@
bool runstate_check(RunState state);
void runstate_set(RunState new_state);
-int runstate_is_running(void);
+bool runstate_is_running(void);
bool runstate_needs_reset(void);
bool runstate_store(char *str, size_t size);
-typedef void VMChangeStateHandler(void *opaque, int running, RunState state);
+typedef void VMChangeStateHandler(void *opaque, bool running, RunState state);
VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
void *opaque);
@@ -20,7 +20,13 @@ VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev,
VMChangeStateHandler *cb,
void *opaque);
void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
-void vm_state_notify(int running, RunState state);
+/**
+ * vm_state_notify: Notify the state of the VM
+ *
+ * @running: whether the VM is running or not.
+ * @state: the #RunState of the VM.
+ */
+void vm_state_notify(bool running, RunState state);
static inline bool shutdown_caused_by_guest(ShutdownCause cause)
{
diff --git a/net/net.c b/net/net.c
index 6002ba5..9a2a4c9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -43,6 +43,7 @@
#include "qemu/cutils.h"
#include "qemu/config-file.h"
#include "qemu/ctype.h"
+#include "qemu/id.h"
#include "qemu/iov.h"
#include "qemu/qemu-print.h"
#include "qemu/main-loop.h"
@@ -1110,8 +1111,7 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp)
/* Create an ID for -net if the user did not specify one */
if (!is_netdev && !qemu_opts_id(opts)) {
- static int idx;
- qemu_opts_set_id(opts, g_strdup_printf("__org.qemu.net%i", idx++));
+ qemu_opts_set_id(opts, id_generate(ID_NET));
}
if (visit_type_Netdev(v, NULL, &object, errp)) {
@@ -1349,7 +1349,7 @@ void qmp_set_link(const char *name, bool up, Error **errp)
}
}
-static void net_vm_change_state_handler(void *opaque, int running,
+static void net_vm_change_state_handler(void *opaque, bool running,
RunState state)
{
NetClientState *nc;
@@ -1466,7 +1466,7 @@ static int net_param_nic(void *dummy, QemuOpts *opts, Error **errp)
/* Create an ID if the user did not specify one */
nd_id = g_strdup(qemu_opts_id(opts));
if (!nd_id) {
- nd_id = g_strdup_printf("__org.qemu.nic%i", idx);
+ nd_id = id_generate(ID_NET);
qemu_opts_set_id(opts, nd_id);
}
diff --git a/qemu-options.hx b/qemu-options.hx
index 9080128..622d3bf 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -176,7 +176,7 @@ SRST
``thread=single|multi``
Controls number of TCG threads. When the TCG is multi-threaded
- there will be one thread per vCPU therefor taking advantage of
+ there will be one thread per vCPU therefore taking advantage of
additional host cores. The default is to enable multi-threading
where both the back-end and front-ends support it and no
incompatible TCG features have been enabled (e.g.
@@ -2445,7 +2445,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
" use 'vhostfd=h' to connect to an already opened vhost net device\n"
" use 'vhostfds=x:y:...:z to connect to multiple already opened vhost net devices\n"
" use 'queues=n' to specify the number of queues to be created for multiqueue TAP\n"
- " use 'poll-us=n' to speciy the maximum number of microseconds that could be\n"
+ " use 'poll-us=n' to specify the maximum number of microseconds that could be\n"
" spent on busy polling for vhost net\n"
"-netdev bridge,id=str[,br=bridge][,helper=helper]\n"
" configure a host TAP network backend with ID 'str' that is\n"
@@ -4299,12 +4299,12 @@ DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
" use 'obsolete' to allow obsolete system calls that are provided\n" \
" by the kernel, but typically no longer used by modern\n" \
" C library implementations.\n" \
- " use 'elevateprivileges' to allow or deny QEMU process to elevate\n" \
- " its privileges by blacklisting all set*uid|gid system calls.\n" \
+ " use 'elevateprivileges' to allow or deny the QEMU process ability\n" \
+ " to elevate privileges using set*uid|gid system calls.\n" \
" The value 'children' will deny set*uid|gid system calls for\n" \
" main QEMU process but will allow forks and execves to run unprivileged\n" \
" use 'spawn' to avoid QEMU to spawn new threads or processes by\n" \
- " blacklisting *fork and execve\n" \
+ " blocking *fork and execve\n" \
" use 'resourcecontrol' to disable process affinity and schedular priority\n",
QEMU_ARCH_ALL)
SRST
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 96b1cd6..5bc94d9 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -100,7 +100,7 @@ def validate_type(name):
if bit == "const":
continue
if bit not in ALLOWED_TYPES:
- raise ValueError("Argument type '%s' is not in whitelist. "
+ raise ValueError("Argument type '%s' is not allowed. "
"Only standard C types and fixed size integer "
"types should be used. struct, union, and "
"other complex pointer types should be "
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 874a8fc..9db47b7 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -1581,7 +1581,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
#ifdef CONFIG_POSIX
void memory_region_init_ram_from_file(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
uint64_t align,
@@ -1607,7 +1607,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
}
void memory_region_init_ram_from_fd(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
bool share,
@@ -1679,7 +1679,7 @@ void memory_region_init_alias(MemoryRegion *mr,
}
void memory_region_init_rom_nomigrate(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp)
@@ -2679,7 +2679,7 @@ static void memory_global_dirty_log_do_stop(void)
MEMORY_LISTENER_CALL_GLOBAL(log_global_stop, Reverse);
}
-static void memory_vm_change_state_handler(void *opaque, int running,
+static void memory_vm_change_state_handler(void *opaque, bool running,
RunState state)
{
if (running) {
@@ -3205,7 +3205,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
}
void memory_region_init_ram(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp)
@@ -3229,7 +3229,7 @@ void memory_region_init_ram(MemoryRegion *mr,
}
void memory_region_init_rom(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const char *name,
uint64_t size,
Error **errp)
@@ -3253,7 +3253,7 @@ void memory_region_init_rom(MemoryRegion *mr,
}
void memory_region_init_rom_device(MemoryRegion *mr,
- struct Object *owner,
+ Object *owner,
const MemoryRegionOps *ops,
void *opaque,
const char *name,
diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
index 377ef69..9c29d9c 100644
--- a/softmmu/qemu-seccomp.c
+++ b/softmmu/qemu-seccomp.c
@@ -45,8 +45,8 @@ const struct scmp_arg_cmp sched_setscheduler_arg[] = {
{ .arg = 1, .op = SCMP_CMP_NE, .datum_a = SCHED_IDLE }
};
-static const struct QemuSeccompSyscall blacklist[] = {
- /* default set of syscalls to blacklist */
+static const struct QemuSeccompSyscall denylist[] = {
+ /* default set of syscalls that should get blocked */
{ SCMP_SYS(reboot), QEMU_SECCOMP_SET_DEFAULT },
{ SCMP_SYS(swapon), QEMU_SECCOMP_SET_DEFAULT },
{ SCMP_SYS(swapoff), QEMU_SECCOMP_SET_DEFAULT },
@@ -175,18 +175,18 @@ static int seccomp_start(uint32_t seccomp_opts, Error **errp)
goto seccomp_return;
}
- for (i = 0; i < ARRAY_SIZE(blacklist); i++) {
+ for (i = 0; i < ARRAY_SIZE(denylist); i++) {
uint32_t action;
- if (!(seccomp_opts & blacklist[i].set)) {
+ if (!(seccomp_opts & denylist[i].set)) {
continue;
}
- action = qemu_seccomp_get_action(blacklist[i].set);
- rc = seccomp_rule_add_array(ctx, action, blacklist[i].num,
- blacklist[i].narg, blacklist[i].arg_cmp);
+ action = qemu_seccomp_get_action(denylist[i].set);
+ rc = seccomp_rule_add_array(ctx, action, denylist[i].num,
+ denylist[i].narg, denylist[i].arg_cmp);
if (rc < 0) {
error_setg_errno(errp, -rc,
- "failed to add seccomp blacklist rules");
+ "failed to add seccomp denylist rules");
goto seccomp_return;
}
}
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index 2874417..ce8977c 100644
--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -218,7 +218,7 @@ void runstate_set(RunState new_state)
current_run_state = new_state;
}
-int runstate_is_running(void)
+bool runstate_is_running(void)
{
return runstate_check(RUN_STATE_RUNNING);
}
@@ -317,7 +317,7 @@ void qemu_del_vm_change_state_handler(VMChangeStateEntry *e)
g_free(e);
}
-void vm_state_notify(int running, RunState state)
+void vm_state_notify(bool running, RunState state)
{
VMChangeStateEntry *e, *next;
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 00e124c..bebea90 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -844,7 +844,7 @@ MemTxAttrs kvm_arch_post_run(CPUState *cs, struct kvm_run *run)
return MEMTXATTRS_UNSPECIFIED;
}
-void kvm_arm_vm_state_change(void *opaque, int running, RunState state)
+void kvm_arm_vm_state_change(void *opaque, bool running, RunState state)
{
CPUState *cs = opaque;
ARMCPU *cpu = ARM_CPU(cs);
diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
index eb81b70..68ec970 100644
--- a/target/arm/kvm_arm.h
+++ b/target/arm/kvm_arm.h
@@ -352,7 +352,7 @@ void kvm_arm_get_virtual_time(CPUState *cs);
*/
void kvm_arm_put_virtual_time(CPUState *cs);
-void kvm_arm_vm_state_change(void *opaque, int running, RunState state);
+void kvm_arm_vm_state_change(void *opaque, bool running, RunState state);
int kvm_arm_vgic_probe(void);
diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py
index fe4d8e5..db9f663 100755
--- a/target/hexagon/gen_tcg_funcs.py
+++ b/target/hexagon/gen_tcg_funcs.py
@@ -35,7 +35,7 @@ def gen_decl_ea_tcg(f, tag):
def gen_free_ea_tcg(f):
f.write(" tcg_temp_free(EA);\n")
-def genptr_decl_pair_writeble(f, tag, regtype, regid, regno):
+def genptr_decl_pair_writable(f, tag, regtype, regid, regno):
regN="%s%sN" % (regtype,regid)
f.write(" TCGv_i64 %s%sV = tcg_temp_local_new_i64();\n" % \
(regtype, regid))
@@ -54,7 +54,7 @@ def genptr_decl_pair_writeble(f, tag, regtype, regid, regno):
(regN, regN))
f.write(" }\n")
-def genptr_decl_writeble(f, tag, regtype, regid, regno):
+def genptr_decl_writable(f, tag, regtype, regid, regno):
regN="%s%sN" % (regtype,regid)
f.write(" TCGv %s%sV = tcg_temp_local_new();\n" % \
(regtype, regid))
@@ -78,12 +78,12 @@ def genptr_decl(f, tag, regtype, regid, regno):
f.write(" const int %s = insn->regno[%d];\n" % \
(regN, regno))
elif (regid in {"dd", "ee", "xx", "yy"}):
- genptr_decl_pair_writeble(f, tag, regtype, regid, regno)
+ genptr_decl_pair_writable(f, tag, regtype, regid, regno)
elif (regid in {"s", "t", "u", "v"}):
f.write(" TCGv %s%sV = hex_gpr[insn->regno[%d]];\n" % \
(regtype, regid, regno))
elif (regid in {"d", "e", "x", "y"}):
- genptr_decl_writeble(f, tag, regtype, regid, regno)
+ genptr_decl_writable(f, tag, regtype, regid, regno)
else:
print("Bad register parse: ", regtype, regid)
elif (regtype == "P"):
@@ -91,7 +91,7 @@ def genptr_decl(f, tag, regtype, regid, regno):
f.write(" TCGv %s%sV = hex_pred[insn->regno[%d]];\n" % \
(regtype, regid, regno))
elif (regid in {"d", "e", "x"}):
- genptr_decl_writeble(f, tag, regtype, regid, regno)
+ genptr_decl_writable(f, tag, regtype, regid, regno)
else:
print("Bad register parse: ", regtype, regid)
elif (regtype == "C"):
@@ -101,14 +101,14 @@ def genptr_decl(f, tag, regtype, regid, regno):
f.write(" const int %s = insn->regno[%d] + HEX_REG_SA0;\n" % \
(regN, regno))
elif (regid == "dd"):
- genptr_decl_pair_writeble(f, tag, regtype, regid, regno)
+ genptr_decl_pair_writable(f, tag, regtype, regid, regno)
elif (regid == "s"):
f.write(" TCGv %s%sV = tcg_temp_local_new();\n" % \
(regtype, regid))
f.write(" const int %s%sN = insn->regno[%d] + HEX_REG_SA0;\n" % \
(regtype, regid, regno))
elif (regid == "d"):
- genptr_decl_writeble(f, tag, regtype, regid, regno)
+ genptr_decl_writable(f, tag, regtype, regid, regno)
else:
print("Bad register parse: ", regtype, regid)
elif (regtype == "M"):
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 5000843..ae9fd9f 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -7081,7 +7081,7 @@ static void x86_cpu_get_crash_info_qom(Object *obj, Visitor *v,
GuestPanicInformation *panic_info;
if (!cs->crash_occurred) {
- error_setg(errp, "No crash occured");
+ error_setg(errp, "No crash occurred");
return;
}
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index c8d61da..7fe9f52 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -693,7 +693,7 @@ static int kvm_inject_mce_oldstyle(X86CPU *cpu)
return 0;
}
-static void cpu_update_state(void *opaque, int running, RunState state)
+static void cpu_update_state(void *opaque, bool running, RunState state)
{
CPUX86State *env = opaque;
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 3768a75..3967dfc 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -1173,7 +1173,7 @@ static int nested_state_post_load(void *opaque, int version_id)
return -EINVAL;
}
if (nested_state->size > max_nested_state_len) {
- error_report("Recieved unsupported nested state size: "
+ error_report("Received unsupported nested state size: "
"nested_state->size=%d, max=%d",
nested_state->size, max_nested_state_len);
return -EINVAL;
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 0f414df..72b9e2a 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -691,7 +691,7 @@ sev_launch_finish(SevGuestState *sev)
}
static void
-sev_vm_state_change(void *opaque, int running, RunState state)
+sev_vm_state_change(void *opaque, bool running, RunState state)
{
SevGuestState *sev = opaque;
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index f0a35df..f832f28 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -1318,7 +1318,7 @@ void whpx_cpu_synchronize_pre_loadvm(CPUState *cpu)
static Error *whpx_migration_blocker;
-static void whpx_cpu_update_state(void *opaque, int running, RunState state)
+static void whpx_cpu_update_state(void *opaque, bool running, RunState state)
{
CPUX86State *env = opaque;
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 730cdf7..9b0698f 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -117,7 +117,7 @@ static const char *m68k_exception_name(int index)
case EXCP_FORMAT:
return "Format Error";
case EXCP_UNINITIALIZED:
- return "Unitialized Interruot";
+ return "Uninitialized Interrupt";
case EXCP_SPURIOUS:
return "Spurious Interrupt";
case EXCP_INT_LEVEL_1:
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index 123ec1b..086debd 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -38,7 +38,7 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[] = {
KVM_CAP_LAST_INFO
};
-static void kvm_mips_update_state(void *opaque, int running, RunState state);
+static void kvm_mips_update_state(void *opaque, bool running, RunState state);
unsigned long kvm_arch_vcpu_id(CPUState *cs)
{
@@ -553,7 +553,7 @@ static int kvm_mips_restore_count(CPUState *cs)
/*
* Handle the VM clock being started or stopped
*/
-static void kvm_mips_update_state(void *opaque, int running, RunState state)
+static void kvm_mips_update_state(void *opaque, bool running, RunState state)
{
CPUState *cs = opaque;
int ret;
diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index 63b9e86..118baf8 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -218,7 +218,7 @@ extern const VMStateDescription vmstate_ppc_timebase;
.offset = vmstate_offset_value(_state, _field, PPCTimebase), \
}
-void cpu_ppc_clock_vm_state_change(void *opaque, int running,
+void cpu_ppc_clock_vm_state_change(void *opaque, bool running,
RunState state);
#endif
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index ddea8fb..2a990f6 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -506,7 +506,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
return;
}
} else {
- qemu_log("vector verison is not specified, "
+ qemu_log("vector version is not specified, "
"use the default value v0.7.1\n");
}
set_vext_version(env, vext_version);
diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c
index 06ffebd..5a4cad8 100644
--- a/tests/fp/fp-test.c
+++ b/tests/fp/fp-test.c
@@ -123,7 +123,7 @@ static void not_implemented(void)
fprintf(stderr, "Not implemented.\n");
}
-static bool blacklisted(unsigned op, int rmode)
+static bool is_allowed(unsigned op, int rmode)
{
/* odd has not been implemented for any 80-bit ops */
if (rmode == softfloat_round_odd) {
@@ -161,10 +161,10 @@ static bool blacklisted(unsigned op, int rmode)
case F32_TO_EXTF80:
case F64_TO_EXTF80:
case F128_TO_EXTF80:
- return true;
+ return false;
}
}
- return false;
+ return true;
}
static void do_testfloat(int op, int rmode, bool exact)
@@ -194,7 +194,7 @@ static void do_testfloat(int op, int rmode, bool exact)
verCases_writeFunctionName(stderr);
fputs("\n", stderr);
- if (blacklisted(op, rmode)) {
+ if (!is_allowed(op, rmode)) {
not_implemented();
return;
}
diff --git a/tests/qtest/fuzz-test.c b/tests/qtest/fuzz-test.c
index cdb1100..6f161c9 100644
--- a/tests/qtest/fuzz-test.c
+++ b/tests/qtest/fuzz-test.c
@@ -39,8 +39,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void)
QTestState *s;
s = qtest_init("-M pc-q35-5.0 "
- "-nographic -monitor none -serial none "
- "-d guest_errors -trace pci*");
+ "-nographic -monitor none -serial none");
qtest_outl(s, 0xcf8, 0x8400f841);
qtest_outl(s, 0xcfc, 0xebed205d);
diff --git a/ui/console.c b/ui/console.c
index 171a7bf..c2fdf97 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1724,7 +1724,7 @@ bool dpy_gfx_check_format(QemuConsole *con,
return false;
}
} else {
- /* default is to whitelist native 32 bpp only */
+ /* default is to allow native 32 bpp only */
if (format != qemu_default_pixman_format(32, true)) {
return false;
}
diff --git a/ui/gtk.c b/ui/gtk.c
index 3edaf04..916056d 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -683,7 +683,7 @@ static const DisplayChangeListenerOps dcl_egl_ops = {
/** QEMU Events **/
-static void gd_change_runstate(void *opaque, int running, RunState state)
+static void gd_change_runstate(void *opaque, bool running, RunState state)
{
GtkDisplayState *s = opaque;
diff --git a/ui/spice-core.c b/ui/spice-core.c
index beee932..cadec76 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -615,7 +615,7 @@ static int add_channel(void *opaque, const char *name, const char *value,
return 0;
}
-static void vm_change_state_handler(void *opaque, int running,
+static void vm_change_state_handler(void *opaque, bool running,
RunState state)
{
if (running) {
diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
index f67111a..df7dc08 100644
--- a/ui/vnc-auth-sasl.c
+++ b/ui/vnc-auth-sasl.c
@@ -288,7 +288,7 @@ static int protocol_client_auth_sasl_step(VncState *vs, uint8_t *data, size_t le
goto authreject;
}
- /* Check username whitelist ACL */
+ /* Check the username access control list */
if (vnc_auth_sasl_check_access(vs) < 0) {
goto authreject;
}
@@ -409,7 +409,7 @@ static int protocol_client_auth_sasl_start(VncState *vs, uint8_t *data, size_t l
goto authreject;
}
- /* Check username whitelist ACL */
+ /* Check the username access control list */
if (vnc_auth_sasl_check_access(vs) < 0) {
goto authreject;
}
diff --git a/util/id.c b/util/id.c
index 5addb44..ded41c5 100644
--- a/util/id.c
+++ b/util/id.c
@@ -35,6 +35,7 @@ static const char *const id_subsys_str[ID_MAX] = {
[ID_QDEV] = "qdev",
[ID_BLOCK] = "block",
[ID_CHR] = "chr",
+ [ID_NET] = "net",
};
/*