sysemu: Let VMChangeStateHandler take boolean 'running' argument

The 'running' argument from VMChangeStateHandler does not require
other value than 0 / 1. Make it a plain boolean.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20210111152020.1422021-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Philippe Mathieu-Daudé
2021-03-09 23:13:57 +01:00
committed by Laurent Vivier
parent 0a38950931
commit 538f049704
41 changed files with 49 additions and 43 deletions
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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());
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;

Some files were not shown because too many files have changed in this diff Show More