Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Jacob Pan
On Wed, 15 May 2019 16:52:46 +0100 Jean-Philippe Brucker wrote: > On 14/05/2019 18:55, Jacob Pan wrote: > > Yes, I agree to replace the standalone __64 pasid with this struct. > > Looks more inline with address selective info., Just to double > > confirm the new struct. > > > > Jean, will you

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Jean-Philippe Brucker
On 14/05/2019 18:55, Jacob Pan wrote: > Yes, I agree to replace the standalone __64 pasid with this struct. > Looks more inline with address selective info., Just to double confirm > the new struct. > > Jean, will you put this in your sva/api repo? Yes, I pushed it along with some documentation

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Jean-Philippe Brucker
On 15/05/2019 15:47, Tian, Kevin wrote: >> From: Jean-Philippe Brucker >> Sent: Wednesday, May 15, 2019 7:04 PM >> >> On 14/05/2019 18:44, Jacob Pan wrote: >>> Hi Thank you both for the explanation. >>> >>> On Tue, 14 May 2019 11:41:24 +0100 >>> Jean-Philippe Brucker wrote: >>> On 14/05/2019

RE: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Wednesday, May 15, 2019 7:04 PM > > On 14/05/2019 18:44, Jacob Pan wrote: > > Hi Thank you both for the explanation. > > > > On Tue, 14 May 2019 11:41:24 +0100 > > Jean-Philippe Brucker wrote: > > > >> On 14/05/2019 08:36, Auger Eric wrote: > >>> Hi Jacob, >

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Jean-Philippe Brucker
On 14/05/2019 18:44, Jacob Pan wrote: > Hi Thank you both for the explanation. > > On Tue, 14 May 2019 11:41:24 +0100 > Jean-Philippe Brucker wrote: > >> On 14/05/2019 08:36, Auger Eric wrote: >>> Hi Jacob, >>> >>> On 5/14/19 12:16 AM, Jacob Pan wrote: On Mon, 13 May 2019 18:09:48 +0100

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Jacob Pan
On Tue, 14 May 2019 10:44:01 -0700 Jacob Pan wrote: > Hi Thank you both for the explanation. > > On Tue, 14 May 2019 11:41:24 +0100 > Jean-Philippe Brucker wrote: > > > On 14/05/2019 08:36, Auger Eric wrote: > > > Hi Jacob, > > > > > > On 5/14/19 12:16 AM, Jacob Pan wrote: > > >> On

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Jacob Pan
On Tue, 14 May 2019 13:02:47 +0200 Auger Eric wrote: > Hi Jean, > > On 5/14/19 12:42 PM, Jean-Philippe Brucker wrote: > > On 14/05/2019 08:46, Auger Eric wrote: > >> Hi Jean, > >> > >> On 5/13/19 7:09 PM, Jean-Philippe Brucker wrote: > >>> On 13/05/2019 17:50, Auger Eric wrote: > >

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Jacob Pan
Hi Thank you both for the explanation. On Tue, 14 May 2019 11:41:24 +0100 Jean-Philippe Brucker wrote: > On 14/05/2019 08:36, Auger Eric wrote: > > Hi Jacob, > > > > On 5/14/19 12:16 AM, Jacob Pan wrote: > >> On Mon, 13 May 2019 18:09:48 +0100 > >> Jean-Philippe Brucker wrote: > >> > >>>

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Auger Eric
Hi Jean, On 5/14/19 12:42 PM, Jean-Philippe Brucker wrote: > On 14/05/2019 08:46, Auger Eric wrote: >> Hi Jean, >> >> On 5/13/19 7:09 PM, Jean-Philippe Brucker wrote: >>> On 13/05/2019 17:50, Auger Eric wrote: > struct iommu_inv_pasid_info { > #define IOMMU_INV_PASID_FLAGS_PASID (1

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Jean-Philippe Brucker
On 14/05/2019 08:36, Auger Eric wrote: > Hi Jacob, > > On 5/14/19 12:16 AM, Jacob Pan wrote: >> On Mon, 13 May 2019 18:09:48 +0100 >> Jean-Philippe Brucker wrote: >> >>> On 13/05/2019 17:50, Auger Eric wrote: > struct iommu_inv_pasid_info { > #define IOMMU_INV_PASID_FLAGS_PASID (1

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Auger Eric
Hi Jean, On 5/13/19 7:09 PM, Jean-Philippe Brucker wrote: > On 13/05/2019 17:50, Auger Eric wrote: >>> struct iommu_inv_pasid_info { >>> #define IOMMU_INV_PASID_FLAGS_PASID (1 << 0) >>> #define IOMMU_INV_PASID_FLAGS_ARCHID(1 << 1) >>> __u32 flags; >>> __u32 archid; >>>

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-14 Thread Auger Eric
Hi Jacob, On 5/14/19 12:16 AM, Jacob Pan wrote: > On Mon, 13 May 2019 18:09:48 +0100 > Jean-Philippe Brucker wrote: > >> On 13/05/2019 17:50, Auger Eric wrote: struct iommu_inv_pasid_info { #define IOMMU_INV_PASID_FLAGS_PASID(1 << 0) #define IOMMU_INV_PASID_FLAGS_ARCHID

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-13 Thread Jacob Pan
On Mon, 13 May 2019 18:09:48 +0100 Jean-Philippe Brucker wrote: > On 13/05/2019 17:50, Auger Eric wrote: > >> struct iommu_inv_pasid_info { > >> #define IOMMU_INV_PASID_FLAGS_PASID(1 << 0) > >> #define IOMMU_INV_PASID_FLAGS_ARCHID (1 << 1) > >>__u32 flags; > >>__u32

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-13 Thread Jean-Philippe Brucker
On 13/05/2019 17:50, Auger Eric wrote: >> struct iommu_inv_pasid_info { >> #define IOMMU_INV_PASID_FLAGS_PASID (1 << 0) >> #define IOMMU_INV_PASID_FLAGS_ARCHID (1 << 1) >> __u32 flags; >> __u32 archid; >> __u64 pasid; >> }; > I agree it does the job now. However it looks a

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-13 Thread Auger Eric
Hi Jean-Philippe, On 5/13/19 1:20 PM, Jean-Philippe Brucker wrote: > Hi Eric, > > On 13/05/2019 10:14, Auger Eric wrote: >> I noticed my qemu integration was currently incorrectly using PASID >> invalidation for ASID based invalidation (SMMUV3 Stage1 CMD_TLBI_NH_ASID >> invalidation command). So

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-13 Thread Jean-Philippe Brucker
Hi Eric, On 13/05/2019 10:14, Auger Eric wrote: > I noticed my qemu integration was currently incorrectly using PASID > invalidation for ASID based invalidation (SMMUV3 Stage1 CMD_TLBI_NH_ASID > invalidation command). So I think we also need ARCHID invalidation. > Sorry for the late notice. >>

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-13 Thread Auger Eric
Hi Jacob, Jean-Philippe, On 5/4/19 12:32 AM, Jacob Pan wrote: > From: "Liu, Yi L" > > In any virtualization use case, when the first translation stage > is "owned" by the guest OS, the host IOMMU driver has no knowledge > of caching structure updates unless the guest invalidation activities >

[PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-03 Thread Jacob Pan
From: "Liu, Yi L" In any virtualization use case, when the first translation stage is "owned" by the guest OS, the host IOMMU driver has no knowledge of caching structure updates unless the guest invalidation activities are trapped by the virtualizer and passed down to the host. Since the