aboutsummaryrefslogtreecommitdiff
path: root/plugins/core.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-03-14 14:09:33 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-04-30 16:12:05 -0700
commitaff56de576c949880d674d37b82bdc97841107fb (patch)
tree4f1feaef020cbec695caf0c79d5f079c736cc8fe /plugins/core.c
parent25875fe92eb55e905655dcdf5f06f89ef2c1f404 (diff)
plugins: Move function pointer in qemu_plugin_dyn_cb
The out-of-line function pointer is mutually exclusive with inline expansion, so move it into the union. Wrap the pointer in a structure named 'regular' to match PLUGIN_CB_REGULAR. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'plugins/core.c')
-rw-r--r--plugins/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/core.c b/plugins/core.c
index 4487cb7c48..837c373690 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -342,7 +342,7 @@ void plugin_register_dyn_cb__udata(GArray **arr,
dyn_cb->userp = udata;
/* Note flags are discarded as unused. */
- dyn_cb->f.vcpu_udata = cb;
+ dyn_cb->regular.f.vcpu_udata = cb;
dyn_cb->type = PLUGIN_CB_REGULAR;
}
@@ -359,7 +359,7 @@ void plugin_register_vcpu_mem_cb(GArray **arr,
/* Note flags are discarded as unused. */
dyn_cb->type = PLUGIN_CB_REGULAR;
dyn_cb->rw = rw;
- dyn_cb->f.generic = cb;
+ dyn_cb->regular.f.vcpu_mem = cb;
}
/*
@@ -511,8 +511,8 @@ void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr,
}
switch (cb->type) {
case PLUGIN_CB_REGULAR:
- cb->f.vcpu_mem(cpu->cpu_index, make_plugin_meminfo(oi, rw),
- vaddr, cb->userp);
+ cb->regular.f.vcpu_mem(cpu->cpu_index, make_plugin_meminfo(oi, rw),
+ vaddr, cb->userp);
break;
case PLUGIN_CB_INLINE:
exec_inline_op(cb, cpu->cpu_index);