vfio/ccw: allocate/populate the guest idal
authorEric Farman <farman@linux.ibm.com>
Fri, 21 Oct 2022 18:53:51 +0000 (20:53 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Jan 2023 13:34:09 +0000 (14:34 +0100)
commit61f3a16b9d5cd9361a317ee7870083c1bc171188
tree3567a74d8bad0398e500dd280e43a74135032a84
parent6a6dc14ac84733cf5864a7cf9f5b3e43f6a79be8
vfio/ccw: allocate/populate the guest idal

Today, we allocate memory for a list of IDAWs, and if the CCW
being processed contains an IDAL we read that data from the guest
into that space. We then copy each IDAW into the pa_iova array,
or fabricate that pa_iova array with a list of addresses based
on a direct-addressed CCW.

Combine the reading of the guest IDAL with the creation of a
pseudo-IDAL for direct-addressed CCWs, so that both CCW types
have a "guest" IDAL that can be populated straight into the
pa_iova array.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/cio/vfio_ccw_cp.c