summary refs log tree commit diff stats
path: root/hw/pci/pci.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2020-09-09 16:17:31 +0800
committerMichael S. Tsirkin <mst@redhat.com>2020-10-30 06:48:53 -0400
commit4c70875372b821b045e84f462466a5c04b091ef5 (patch)
treed5f444fbfcfee87a03806f240f1222caa310f426 /hw/pci/pci.c
parent0259c78ca79190df6e307a6ae43886dcb69eb92a (diff)
downloadfocaccia-qemu-4c70875372b821b045e84f462466a5c04b091ef5.tar.gz
focaccia-qemu-4c70875372b821b045e84f462466a5c04b091ef5.zip
pci: advertise a page aligned ATS
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: Jason Wang <jasowang@redhat.com>
Message-Id: <20200909081731.24688-1-jasowang@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/pci.c')
0 files changed, 0 insertions, 0 deletions