Files
qemu/include/accel/accel-ops.h
Philippe Mathieu-Daudé 8c60f7f38e accel: Have each implementation return their AccelGdbConfig
Hold the per-accelerator AccelGdbConfig in AccelState, set its
single @sstep_flags field in AccelClass::init_machine handlers.

Remove the AccelClass::gdbstub_supported_sstep_flags() getter
and inline the single accel_supported_gdbstub_sstep_flags() call
in gdb_init_gdbserver_state().

Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260705215729.62196-15-philmd@oss.qualcomm.com>
2026-07-06 15:42:18 +02:00

53 lines
1.5 KiB
C

/*
* Accelerator handlers
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef ACCEL_OPS_H
#define ACCEL_OPS_H
#include "exec/hwaddr.h"
#include "qemu/accel.h"
#include "qom/object.h"
struct AccelState {
Object parent_obj;
AccelGdbConfig gdbstub;
};
struct AccelClass {
ObjectClass parent_class;
const char *name;
/* Cached by accel_init_ops_interfaces() when created */
AccelOpsClass *ops;
int (*init_machine)(AccelState *as, MachineState *ms);
/* used mainly by confidential guests to rebuild guest state upon reset */
int (*rebuild_guest)(MachineState *ms);
bool (*cpu_common_realize)(CPUState *cpu, Error **errp);
void (*cpu_common_unrealize)(CPUState *cpu);
/* get_stats: Append statistics to @buf */
void (*get_stats)(AccelState *as, GString *buf);
/* system related hooks */
void (*setup_post)(AccelState *as);
void (*pre_resume_vm)(AccelState *as, bool step_pending);
bool (*has_memory)(AccelState *accel, AddressSpace *as,
hwaddr start_addr, hwaddr size);
bool *allowed;
/*
* Array of global properties that would be applied when specific
* accelerator is chosen. It works like MachineClass.compat_props
* but it's for accelerators not machines. Accelerator-provided
* global properties may be overridden by machine-type
* compat_props or user-provided global properties.
*/
GPtrArray *compat_props;
};
#endif /* ACCEL_OPS_H */