s390x/pci: fixup global refresh
commitb3f05d8c7f5ef499e7bf7384d7a0507b8a33afe4
authorYi Min Zhao <zyimin@linux.vnet.ibm.com>
Mon, 5 Feb 2018 07:22:57 +0000 (5 15:22 +0800)
committerCornelia Huck <cohuck@redhat.com>
Fri, 9 Feb 2018 08:37:13 +0000 (9 09:37 +0100)
tree6ed5b4cea3e7d858b4c4cec15027b838212e8baa
parent0125861eacc37478308b462dc9f41438c94fb5e2
s390x/pci: fixup global refresh

The VFIO common code doesn't provide the possibility to modify a
previous mapping entry in another way than unmapping and mapping again
with new properties.

To avoid -EEXIST DMA mapping error, we introduce a GHashTable to store
S390IOTLBEntry instances in order to cache the mapped entries. When
intercepting rpcit instruction, ignore the identical mapped entries to
avoid doing map operations multiple times and do unmap and re-map
operations for the case of updating the valid entries.

Acked-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Message-Id: <20180205072258.5968-3-zyimin@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-pci-bus.h
hw/s390x/s390-pci-inst.c