• Gautam Dawar's avatar
    vdpa: multiple address spaces support · db9adcbf
    Gautam Dawar authored
    This patches introduces the multiple address spaces support for vDPA
    device. This idea is to identify a specific address space via an
    dedicated identifier - ASID.
    
    During vDPA device allocation, vDPA device driver needs to report the
    number of address spaces supported by the device then the DMA mapping
    ops of the vDPA device needs to be extended to support ASID.
    
    This helps to isolate the environments for the virtqueue that will not
    be assigned directly. E.g in the case of virtio-net, the control
    virtqueue will not be assigned directly to guest.
    
    As a start, simply claim 1 virtqueue groups and 1 address spaces for
    all vDPA devices. And vhost-vDPA will simply reject the device with
    more than 1 virtqueue groups or address spaces.
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarGautam Dawar <gdawar@xilinx.com>
    Message-Id: <20220330180436.24644-7-gdawar@xilinx.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    db9adcbf
vp_vdpa.c 13.5 KB