diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2017-12-01 18:47:32 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-12-13 10:51:33 +0100 |
commit | a5f1005517534aeb1fac20180badfbf0896c183c (patch) | |
tree | 24c450680c2879193ff6d12f71411c3a479c4919 /arch/s390/pci/pci_insn.c | |
parent | Merge tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-pla... (diff) | |
download | linux-a5f1005517534aeb1fac20180badfbf0896c183c.tar.xz linux-a5f1005517534aeb1fac20180badfbf0896c183c.zip |
s390/pci: handle insufficient resources during dma tlb flush
In a virtualized setup lazy flushing can lead to the hypervisor
running out of resources when lots of guest pages need to be
pinned. In this situation simply trigger a global flush to give
the hypervisor a chance to free some of these resources.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_insn.c')
-rw-r--r-- | arch/s390/pci/pci_insn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_insn.c b/arch/s390/pci/pci_insn.c index 19bcb3b45a70..f069929e8211 100644 --- a/arch/s390/pci/pci_insn.c +++ b/arch/s390/pci/pci_insn.c @@ -89,6 +89,9 @@ int zpci_refresh_trans(u64 fn, u64 addr, u64 range) if (cc) zpci_err_insn(cc, status, addr, range); + if (cc == 1 && (status == 4 || status == 16)) + return -ENOMEM; + return (cc) ? -EIO : 0; } |