]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_vio.c
spapr_vio/spapr_iommu: Move VIO bypass where it belongs
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 29 Jan 2015 05:04:58 +0000 (16:04 +1100)
committerAlexander Graf <agraf@suse.de>
Mon, 9 Mar 2015 13:59:52 +0000 (14:59 +0100)
commitee9a569ab88edd0755402aaf31ec0c69decf7756
treee7bf5a463ae6c5401a92241a16a8d728949032ca
parent0048fa6c807fc8fb5c52873562ea3debfa65f085
spapr_vio/spapr_iommu: Move VIO bypass where it belongs

Instead of tweaking a TCE table device by adding there a bypass flag,
let's add an alias to RAM and IOMMU memory region, and enable/disable
those according to the selected bypass mode.
This way IOMMU memory region can have size of the actual window rather
than ram_size which is essential for upcoming DDW support.

This moves bypass logic to VIO layer and keeps @bypass flag in TCE table
for migration compatibility only. This replaces spapr_tce_set_bypass()
calls with explicit assignment to avoid confusion as the function could
do something more that just syncing the @bypass flag.

This adds a pointer to VIO device into the sPAPRTCETable struct to provide
the sPAPRTCETable device a way to update bypass mode for the VIO device.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_iommu.c
hw/ppc/spapr_vio.c
include/hw/ppc/spapr.h
include/hw/ppc/spapr_vio.h