]> git.proxmox.com Git - mirror_qemu.git/commit - hw/spapr_pci.c
pseries: Reset emulated PCI TCE tables on system reset
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 12 Sep 2012 16:57:14 +0000 (16:57 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 4 Oct 2012 13:54:17 +0000 (15:54 +0200)
commiteddeed26ac83392053aef823a341f643ea8e3d2f
tree9432d42a4d3b48c022aa4cc29c3808b7853e87b9
parent4dd96f244f62d5e4b493c1f4071c0d4a4a57474d
pseries: Reset emulated PCI TCE tables on system reset

The emulated PCI host bridge on the pseries machine incorporates an IOMMU
(PAPR TCE table).  Currently the mappings in this IOMMU are not cleared
when we reset the system.  This patch fixes this bug.  To do this it adds
a new reset function to the IOMMU emulation code.  The VIO devices already
reset their TCE tables, but they do so by destroying and re-creating their
DMA context.  This doesn't work for the PCI host bridge, because the
infrastructure for PCI IOMMUs has already copied/cached the DMA pointer
context into the subordinate PCI device structures.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr.h
hw/spapr_iommu.c
hw/spapr_pci.c