Patchwork [for-1.7,v2,3/8] hw/ppc: limit iommu-spapr memory size

login
register
mail settings
Submitter Marcel Apfelbaum
Date Nov. 7, 2013, 10:41 a.m.
Message ID <1383820884-29596-4-git-send-email-marcel.a@redhat.com>
Download mbox | patch
Permalink /patch/289284/
State New
Headers show

Comments

Marcel Apfelbaum - Nov. 7, 2013, 10:41 a.m.
The page table logic in exec.c assumes
that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS.
Limit iommu-spapr accordingly.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
 hw/ppc/spapr_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index ef45f4f..3f3f6ea 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -136,7 +136,7 @@  static int spapr_tce_table_realize(DeviceState *dev)
     trace_spapr_iommu_new_table(tcet->liobn, tcet, tcet->table, tcet->fd);
 
     memory_region_init_iommu(&tcet->iommu, OBJECT(dev), &spapr_iommu_ops,
-                             "iommu-spapr", UINT64_MAX);
+                             "iommu-spapr", TARGET_PHYS_ADDR_SPACE_MAX);
 
     QLIST_INSERT_HEAD(&spapr_tce_tables, tcet, list);