mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ppc/xive: Add support for PQ state bits offload
The trigger message coming from a HW source contains a special bit informing the XIVE interrupt controller that the PQ bits have been checked at the source or not. Depending on the value, the IC can perform the check and the state transition locally using its own PQ state bits. The following changes add new accessors to the XiveRouter required to query and update the PQ state bits. This only applies to the PowerNV machine. sPAPR accessors are provided but the pSeries machine should not be concerned by such complex configuration for the moment. Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
aadf13abaa
commit
0aa2612a01
9 changed files with 199 additions and 21 deletions
|
@ -480,6 +480,29 @@ static uint8_t spapr_xive_get_block_id(XiveRouter *xrtr)
|
|||
return SPAPR_XIVE_BLOCK_ID;
|
||||
}
|
||||
|
||||
static int spapr_xive_get_pq(XiveRouter *xrtr, uint8_t blk, uint32_t idx,
|
||||
uint8_t *pq)
|
||||
{
|
||||
SpaprXive *xive = SPAPR_XIVE(xrtr);
|
||||
|
||||
assert(SPAPR_XIVE_BLOCK_ID == blk);
|
||||
|
||||
*pq = xive_source_esb_get(&xive->source, idx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spapr_xive_set_pq(XiveRouter *xrtr, uint8_t blk, uint32_t idx,
|
||||
uint8_t *pq)
|
||||
{
|
||||
SpaprXive *xive = SPAPR_XIVE(xrtr);
|
||||
|
||||
assert(SPAPR_XIVE_BLOCK_ID == blk);
|
||||
|
||||
*pq = xive_source_esb_set(&xive->source, idx, *pq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const VMStateDescription vmstate_spapr_xive_end = {
|
||||
.name = TYPE_SPAPR_XIVE "/end",
|
||||
.version_id = 1,
|
||||
|
@ -788,6 +811,8 @@ static void spapr_xive_class_init(ObjectClass *klass, void *data)
|
|||
dc->vmsd = &vmstate_spapr_xive;
|
||||
|
||||
xrc->get_eas = spapr_xive_get_eas;
|
||||
xrc->get_pq = spapr_xive_get_pq;
|
||||
xrc->set_pq = spapr_xive_set_pq;
|
||||
xrc->get_end = spapr_xive_get_end;
|
||||
xrc->write_end = spapr_xive_write_end;
|
||||
xrc->get_nvt = spapr_xive_get_nvt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue