[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/28] ppc/pnv: Use address_space_stq_be() when triggering an inte
From: |
David Gibson |
Subject: |
[PULL 05/28] ppc/pnv: Use address_space_stq_be() when triggering an interrupt from PSI |
Date: |
Thu, 24 Oct 2019 19:17:50 +1100 |
From: Cédric Le Goater <address@hidden>
Include the XIVE_TRIGGER_PQ bit in the trigger data which is how
hardware signals to the IC that the PQ bits of the interrupt source
have been checked.
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/pnv_psi.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index a997f16bb4..68d0dfacfe 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -660,10 +660,19 @@ 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 lisn = cpu_to_be64(offset + srcno);
+ uint64_t data = XIVE_TRIGGER_PQ | offset | srcno;
+ MemTxResult result;
- if (valid) {
- cpu_physical_memory_write(notify_addr, &lisn, sizeof(lisn));
+ if (!valid) {
+ return;
+ }
+
+ address_space_stq_be(&address_space_memory, notify_addr, data,
+ MEMTXATTRS_UNSPECIFIED, &result);
+ if (result != MEMTX_OK) {
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: trigger failed @%"
+ HWADDR_PRIx "\n", __func__, notif_port);
+ return;
}
}
--
2.21.0
- [PULL 00/28] ppc-for-4.2 queue 20191024, David Gibson, 2019/10/24
- [PULL 05/28] ppc/pnv: Use address_space_stq_be() when triggering an interrupt from PSI,
David Gibson <=
- [PULL 01/28] xive: Make some device types not user creatable, David Gibson, 2019/10/24
- [PULL 04/28] ppc/pnv: Improve trigger data definition, David Gibson, 2019/10/24
- [PULL 02/28] xics: Make some device types not user creatable, David Gibson, 2019/10/24
- [PULL 06/28] spapr: Set VSMT to smp_threads by default, David Gibson, 2019/10/24
- [PULL 07/28] spapr, xics, xive: Introduce SpaprInterruptController QOM interface, David Gibson, 2019/10/24
- [PULL 03/28] target/ppc: Fix for optimized vsl/vsr instructions, David Gibson, 2019/10/24
- [PULL 11/28] spapr, xics, xive: Move set_irq from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 08/28] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 12/28] spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 23/28] spapr_cpu_core: Implement DeviceClass::reset, David Gibson, 2019/10/24