Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-13 Thread Peter Xu
On Wed, Apr 12, 2023 at 03:35:10PM +0800, Jason Wang wrote: > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into > account when calculating iotlb hash like: > > static guint vtd_iotlb_hash(gconstpointer v) > { > const struct vtd_iotlb_key *key = v; > > return key->gfn | ((

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-13 Thread Alex Bennée
Jason Wang writes: > On Wed, Apr 12, 2023 at 4:43 PM Alex Bennée wrote: >> >> >> Jason Wang writes: >> >> > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into >> > account when calculating iotlb hash like: >> > >> > static guint vtd_iotlb_hash(gconstpointer v) >> > { >> >

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-12 Thread Jason Wang
On Wed, Apr 12, 2023 at 4:43 PM Alex Bennée wrote: > > > Jason Wang writes: > > > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into > > account when calculating iotlb hash like: > > > > static guint vtd_iotlb_hash(gconstpointer v) > > { > > const struct vtd_iotlb_key *key = v

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-12 Thread Alex Bennée
Jason Wang writes: > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into > account when calculating iotlb hash like: > > static guint vtd_iotlb_hash(gconstpointer v) > { > const struct vtd_iotlb_key *key = v; > > return key->gfn | ((key->sid) << VTD_IOTLB_SID_SHIFT) | >

[PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-12 Thread Jason Wang
Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into account when calculating iotlb hash like: static guint vtd_iotlb_hash(gconstpointer v) { const struct vtd_iotlb_key *key = v; return key->gfn | ((key->sid) << VTD_IOTLB_SID_SHIFT) | (key->level) << VTD_IOTLB_LVL