mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
spapr: allocate the interrupt thread context under the CPU core
Each interrupt mode has its own specific interrupt presenter object, that we store under the CPU object, one for XICS and one for XIVE. Extend the sPAPR IRQ backend with a new handler to support them both. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6e21de4a50
commit
1a937ad7e7
5 changed files with 42 additions and 3 deletions
|
@ -528,6 +528,28 @@ static const TypeInfo xive_tctx_info = {
|
|||
.class_init = xive_tctx_class_init,
|
||||
};
|
||||
|
||||
Object *xive_tctx_create(Object *cpu, XiveRouter *xrtr, Error **errp)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
Object *obj;
|
||||
|
||||
obj = object_new(TYPE_XIVE_TCTX);
|
||||
object_property_add_child(cpu, TYPE_XIVE_TCTX, obj, &error_abort);
|
||||
object_unref(obj);
|
||||
object_property_add_const_link(obj, "cpu", cpu, &error_abort);
|
||||
object_property_set_bool(obj, true, "realized", &local_err);
|
||||
if (local_err) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
||||
error:
|
||||
object_unparent(obj);
|
||||
error_propagate(errp, local_err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* XIVE ESB helpers
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue