Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 3:05 PM Peter Xu wrote: > > On Mon, Feb 14, 2022 at 02:40:20PM +0800, Jason Wang wrote: > > Or we can do tricks like checking IOMMU_NOTIFIER_DEVIOTLB_UNMAP and > > assume it's vhost. > > > > But I'm not sure it's worth it. > > If not any use, then probably not at all. :-)

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:40:20PM +0800, Jason Wang wrote: > Or we can do tricks like checking IOMMU_NOTIFIER_DEVIOTLB_UNMAP and > assume it's vhost. > > But I'm not sure it's worth it. If not any use, then probably not at all. :-) -- Peter Xu

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 2:35 PM Jason Wang wrote: > > On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > > SC is required for some kernel features like vhost-vDPA. So this patch > > > implements basic SC feature. The idea is

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:35:18PM +0800, Jason Wang wrote: > On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > > SC is required for some kernel features like vhost-vDPA. So this patch > > > implements basic SC feature. The

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
On Mon, Feb 14, 2022 at 2:31 PM Peter Xu wrote: > > On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > > SC is required for some kernel features like vhost-vDPA. So this patch > > implements basic SC feature. The idea is pretty simple, for software > > emulated DMA it would be always

Re: [PATCH] intel_iommu: support snoop control

2022-02-13 Thread Peter Xu
On Mon, Feb 14, 2022 at 02:03:46PM +0800, Jason Wang wrote: > SC is required for some kernel features like vhost-vDPA. So this patch > implements basic SC feature. The idea is pretty simple, for software > emulated DMA it would be always coherent. In this case we can simple > advertise ECAP_SC

[PATCH] intel_iommu: support snoop control

2022-02-13 Thread Jason Wang
SC is required for some kernel features like vhost-vDPA. So this patch implements basic SC feature. The idea is pretty simple, for software emulated DMA it would be always coherent. In this case we can simple advertise ECAP_SC bit. For VFIO and vhost, thing will be more much complicated, so this