qemu-e2k/hw
Alexey Kardashevskiy ae4de14cd3 spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)
This adds support for Dynamic DMA Windows (DDW) option defined by
the SPAPR specification which allows to have additional DMA window(s)

The "ddw" property is enabled by default on a PHB but for compatibility
the pseries-2.6 machine and older disable it.
This also creates a single DMA window for the older machines to
maintain backward migration.

This implements DDW for PHB with emulated and VFIO devices. The host
kernel support is required. The advertised IOMMU page sizes are 4K and
64K; 16M pages are supported but not advertised by default, in order to
enable them, the user has to specify "pgsz" property for PHB and
enable huge pages for RAM.

The existing linux guests try creating one additional huge DMA window
with 64K or 16MB pages and map the entire guest RAM to. If succeeded,
the guest switches to dma_direct_ops and never calls TCE hypercalls
(H_PUT_TCE,...) again. This enables VFIO devices to use the entire RAM
and not waste time on map/unmap later. This adds a "dma64_win_addr"
property which is a bus address for the 64bit window and by default
set to 0x800.0000.0000.0000 as this is what the modern POWER8 hardware
uses and this allows having emulated and VFIO devices on the same bus.

This adds 4 RTAS handlers:
* ibm,query-pe-dma-window
* ibm,create-pe-dma-window
* ibm,remove-pe-dma-window
* ibm,reset-pe-dma-window
These are registered from type_init() callback.

These RTAS handlers are implemented in a separate file to avoid polluting
spapr_iommu.c with PCI.

This changes sPAPRPHBState::dma_liobn to an array to allow 2 LIOBNs
and updates all references to dma_liobn. However this does not add
64bit LIOBN to the migration stream as in fact even 32bit LIOBN is
rather pointless there (as it is a PHB property and the management
software can/should pass LIOBNs via CLI) but we keep it for the backward
migration support.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-05 14:31:08 +10:00
..
9pfs 9p: synth: drop v9fs_ prefix 2016-07-01 14:38:54 +02:00
acpi pc: use new CPU hotplug interface since 2.7 machine type 2016-06-24 05:21:38 +03:00
alpha trace: split out trace events for hw/alpha/ directory 2016-06-20 17:22:17 +01:00
arm ast2400: create SPI flash slaves 2016-07-04 13:15:22 +01:00
audio pcspk: fix KVM 2016-06-30 19:00:02 +01:00
block m25p80: qdev-ify drive property 2016-07-04 13:15:22 +01:00
bt bt: rewrite csrhci_write to avoid out-of-bounds writes 2016-05-29 09:11:11 +02:00
char * serial port fixes (Paolo) 2016-06-29 19:14:48 +01:00
core register: Add block initialise helper 2016-07-04 13:15:22 +01:00
cpu cpu: Abstract CPU core type 2016-06-17 16:33:48 +10:00
cris hw/char: QOM'ify etraxfs_ser.c 2016-05-29 09:11:10 +02:00
display ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
dma dma: Add Xilinx Zynq devcfg device model 2016-07-04 13:15:22 +01:00
gpio hw/gpio: QOM'ify zaurus.c 2016-06-14 15:59:13 +01:00
i2c ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public 2016-06-29 14:03:46 +02:00
i386 intel_iommu: Throw hw_error on notify_started 2016-06-30 13:00:24 -06:00
ide * serial port fixes (Paolo) 2016-06-29 19:14:48 +01:00
input pckbd: handle A20 IRQ as GPIO 2016-06-29 14:03:46 +02:00
intc armv7m_nvic: Use qemu_get_cpu(0) instead of current_cpu 2016-07-04 13:15:22 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi hw/ipmi: fix spelling 2016-06-07 18:02:48 +03:00
isa ich9: implement SCI_IRQ_SEL register 2016-06-29 14:03:48 +02:00
lm32 hw/char: QOM'ify milkymist-uart.c 2016-05-29 09:11:10 +02:00
m68k hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
mem nvdimm: support nvdimm label 2016-06-24 05:13:57 +03:00
microblaze m25p80: qdev-ify drive property 2016-07-04 13:15:22 +01:00
mips mips: use MIPSCPU instead of CPUMIPSState 2016-05-19 16:42:27 +02:00
misc ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU 2016-06-28 10:13:57 +08:00
nvram trace: split out trace events for hw/nvram/ directory 2016-06-20 17:22:15 +01:00
openrisc hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
pci trace: split out trace events for hw/pci/ directory 2016-06-20 17:22:16 +01:00
pci-bridge fix some coding style problems 2016-06-17 03:28:03 +03:00
pci-host Q35: implement property interfece to several parameters 2016-06-29 14:03:46 +02:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) 2016-07-05 14:31:08 +10:00
s390x virtio-ccw: convert to ioeventfd callbacks 2016-06-24 08:47:35 +03:00
scsi * serial port fixes (Paolo) 2016-06-29 19:14:48 +01:00
sd ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
sh4 hw/sh4/sh_pci.c: Use ldl_le_p() and stl_le_p() 2016-06-28 15:09:32 +01:00
smbios ipmi: Add SMBIOS table entry 2016-06-24 05:13:57 +03:00
sparc trace: split out trace events for hw/sparc/ directory 2016-06-20 17:22:16 +01:00
sparc64 util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
ssi ast2400: add SPI flash slaves 2016-07-04 13:15:22 +01:00
timer MC146818 RTC: add GPIO access to output IRQ 2016-06-29 14:03:46 +02:00
tpm tpm: Fix write to file descriptor function 2016-04-13 19:52:34 +03:00
tricore hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
unicore32 hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
usb usb-uas: hotplug support 2016-06-22 12:53:26 +02:00
vfio vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2) 2016-07-05 14:31:08 +10:00
virtio virtio-bus: remove old set_host_notifier callback 2016-06-24 08:47:35 +03:00
watchdog nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
xen xen: move xen_sysdev to xen_backend.c 2016-06-22 11:28:42 +01:00
xenpv xen: move xen_sysdev to xen_backend.c 2016-06-22 11:28:42 +01:00
xtensa replace muldiv64(a, b, c) by (uint64_t)a * b / c 2016-06-07 18:02:49 +03:00
Makefile.objs Add a base IPMI interface 2015-12-22 18:39:19 +02:00