Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-09 Thread Jason Wang
On 2021/2/9 上午2:26, Peter Xu wrote: Kevin, On Mon, Feb 08, 2021 at 07:03:08AM +, Tian, Kevin wrote: It really depends on the definition of dev-iotlb in this context. To me the fact that virtio-iommu needs to notify the kernel for updating split cache is already sort of dev-iotlb semantics

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-09 Thread Peter Xu
On Tue, Feb 09, 2021 at 06:15:11PM +0100, Auger Eric wrote: > I just noted that the vhost fix now breaks virtio-iommu/vfio integration > because VFIO registers IOMMU_NOTIFIER_ALL which includes the DEV-IOTLB > that is now rejected by virtio-iommu virtio_iommu_notify_flag_changed(). > Is it safe to

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-09 Thread Auger Eric
Hi, On 2/9/21 4:12 AM, Jason Wang wrote: > > On 2021/2/9 上午2:37, Peter Xu wrote: >> On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: >> >> [...] >> I'm not sure I remember it right, but we seem to have similar discussion previously on "what if the user didn't specify ats

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Jason Wang
On 2021/2/9 上午2:37, Peter Xu wrote: On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: [...] I'm not sure I remember it right, but we seem to have similar discussion previously on "what if the user didn't specify ats=on" - I think at that time the conclusion was that we ignore the f

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Peter Xu
On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: [...] > > I'm not sure I remember it right, but we seem to have similar discussion > > previously on "what if the user didn't specify ats=on" - I think at that > > time > > the conclusion was that we ignore the failure since that's not

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Peter Xu
Kevin, On Mon, Feb 08, 2021 at 07:03:08AM +, Tian, Kevin wrote: > It really depends on the definition of dev-iotlb in this context. To me the > fact that virtio-iommu needs to notify the kernel for updating split cache > is already sort of dev-iotlb semantics, regardless of whether it's delive

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Auger Eric
Hi, On 2/7/21 3:47 PM, Peter Xu wrote: > Hi, Kevin, > > On Sun, Feb 07, 2021 at 09:04:55AM +, Tian, Kevin wrote: >>> From: Peter Xu >>> Sent: Friday, February 5, 2021 11:31 PM >>> > > >> or virtio-iommu >> since dev-iotlb (or PCIe ATS) > > > We may need to add this

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Auger Eric
Hi, [Adding David and Greg in CC] On 2/8/21 7:37 PM, Peter Xu wrote: > On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: > > [...] > >>> I'm not sure I remember it right, but we seem to have similar discussion >>> previously on "what if the user didn't specify ats=on" - I think at th

RE: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Tian, Kevin
> From: Peter Xu > Sent: Sunday, February 7, 2021 10:47 PM > > Hi, Kevin, > > On Sun, Feb 07, 2021 at 09:04:55AM +, Tian, Kevin wrote: > > > From: Peter Xu > > > Sent: Friday, February 5, 2021 11:31 PM > > > > > > > > > > > > > > > > > >> or virtio-iommu > > > > >> since dev-iotlb (or PCIe A

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-07 Thread Jason Wang
On 2021/2/5 下午11:31, Peter Xu wrote: On Fri, Feb 05, 2021 at 09:33:29AM +0100, Auger Eric wrote: Hi, On 2/5/21 4:16 AM, Jason Wang wrote: On 2021/2/5 上午3:12, Peter Xu wrote: Previous work on dev-iotlb message broke vhost on either SMMU Have a quick git grep and it looks to me v3 support A

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-07 Thread Peter Xu
Hi, Kevin, On Sun, Feb 07, 2021 at 09:04:55AM +, Tian, Kevin wrote: > > From: Peter Xu > > Sent: Friday, February 5, 2021 11:31 PM > > > > > > > > > > > > > >> or virtio-iommu > > > >> since dev-iotlb (or PCIe ATS) > > > > > > > > > > > > We may need to add this in the future. > > > added Jea

RE: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-07 Thread Tian, Kevin
> From: Peter Xu > Sent: Friday, February 5, 2021 11:31 PM > > > > > > > > > >> or virtio-iommu > > >> since dev-iotlb (or PCIe ATS) > > > > > > > > > We may need to add this in the future. > > added Jean-Philippe in CC > > So that's the part I'm unsure about.. Since everybody is cced so maybe g

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-05 Thread Peter Xu
On Fri, Feb 05, 2021 at 09:33:29AM +0100, Auger Eric wrote: > Hi, > > On 2/5/21 4:16 AM, Jason Wang wrote: > > > > On 2021/2/5 上午3:12, Peter Xu wrote: > >> Previous work on dev-iotlb message broke vhost on either SMMU > > > > > > Have a quick git grep and it looks to me v3 support ATS and have

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-05 Thread Auger Eric
Hi, On 2/5/21 4:16 AM, Jason Wang wrote: > > On 2021/2/5 上午3:12, Peter Xu wrote: >> Previous work on dev-iotlb message broke vhost on either SMMU > > > Have a quick git grep and it looks to me v3 support ATS and have command > for device iotlb (ATC) invalidation. Yes I will do that. Should no

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-04 Thread Jason Wang
On 2021/2/5 上午3:12, Peter Xu wrote: Previous work on dev-iotlb message broke vhost on either SMMU Have a quick git grep and it looks to me v3 support ATS and have command for device iotlb (ATC) invalidation. or virtio-iommu since dev-iotlb (or PCIe ATS) We may need to add this in the

[PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-04 Thread Peter Xu
Previous work on dev-iotlb message broke vhost on either SMMU or virtio-iommu since dev-iotlb (or PCIe ATS) is not yet supported for those archs. An initial idea is that we can let IOMMU to export this information to vhost so that vhost would know whether the vIOMMU would support dev-iotlb, then v