From: Philippe Mathieu-Daudé Date: Mon, 30 Jun 2025 13:33:25 +0000 (+0200) Subject: accel: Remove unused MachineState argument of AccelClass::setup_post() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e9fb43d30c0526e164bebaab387b615edfa79ad;p=thirdparty%2Fqemu.git accel: Remove unused MachineState argument of AccelClass::setup_post() This method only accesses xen_domid/xen_domid_restrict, which are both related to the 'accelerator', not the machine. Besides, xen_domid aims to be in Xen AccelState and xen_domid_restrict a xen_domid_restrict QOM property. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250703173248.44995-36-philmd@linaro.org> --- diff --git a/accel/accel-system.c b/accel/accel-system.c index 913b7155d7..af713cc902 100644 --- a/accel/accel-system.c +++ b/accel/accel-system.c @@ -58,7 +58,7 @@ void accel_setup_post(MachineState *ms) AccelState *accel = ms->accelerator; AccelClass *acc = ACCEL_GET_CLASS(accel); if (acc->setup_post) { - acc->setup_post(ms, accel); + acc->setup_post(accel); } } diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 8279746f11..bd0ff64bef 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -64,7 +64,7 @@ static void xen_set_igd_gfx_passthru(Object *obj, bool value, Error **errp) xen_igd_gfx_pt_set(value, errp); } -static void xen_setup_post(MachineState *ms, AccelState *accel) +static void xen_setup_post(AccelState *as) { int rc; diff --git a/include/qemu/accel.h b/include/qemu/accel.h index f327a71282..a6a95ff0bc 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -45,7 +45,7 @@ typedef struct AccelClass { void (*cpu_common_unrealize)(CPUState *cpu); /* system related hooks */ - void (*setup_post)(MachineState *ms, AccelState *accel); + void (*setup_post)(AccelState *as); bool (*has_memory)(AccelState *accel, AddressSpace *as, hwaddr start_addr, hwaddr size);