aboutsummaryrefslogtreecommitdiffstats
path: root/CREDITS
diff options
context:
space:
mode:
authorEric Farman <farman@linux.ibm.com>2019-05-16 18:14:01 +0200
committerCornelia Huck <cohuck@redhat.com>2019-06-03 12:02:55 +0200
commit5d87fbf70fb4f4be695a3052aa8b2883be026ce7 (patch)
tree92aa37442938a81a475c0fb5ec9a82ab0ca26628 /CREDITS
parents390/cio: Initialize the host addresses in pfn_array (diff)
downloadlinux-dev-5d87fbf70fb4f4be695a3052aa8b2883be026ce7.tar.xz
linux-dev-5d87fbf70fb4f4be695a3052aa8b2883be026ce7.zip
s390/cio: Don't pin vfio pages for empty transfers
The skip flag of a CCW offers the possibility of data not being transferred, but is only meaningful for certain commands. Specifically, it is only applicable for a read, read backward, sense, or sense ID CCW and will be ignored for any other command code (SA22-7832-11 page 15-64, and figure 15-30 on page 15-75). (A sense ID is xE4, while a sense is x04 with possible modifiers in the upper four bits. So we will cover the whole "family" of sense CCWs.) For those scenarios, since there is no requirement for the target address to be valid, we should skip the call to vfio_pin_pages() and rely on the IDAL address we have allocated/built for the channel program. The fact that the individual IDAWs within the IDAL are invalid is fine, since they aren't actually checked in these cases. Set pa_nr to zero when skipping the pfn_array_pin() call, since it is defined as the number of pages pinned and is used to determine whether to call vfio_unpin_pages() upon cleanup. The pfn_array_pin() routine returns the number of pages that were pinned, but now might be skipped for some CCWs. Thus we need to calculate the expected number of pages ourselves such that we are guaranteed to allocate a reasonable number of IDAWs, which will provide a valid address in CCW.CDA regardless of whether the IDAWs are filled in with pinned/translated addresses or not. Signed-off-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20190516161403.79053-2-farman@linux.ibm.com> Acked-by: Farhan Ali <alifm@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions