[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 25/25] ppc/pnv: Use the EAS trigger bit when trigge
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v4 25/25] ppc/pnv: Use the EAS trigger bit when triggering an interrupt from PSI |
Date: |
Wed, 18 Sep 2019 18:06:45 +0200 |
and replace the cpu_physical_memory_write() by a address_space_stq_be().
Signed-off-by: Cédric Le Goater <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 88ba8e7b9b0a..3b0f4b02f9bf 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_EAS | 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
- [Qemu-ppc] [PATCH v4 15/25] ppc/xive: Synthesize interrupt from the saved IPB in the NVT, (continued)
- [Qemu-ppc] [PATCH v4 15/25] ppc/xive: Synthesize interrupt from the saved IPB in the NVT, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 16/25] ppc/pnv: Remove pnv_xive_vst_size() routine, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 17/25] ppc/pnv: Dump the XIVE NVT table, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 18/25] ppc/pnv: Skip empty slots of the XIVE NVT table, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 19/25] ppc/pnv: Introduce a pnv_xive_block_id() helper, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 20/25] ppc/pnv: Extend XiveRouter with a get_block_id() handler, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 21/25] ppc/pnv: Quiesce some XIVE errors, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 22/25] ppc/xive: Introduce a xive_os_cam_decode() helper, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 23/25] ppc/xive: Check V bit in TM_PULL_POOL_CTX, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 24/25] ppc/pnv: Improve trigger data definition, Cédric Le Goater, 2019/09/18
- [Qemu-ppc] [PATCH v4 25/25] ppc/pnv: Use the EAS trigger bit when triggering an interrupt from PSI,
Cédric Le Goater <=