• Eric Farman's avatar
    vfio/ccw: handle a guest Format-1 IDAL · 1b676fe3
    Eric Farman authored
    There are two scenarios that need to be addressed here.
    
    First, an ORB that does NOT have the Format-2 IDAL bit set could
    have both a direct-addressed CCW and an indirect-data-address CCW
    chained together. This means that the IDA CCW will contain a
    Format-1 IDAL, and can be easily converted to a 2K Format-2 IDAL.
    But it also means that the direct-addressed CCW needs to be
    converted to the same 2K Format-2 IDAL for consistency with the
    ORB settings.
    
    Secondly, a Format-1 IDAL is comprised of 31-bit addresses.
    Thus, we need to cast this IDAL to a pointer of ints while
    populating the list of addresses that are sent to vfio.
    
    Since the result of both of these is the use of the 2K IDAL
    variants, and the output of vfio-ccw is always a Format-2 IDAL
    (in order to use 64-bit addresses), make sure that the correct
    control bit gets set in the ORB when these scenarios occur.
    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>
    1b676fe3
vfio_ccw_cp.c 24.1 KB