spapr/ddw: Reset DMA when the last non-default window is removed
commit31cc81f72801bcda02c866ff94ed8baf6b84506d
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 22 Jun 2022 05:29:55 +0000 (22 15:29 +1000)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 6 Jul 2022 13:22:37 +0000 (6 10:22 -0300)
treed06e28ea747d49fc4f8dd1af05b9e62262745dff
parent59f11543e2ccd5cab283732a7c59aeeaa6790138
spapr/ddw: Reset DMA when the last non-default window is removed

PAPR+/LoPAPR says:
===
The platform must restore the default DMA window for the PE on a call
to the ibm,remove-pe-dma-window RTAS call when all of the following
are true:
 a. The call removes the last DMA window remaining for the PE.
 b. The DMA window being removed is not the default window

===

This resets DMA as PAPR mandates.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220622052955.1069903-1-aik@ozlabs.ru>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/ppc/spapr_iommu.c
hw/ppc/spapr_pci.c
hw/ppc/spapr_rtas_ddw.c
include/hw/ppc/spapr.h