[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/40] pseries: Don't allow TCE (iommu) tables to be
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 11/40] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs |
Date: |
Fri, 14 Dec 2012 13:13:27 +0100 |
From: David Gibson <address@hidden>
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>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr_iommu.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
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.6.0.2
- Re: [Qemu-devel] [PATCH 09/40] e500: Adding CCSR memory region, (continued)
- [Qemu-devel] [PATCH 16/40] openpic: Convert subregions to memory api, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 14/40] openpic: update to proper memory api, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 20/40] openpic: unify memory api subregions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 03/40] pseries: Return the token when we register an RTAS call, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 21/40] openpic: remove unused type variable, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 17/40] openpic: combine mpic and openpic irq raise functions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 18/40] openpic: merge mpic and openpic timer handling, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 37/40] PPC: E500plat: Make a lot of PCI slots available, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 19/40] openpic: combine openpic and mpic reset functions, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 11/40] pseries: Don't allow TCE (iommu) tables to be registered with duplicate LIOBNs,
Alexander Graf <=
- [Qemu-devel] [PATCH 27/40] openpic: add Shared MSI support, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 33/40] PPC: E500: PCI: Make first slot qdev settable, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 25/40] openpic: convert to qdev, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 39/40] target-ppc: Don't use hwaddr to represent hardware state, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 10/40] Adding BAR0 for e500 PCI controller, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 22/40] openpic: convert simple reg operations to builtin bitops, Alexander Graf, 2012/12/14