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>
This commit is contained in:
Alexey Kardashevskiy 2022-06-22 15:29:55 +10:00 committed by Daniel Henrique Barboza
parent 59f11543e2
commit 31cc81f728
4 changed files with 19 additions and 1 deletions

View file

@ -902,6 +902,7 @@ struct SpaprTceTable {
bool bypass;
bool need_vfio;
bool skipping_replay;
bool def_win;
int fd;
MemoryRegion root;
IOMMUMemoryRegion iommu;