[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/13] pseries: Don't allow TCE (iommu) tables to be
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 09/13] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs |
Date: |
Tue, 4 Dec 2012 13:42:13 +1100 |
The PAPR specification requires that every bus or device mediated by the
IOMMU have a unique Logical IO Bus Number (LIOBN). This patch adds a check
to enforce this, which will help catch errors in configuration earlier.
Signed-off-by: David Gibson <address@hidden>
---
hw/spapr_iommu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/spapr_iommu.c b/hw/spapr_iommu.c
index 02d78cc..3011b25 100644
--- a/hw/spapr_iommu.c
+++ b/hw/spapr_iommu.c
@@ -120,6 +120,12 @@ DMAContext *spapr_tce_new_dma_context(uint32_t liobn,
size_t window_size)
{
sPAPRTCETable *tcet;
+ if (spapr_tce_find_by_liobn(liobn)) {
+ fprintf(stderr, "Attempted to create TCE table with duplicate"
+ " LIOBN 0x%x\n", liobn);
+ return NULL;
+ }
+
if (!window_size) {
return NULL;
}
--
1.7.10.4
- Re: [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, (continued)
- Re: [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/05
- Re: [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/05
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/05
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/05
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/06
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/06
- Re: [Qemu-devel] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/06
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Nikunj A Dadhania, 2012/12/07
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Erlon Cruz, 2012/12/07
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 08/13] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/07
[Qemu-devel] [PATCH 09/13] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs,
David Gibson <=
[Qemu-devel] [PATCH 05/13] pseries: Add tracepoints to the XICS interrupt controller, David Gibson, 2012/12/03
[Qemu-devel] [PATCH 02/13] pseries: Use #define for XICS base irq number, David Gibson, 2012/12/03