Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-11 Thread Sinan Kaya
On 2/11/2019 2:15 PM, Raj, Ashok wrote: It seems rather odd we have to check for ATS version. I always assumed unspecified bits (Reserved) must be 0. We only check this if ATS is enabled, and this particular bit wasn't given away for another feature. Is it really required to check for ATS versi

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-11 Thread sathyanarayanan kuppuswamy
On 2/11/19 11:15 AM, Raj, Ashok wrote: On Fri, Feb 08, 2019 at 11:49:55PM -0500, Sinan Kaya wrote: On 2/8/2019 8:02 PM, sathyanarayanan kuppuswamy wrote: This means that you should probably have some kind of version check here. There is no version field in ATS v1.0 spec. Also, If I follow th

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-11 Thread Raj, Ashok
On Fri, Feb 08, 2019 at 11:49:55PM -0500, Sinan Kaya wrote: > On 2/8/2019 8:02 PM, sathyanarayanan kuppuswamy wrote: > >>This means that you should probably have some kind of version check > >>here. > > > >There is no version field in ATS v1.0 spec. Also, If I follow the history > >log in PCI spec,

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-08 Thread Sinan Kaya
On 2/8/2019 8:02 PM, sathyanarayanan kuppuswamy wrote: This means that you should probably have some kind of version check here. There is no version field in ATS v1.0 spec. Also, If I follow the history log in PCI spec, I think ATS if first added at v1.2. Please correct me if I am wrong. v1

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-08 Thread sathyanarayanan kuppuswamy
On 2/7/19 5:58 PM, Sinan Kaya wrote: On 2/7/2019 5:16 PM, sathyanarayanan kuppuswamy wrote: If I remember this right, aligned request is only supported on ATS v1.1 but not supported on v1.0. Its added in v1.1. This means that you should probably have some kind of version check here. Ther

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread Sinan Kaya
On 2/7/2019 5:16 PM, sathyanarayanan kuppuswamy wrote: If I remember this right, aligned request is only supported on ATS v1.1 but not supported on v1.0. Its added in v1.1. This means that you should probably have some kind of version check here.

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread sathyanarayanan kuppuswamy
On 2/7/19 12:38 PM, Sinan Kaya wrote: On 2/7/2019 1:41 PM, sathyanarayanan.kuppusw...@linux.intel.com wrote: + * As per PCI spec, If page aligned request bit is set, it indicates + * the untranslated address is always aligned to a 4096 byte boundary. + */ +int pci_ats_page_aligned(struct pci_

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread sathyanarayanan kuppuswamy
On 2/7/19 12:07 PM, Bjorn Helgaas wrote: Hi Kuppuswamy, Previous changes to ats.c used subject lines starting with just "PCI:". I think it does make sense to include "ATS", but please do it in the way we do it for other PCI features, e.g., PCI/ATS: Add pci_ats_page_aligned() interface Go

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread Sinan Kaya
On 2/7/2019 1:41 PM, sathyanarayanan.kuppusw...@linux.intel.com wrote: + * As per PCI spec, If page aligned request bit is set, it indicates + * the untranslated address is always aligned to a 4096 byte boundary. + */ +int pci_ats_page_aligned(struct pci_dev *pdev) +{ + u16 cap; + +

Re: [PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread Bjorn Helgaas
Hi Kuppuswamy, Previous changes to ats.c used subject lines starting with just "PCI:". I think it does make sense to include "ATS", but please do it in the way we do it for other PCI features, e.g., PCI/ATS: Add pci_ats_page_aligned() interface On Thu, Feb 07, 2019 at 10:41:13AM -0800, sathy

[PATCH v1 1/2] PCI: ATS: Add function to check ATS page aligned request status.

2019-02-07 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan Add a new function to return the status of ATS page aligned request bit in ATS capability register. This function will be used by drivers like IOMMU, if it is required to enforce page-aligned requests in ATS. Cc: Ashok Raj Cc: Jacob Pan Cc: Keith Busch Suggest