diff options
author | Cédric Le Goater <clg@kaod.org> | 2022-03-02 06:51:39 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-03-02 06:51:39 +0100 |
commit | 0aa2612a01f233a4a25fb89e8362baf6cf896be6 (patch) | |
tree | 843c92a177ce54f209f8f069fa35aa3405d5f938 /hw/ppc/pnv_psi.c | |
parent | aadf13abaad43dd1f8b6113e516649578af63775 (diff) | |
download | qemu-0aa2612a01f233a4a25fb89e8362baf6cf896be6.zip qemu-0aa2612a01f233a4a25fb89e8362baf6cf896be6.tar.gz qemu-0aa2612a01f233a4a25fb89e8362baf6cf896be6.tar.bz2 |
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>
Diffstat (limited to 'hw/ppc/pnv_psi.c')
-rw-r--r-- | hw/ppc/pnv_psi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 7374860..466fb79 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -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; } |