[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/15] hw/riscv/riscv-iommu: Add another irq for mrif notifica
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v2 12/15] hw/riscv/riscv-iommu: Add another irq for mrif notifications |
Date: |
Thu, 7 Mar 2024 13:03:15 -0300 |
From: Andrew Jones <ajones@ventanamicro.com>
And add mrif notification trace.
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
hw/riscv/riscv-iommu-pci.c | 2 +-
hw/riscv/riscv-iommu.c | 1 +
hw/riscv/trace-events | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c
index 4eb1057210..8a7b71166c 100644
--- a/hw/riscv/riscv-iommu-pci.c
+++ b/hw/riscv/riscv-iommu-pci.c
@@ -78,7 +78,7 @@ static void riscv_iommu_pci_realize(PCIDevice *dev, Error
**errp)
pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_TYPE_64, &s->bar0);
- int ret = msix_init(dev, RISCV_IOMMU_INTR_COUNT,
+ int ret = msix_init(dev, RISCV_IOMMU_INTR_COUNT + 1,
&s->bar0, 0, RISCV_IOMMU_REG_MSI_CONFIG,
&s->bar0, 0, RISCV_IOMMU_REG_MSI_CONFIG + 256, 0,
&err);
diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c
index 1fa1286d07..954a6892c2 100644
--- a/hw/riscv/riscv-iommu.c
+++ b/hw/riscv/riscv-iommu.c
@@ -543,6 +543,7 @@ static MemTxResult riscv_iommu_msi_write(RISCVIOMMUState *s,
if (res != MEMTX_OK) {
return res;
}
+ trace_riscv_iommu_mrif_notification(s->parent_obj.id, n190, addr);
return MEMTX_OK;
}
diff --git a/hw/riscv/trace-events b/hw/riscv/trace-events
index 4b486b6420..d69719a27a 100644
--- a/hw/riscv/trace-events
+++ b/hw/riscv/trace-events
@@ -6,6 +6,7 @@ riscv_iommu_flt(const char *id, unsigned b, unsigned d,
unsigned f, uint64_t rea
riscv_iommu_pri(const char *id, unsigned b, unsigned d, unsigned f, uint64_t
iova) "%s: page request %04x:%02x.%u iova: 0x%"PRIx64
riscv_iommu_dma(const char *id, unsigned b, unsigned d, unsigned f, unsigned
pasid, const char *dir, uint64_t iova, uint64_t phys) "%s: translate
%04x:%02x.%u #%u %s 0x%"PRIx64" -> 0x%"PRIx64
riscv_iommu_msi(const char *id, unsigned b, unsigned d, unsigned f, uint64_t
iova, uint64_t phys) "%s: translate %04x:%02x.%u MSI 0x%"PRIx64" -> 0x%"PRIx64
+riscv_iommu_mrif_notification(const char *id, uint32_t nid, uint64_t phys)
"%s: sent MRIF notification 0x%x to 0x%"PRIx64
riscv_iommu_cmd(const char *id, uint64_t l, uint64_t u) "%s: command
0x%"PRIx64" 0x%"PRIx64
riscv_iommu_notifier_add(const char *id) "%s: dev-iotlb notifier added"
riscv_iommu_notifier_del(const char *id) "%s: dev-iotlb notifier removed"
--
2.43.2
- [PATCH v2 01/15] exec/memtxattr: add process identifier to the transaction attributes, (continued)
- [PATCH v2 01/15] exec/memtxattr: add process identifier to the transaction attributes, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 06/15] hw/riscv/virt.c: support for RISC-V IOMMU PCIDevice hotplug, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 05/15] hw/riscv: add riscv-iommu-sys platform device, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 04/15] hw/riscv: add riscv-iommu-pci device, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 07/15] test/qtest: add riscv-iommu-pci tests, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 08/15] hw/riscv/riscv-iommu: add Address Translation Cache (IOATC), Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 09/15] hw/riscv/riscv-iommu: add s-stage and g-stage support, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 10/15] hw/riscv/riscv-iommu: add ATS support, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 11/15] hw/riscv/riscv-iommu: add DBG support, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 12/15] hw/riscv/riscv-iommu: Add another irq for mrif notifications,
Daniel Henrique Barboza <=
- [PATCH v2 13/15] qtest/riscv-iommu-test: add init queues test, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 14/15] hw/misc: EDU: added PASID support, Daniel Henrique Barboza, 2024/03/07
- [PATCH v2 15/15] hw/misc: EDU: add ATS/PRI capability, Daniel Henrique Barboza, 2024/03/07