mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -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
|
@ -653,7 +653,7 @@ static const TypeInfo pnv_psi_power8_info = {
|
|||
#define PSIHB10_ESB_CI_BASE PSIHB9_ESB_CI_BASE
|
||||
#define PSIHB10_ESB_CI_64K PPC_BIT(1)
|
||||
|
||||
static void pnv_psi_notify(XiveNotifier *xf, uint32_t srcno)
|
||||
static void pnv_psi_notify(XiveNotifier *xf, uint32_t srcno, bool pq_checked)
|
||||
{
|
||||
PnvPsi *psi = PNV_PSI(xf);
|
||||
uint64_t notif_port = psi->regs[PSIHB_REG(PSIHB9_ESB_NOTIF_ADDR)];
|
||||
|
@ -662,9 +662,13 @@ static void pnv_psi_notify(XiveNotifier *xf, uint32_t srcno)
|
|||
|
||||
uint32_t offset =
|
||||
(psi->regs[PSIHB_REG(PSIHB9_IVT_OFFSET)] >> PSIHB9_IVT_OFF_SHIFT);
|
||||
uint64_t data = XIVE_TRIGGER_PQ | offset | srcno;
|
||||
uint64_t data = offset | srcno;
|
||||
MemTxResult result;
|
||||
|
||||
if (pq_checked) {
|
||||
data |= XIVE_TRIGGER_PQ;
|
||||
}
|
||||
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue