The plugin API allows registration of callbacks for a variety of VCPU related events, such as VCPU reset, idle and resume. In addition to those events, we recently defined discontinuity events, which include traps. This change introduces a function to register callbacks for these events. We define one distinct plugin event type for each type of discontinuity, granting fine control to plugins in term of which events they receive. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Julian Ganz <neither@nut.email> Message-ID: <20251027110344.2289945-9-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
29 lines
781 B
C
29 lines
781 B
C
/*
|
|
* Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
|
|
*
|
|
* License: GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef QEMU_PLUGIN_EVENT_H
|
|
#define QEMU_PLUGIN_EVENT_H
|
|
|
|
/*
|
|
* Events that plugins can subscribe to.
|
|
*/
|
|
enum qemu_plugin_event {
|
|
QEMU_PLUGIN_EV_VCPU_INIT,
|
|
QEMU_PLUGIN_EV_VCPU_EXIT,
|
|
QEMU_PLUGIN_EV_VCPU_TB_TRANS,
|
|
QEMU_PLUGIN_EV_VCPU_IDLE,
|
|
QEMU_PLUGIN_EV_VCPU_RESUME,
|
|
QEMU_PLUGIN_EV_VCPU_SYSCALL,
|
|
QEMU_PLUGIN_EV_VCPU_SYSCALL_RET,
|
|
QEMU_PLUGIN_EV_FLUSH,
|
|
QEMU_PLUGIN_EV_ATEXIT,
|
|
QEMU_PLUGIN_EV_VCPU_INTERRUPT,
|
|
QEMU_PLUGIN_EV_VCPU_EXCEPTION,
|
|
QEMU_PLUGIN_EV_VCPU_HOSTCALL,
|
|
QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */
|
|
};
|
|
|
|
#endif /* QEMU_PLUGIN_EVENT_H */
|