mirror of https://github.com/xqemu/xqemu.git
AccelClass: Introduce accel_setup_post
This is called just before os_setup_post. Currently none of the accelerators provide this hook, but the Xen one is going to provide one in a moment. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
5ac067a24a
commit
7a64c17f3b
|
@ -126,6 +126,15 @@ void accel_register_compat_props(AccelState *accel)
|
||||||
register_compat_props_array(class->global_props);
|
register_compat_props_array(class->global_props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void register_accel_types(void)
|
static void register_accel_types(void)
|
||||||
{
|
{
|
||||||
type_register_static(&accel_type);
|
type_register_static(&accel_type);
|
||||||
|
|
|
@ -40,6 +40,7 @@ typedef struct AccelClass {
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*available)(void);
|
int (*available)(void);
|
||||||
int (*init_machine)(MachineState *ms);
|
int (*init_machine)(MachineState *ms);
|
||||||
|
void (*setup_post)(MachineState *ms, AccelState *accel);
|
||||||
bool *allowed;
|
bool *allowed;
|
||||||
/*
|
/*
|
||||||
* Array of global properties that would be applied when specific
|
* Array of global properties that would be applied when specific
|
||||||
|
@ -68,5 +69,7 @@ extern unsigned long tcg_tb_size;
|
||||||
void configure_accelerator(MachineState *ms);
|
void configure_accelerator(MachineState *ms);
|
||||||
/* Register accelerator specific global properties */
|
/* Register accelerator specific global properties */
|
||||||
void accel_register_compat_props(AccelState *accel);
|
void accel_register_compat_props(AccelState *accel);
|
||||||
|
/* Called just before os_setup_post (ie just before drop OS privs) */
|
||||||
|
void accel_setup_post(MachineState *ms);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue