Skip to content
  • Jason Wang's avatar
    4c708753
    pci: advertise a page aligned ATS · 4c708753
    Jason Wang authored
    
    
    After Linux kernel commit 61363c1474b1 ("iommu/vt-d: Enable ATS only
    if the device uses page aligned address."), ATS will be only enabled
    if device advertises a page aligned request.
    
    Unfortunately, vhost-net is the only user and we don't advertise the
    aligned request capability in the past since both vhost IOTLB and
    address_space_get_iotlb_entry() can support non page aligned request.
    
    Though it's not clear that if the above kernel commit makes
    sense. Let's advertise a page aligned ATS here to make vhost device
    IOTLB work with Intel IOMMU again.
    
    Note that in the future we may extend pcie_ats_init() to accept
    parameters like queue depth and page alignment.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Message-Id: <20200909081731.24688-1-jasowang@redhat.com>
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    4c708753
    pci: advertise a page aligned ATS
    Jason Wang authored
    
    
    After Linux kernel commit 61363c1474b1 ("iommu/vt-d: Enable ATS only
    if the device uses page aligned address."), ATS will be only enabled
    if device advertises a page aligned request.
    
    Unfortunately, vhost-net is the only user and we don't advertise the
    aligned request capability in the past since both vhost IOTLB and
    address_space_get_iotlb_entry() can support non page aligned request.
    
    Though it's not clear that if the above kernel commit makes
    sense. Let's advertise a page aligned ATS here to make vhost device
    IOTLB work with Intel IOMMU again.
    
    Note that in the future we may extend pcie_ats_init() to accept
    parameters like queue depth and page alignment.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Message-Id: <20200909081731.24688-1-jasowang@redhat.com>
    Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Loading