Re: [PATCH] pci: advertise a page aligned ATS

2020-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2020 at 03:47:09PM +0800, Jason Wang wrote: > > On 2020/9/9 下午4:17, Jason Wang wrote: > > 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. >

Re: [PATCH] pci: advertise a page aligned ATS

2020-10-15 Thread Jason Wang
On 2020/9/9 下午4:17, Jason Wang wrote: 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 alig

Re: [PATCH] pci: advertise a page aligned ATS

2020-09-10 Thread Peter Xu
On Thu, Sep 10, 2020 at 09:53:03AM +0800, Jason Wang wrote: > > Maybe it would be good too that vhost provides real 4k-aligned addresses (in > > vhost_iotlb_miss)? My understanding is that PCI_ATS_CAP_PAGE_ALIGNED will > > be > > more compatible than without the bit set. > > > Yes, I've conside

Re: [PATCH] pci: advertise a page aligned ATS

2020-09-09 Thread Jason Wang
On 2020/9/9 下午11:43, Peter Xu wrote: On Wed, Sep 09, 2020 at 04:17:31PM +0800, Jason Wang wrote: 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

Re: [PATCH] pci: advertise a page aligned ATS

2020-09-09 Thread Peter Xu
On Wed, Sep 09, 2020 at 04:17:31PM +0800, Jason Wang wrote: > 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

[PATCH] pci: advertise a page aligned ATS

2020-09-09 Thread Jason Wang
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 b