Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-16 Thread Jason Wang
On Fri, Jan 14, 2022 at 8:59 PM Liu Yi L wrote: > > On 2022/1/14 15:22, Jason Wang wrote: > > On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: > >> > >> On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > Right, but I think you meant to do this only when scalable mode is > > d

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-14 Thread Liu Yi L
On 2022/1/14 15:22, Jason Wang wrote: On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: Right, but I think you meant to do this only when scalable mode is disabled. Yes IMHO it will definitely suite for !scalable case since that's ex

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-14 Thread Jason Wang
On Fri, Jan 14, 2022 at 3:45 PM Peter Xu wrote: > > On Fri, Jan 14, 2022 at 03:22:16PM +0800, Jason Wang wrote: > > On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: > > > > > > On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > > > > > Right, but I think you meant to do this only when

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-14 Thread Peter Xu
On Fri, Jan 14, 2022 at 03:22:16PM +0800, Jason Wang wrote: > On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: > > > > On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > > > > Right, but I think you meant to do this only when scalable mode is > > > > > disabled. > > > > > > > > Yes IM

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-14 Thread Jason Wang
On Fri, Jan 14, 2022 at 3:13 PM Peter Xu wrote: > > On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > > > Right, but I think you meant to do this only when scalable mode is > > > > disabled. > > > > > > Yes IMHO it will definitely suite for !scalable case since that's exactly > > >

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > > Right, but I think you meant to do this only when scalable mode is > > > disabled. > > > > Yes IMHO it will definitely suite for !scalable case since that's exactly > > what > > we did before. What I'm also wondering is even if sc

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Jason Wang
On Fri, Jan 14, 2022 at 11:31 AM Peter Xu wrote: > > On Fri, Jan 14, 2022 at 10:47:44AM +0800, Jason Wang wrote: > > > > 在 2022/1/13 下午1:06, Peter Xu 写道: > > > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > > > @@ -1725,11 +1780,16 @@ static bool > > > > vtd_do_iommu_translate(VT

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 10:47:44AM +0800, Jason Wang wrote: > > 在 2022/1/13 下午1:06, Peter Xu 写道: > > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > > @@ -1725,11 +1780,16 @@ static bool > > > vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, > > > cc_entry->c

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Jason Wang
在 2022/1/13 下午1:06, Peter Xu 写道: On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, cc_entry->context_cache_gen = s->context_cache_gen; } +/* Try to fetch slpte for

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-12 Thread Michael S. Tsirkin
On Thu, Jan 13, 2022 at 01:06:09PM +0800, Peter Xu wrote: > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace > > *vtd_as, PCIBus *bus, > > cc_entry->context_cache_gen = s->context_cache_gen; > >

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-12 Thread Peter Xu
On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace > *vtd_as, PCIBus *bus, > cc_entry->context_cache_gen = s->context_cache_gen; > } > > +/* Try to fetch slpte form IOTLB */ > +if ((pasid

[PATCH 3/3] intel-iommu: PASID support

2022-01-04 Thread Jason Wang
This patch introduce ECAP_PASID via "x-pasid-mode". Based on the existing support for scalable mode, we need to implement the following missing parts: 1) tag VTDAddressSpace with PASID and support IOMMU/DMA translation with PASID 2) tag IOTLB with PASID 3) PASID cache and its flush For simplic