diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2012-06-27 14:50:44 +1000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-06-27 16:33:25 -0500 |
commit | ad0ebb91cd8b5fdc4a583b03645677771f420a46 (patch) | |
tree | 4449fc0cf864869480c95b79c661c0e0ec254c1a /target-ppc | |
parent | e5332e6334f375600b0c15f5c3540c1b72af7067 (diff) |
pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure
The pseries platform already contains an IOMMU implementation, since it is
essential for the platform's paravirtualized VIO devices. This IOMMU
support is currently built into the implementation of the VIO "bus" and
the various VIO devices.
This patch converts this code to make use of the new common IOMMU
infrastructure.
We don't yet handle synchronization of map/unmap callbacks vs. invalidations,
this will require some complex interaction with the kernel and is not a
major concern at this stage.
Cc: Alex Graf <agraf@suse.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/kvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index b6ef72d16b..829e180f8b 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1067,7 +1067,7 @@ void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t window_size, int *pfd) return NULL; } - len = (window_size / SPAPR_VIO_TCE_PAGE_SIZE) * sizeof(VIOsPAPR_RTCE); + len = (window_size / SPAPR_TCE_PAGE_SIZE) * sizeof(sPAPRTCE); /* FIXME: round this up to page size */ table = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); @@ -1090,7 +1090,7 @@ int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size) return -1; } - len = (window_size / SPAPR_VIO_TCE_PAGE_SIZE)*sizeof(VIOsPAPR_RTCE); + len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE); if ((munmap(table, len) < 0) || (close(fd) < 0)) { fprintf(stderr, "KVM: Unexpected error removing TCE table: %s", |