• Eric Farman's avatar
    s390/cio: Split pfn_array_alloc_pin into pieces · e4f3f18b
    Eric Farman authored
    The pfn_array_alloc_pin routine is doing too much.  Today, it does the
    alloc of the pfn_array struct and its member arrays, builds the iova
    address lists out of a contiguous piece of guest memory, and asks vfio
    to pin the resulting pages.
    
    Let's effectively revert a significant portion of commit 5c1cfb1c
    ("vfio: ccw: refactor and improve pfn_array_alloc_pin()") such that we
    break pfn_array_alloc_pin() into its component pieces, and have one
    routine that allocates/populates the pfn_array structs, and another
    that actually pins the memory.  In the future, we will be able to
    handle scenarios where pinning memory isn't actually appropriate.
    Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
    Message-Id: <20190514234248.36203-4-farman@linux.ibm.com>
    Reviewed-by: default avatarFarhan Ali <alifm@linux.ibm.com>
    Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
    e4f3f18b
vfio_ccw_cp.c 22.6 KB