Add a PAPR TCE-bypass mechanism for the pSeries machine
authorBen Herrenschmidt <benh@kernel.crashing.org>
Fri, 1 Apr 2011 04:15:32 +0000 (15:15 +1100)
committerAlexander Graf <agraf@suse.de>
Fri, 1 Apr 2011 16:34:57 +0000 (18:34 +0200)
commitb6097d96d0e39561fcf20e3bd6e25889eebf7beb
treeb080513d06e331b97f9a8d38101e4e5bc0e03c3c
parentb023f575ae82f0e135d2abb719f9fc3a2eca61a2
Add a PAPR TCE-bypass mechanism for the pSeries machine

Usually, PAPR virtual IO devices use a virtual IOMMU mechanism, TCEs,
to mediate all DMA transfers.  While this is necessary for some sorts of
operation, it can be complex to program and slow for others.

This patch implements a mechanism for bypassing TCE translation, treating
"IO" addresses as plain (guest) physical memory addresses.  This has two
main uses:
 * Simple, but 64-bit aware programs like firmwares can use the VIO devices
without the complexity of TCE setup.
 * The guest OS can optionally use the TCE bypass to improve performance in
suitable situations.

The mechanism used is a per-device flag which disables TCE translation.
The flag is toggled with some (hypervisor-implemented) RTAS methods.

Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr_vio.c
hw/spapr_vio.h