[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'a
From: |
Jintack Lim |
Subject: |
Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'? |
Date: |
Fri, 23 Feb 2018 09:58:52 -0500 |
Hi Kevin,
On Fri, Feb 23, 2018 at 2:34 AM, Tian, Kevin <address@hidden> wrote:
>> From: Peter Xu
>> Sent: Friday, February 23, 2018 3:09 PM
>>
>> >
>> > Right. I think my question was not clear. My question was that why don’t
>> > IOMMU invalidate device-iotlb along with its mappings in one go. Then
>> IOMMU
>> > device driver doesn’t need to flush device-iotlb explicitly. Maybe the
>> > reason is that ATS and IOMMU are not always coupled.. but I guess it’s
>> time
>> > for me to get some more background :)
>>
>> Ah, I see your point.
>>
>> I don't know the answer. My wild guess is that IOMMU is just trying
>> to be simple and only provide most basic functionalities, leaving
>> complex stuff to CPU. For example, if IOMMU takes over the ownership
>> to deliever device-iotlb invalidations when receiving iotlb
>> invalidations, it possibly needs to traverse the device tree sometimes
>> (e.g., for domain invalidations) to know what device is under what
>> domain, which is really compliated. While it'll be simpler for CPU to
>> do this since it's very possible that the OS keeps a list of devices
>> for a domain already.
>>
>> IMHO that follows the *nix philosophy too - Do One Thing And Do It
>> Well. Though again, it's wild guess and I may be wrong. :)
>>
>> CCing Alex, in case he has quick answers.
>>
>
> IOMMU and devices are de-coupled. You need a protocol so IOMMU
> knows which device enables translation caches and thus requires
> explicit invalidation, which is how ATS comes to play. ATS is not
> mandatory for vhost, but doing so provides more flexibility e.g.
> to enable I/O page fault if further emulating PCI PRS cap.
Thanks for the explanation!
Thanks,
Jintack
>
> Thanks
> Kevin
- [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Jintack Lim, 2018/02/20
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Peter Xu, 2018/02/22
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Jintack Lim, 2018/02/23
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Peter Xu, 2018/02/23
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Jintack Lim, 2018/02/23
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Peter Xu, 2018/02/23
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Tian, Kevin, 2018/02/23
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?,
Jintack Lim <=
- Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Jintack Lim, 2018/02/23
Re: [Qemu-devel] intel-iommu and vhost: Do we need 'device-iotlb' and 'ats'?, Auger Eric, 2018/02/26