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 considered this. But the problem is that:
> 
> 1) vhost itself can generate unaligned request (since its IOTLB doesn't have
> any alignment requirement)
> 2) the IOTLB miss processing in qemu doesn't do anything with ATS, we
> shortcut PCI by calling the address_space_get_iotlb_entry()
> 
> So I'm not quite sure it's worth to do that consider we don't emulate ATS
> via PCI actually :)

True. :) Though we still need to make sure e.g. each translate() iommu op will
drop those bits properly, but I agree that should be trivial.

-- 
Peter Xu


Reply via email to