• Eric Farman's avatar
    vfio/ccw: read only one Format-1 IDAW · 667e5dba
    Eric Farman authored
    
    
    The intention is to read the first IDAW to determine the starting
    location of an I/O operation, knowing that the second and any/all
    subsequent IDAWs will be aligned per architecture. But, this read
    receives 64-bits of data, which is the size of a Format-2 IDAW.
    
    In the event that Format-1 IDAWs are presented, adjust the size
    of the read to 32-bits. The data will end up occupying the upper
    word of the target iova variable, so shift it down to the lower
    word for use as an address. (By definition, this IDAW format
    uses a 31-bit address, so the "sign" bit will always be off and
    there is no concern about sign extension.)
    Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
    Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    667e5dba
vfio_ccw_cp.c 22.4 KB