Re: [PATCH RFC v1 03/11] iommu/virtio: Handle incoming page faults

2021-10-11 Thread Vivek Kumar Gautam
Hi Jean, On 10/11/21 2:46 PM, Jean-Philippe Brucker wrote: Hi Vivek, On Mon, Oct 11, 2021 at 01:41:15PM +0530, Vivek Gautam wrote: + list_for_each_entry(ep, >endpoints, list) { + if (ep->eid == endpoint) { + vdev = ep->vdev; I have a question here though

Re: [PATCH RFC v1 01/11] uapi/virtio-iommu: Add page request grp-id and flags information

2021-09-30 Thread Vivek Kumar Gautam
On 9/30/21 2:19 PM, Jean-Philippe Brucker wrote: On Thu, Sep 30, 2021 at 10:26:35AM +0530, Vivek Kumar Gautam wrote: I'm not sure why we made it 32-bit in Linux UAPI, it's a little wasteful. PCIe PRGI is 9-bits and SMMU STAG is 16-bits. Since the scope of the grpid is the endpoint, 16-bit

Re: [PATCH RFC v1 08/11] iommu/arm-smmu-v3: Implement shared context alloc and free ops

2021-09-30 Thread Vivek Kumar Gautam
Hi Jean, On 9/21/21 9:37 PM, Jean-Philippe Brucker wrote: On Fri, Apr 23, 2021 at 03:21:44PM +0530, Vivek Gautam wrote: Implementing the alloc_shared_cd and free_shared_cd in cd-lib, and start using them for arm-smmu-v3-sva implementation. Signed-off-by: Vivek Gautam ---

Re: [PATCH RFC v1 10/11] uapi/virtio-iommu: Add a new request type to send page response

2021-09-30 Thread Vivek Kumar Gautam
Hi Jean, On 9/21/21 9:46 PM, Jean-Philippe Brucker wrote: On Fri, Apr 23, 2021 at 03:21:46PM +0530, Vivek Gautam wrote: Once the page faults are handled, the response has to be sent to virtio-iommu backend, from where it can be sent to the host to prepare the response to a generated io page

Re: [PATCH RFC v1 02/11] iommu/virtio: Maintain a list of endpoints served by viommu_dev

2021-09-30 Thread Vivek Kumar Gautam
On 9/21/21 9:29 PM, Jean-Philippe Brucker wrote: On Fri, Apr 23, 2021 at 03:21:38PM +0530, Vivek Gautam wrote: Keeping a record of list of endpoints that are served by the virtio-iommu device would help in redirecting the requests of page faults to the correct endpoint device to handle such

Re: [PATCH RFC v1 01/11] uapi/virtio-iommu: Add page request grp-id and flags information

2021-09-29 Thread Vivek Kumar Gautam
Hi Jean, On 9/21/21 9:28 PM, Jean-Philippe Brucker wrote: Hi Vivek, Thanks a lot for your work on this Thanks a lot for taking a look at it. I hope that most of the changes in this series and the nested page table series [1] are independent of the presently on-going /dev/iommu proposal,

Re: [PATCH v15 00/12] SMMUv3 Nested Stage Setup (IOMMU part)

2021-04-21 Thread Vivek Kumar Gautam
Hi Eric, On 4/11/21 4:42 PM, Eric Auger wrote: SMMUv3 Nested Stage Setup (IOMMU part) [snip] Eric Auger (12): iommu: Introduce attach/detach_pasid_table API iommu: Introduce bind/unbind_guest_msi iommu/smmuv3: Allow s1 and s2 configs to coexist iommu/smmuv3: Get prepared for

Re: [PATCH RFC v1 15/15] iommu/virtio: Update fault type and reason info for viommu fault

2021-04-06 Thread Vivek Kumar Gautam
On 3/29/21 9:53 PM, Jean-Philippe Brucker wrote: On Fri, Mar 12, 2021 at 06:39:05PM +0530, Vivek Kumar Gautam wrote: To complete the page request we would also need to send the response back to the host from virtio backend when handling page request. So the virtio command should also

Re: [PATCH RFC v1 13/15] iommu/virtio: Attach Arm PASID tables when available

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:55 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:40PM +0530, Vivek Gautam wrote: [...] +static int viommu_setup_pgtable(struct viommu_endpoint *vdev, + struct viommu_domain *vdomain) +{ + int ret, id; + u32 asid; +

Re: [PATCH RFC v1 15/15] iommu/virtio: Update fault type and reason info for viommu fault

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:55 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:42PM +0530, Vivek Gautam wrote: Fault type information can tell about a page request fault or an unreceoverable fault, and further additions to fault reasons and the related PASID information can help in handling

Re: [PATCH RFC v1 09/15] iommu/virtio: Update table format probing header

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:51 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:36PM +0530, Vivek Gautam wrote: Add info about asid_bits and additional flags to table format probing header. Signed-off-by: Vivek Gautam Cc: Joerg Roedel Cc: Will Deacon Cc: Michael S. Tsirkin Cc: Robin

Re: [PATCH RFC v1 08/15] iommu: Add asid_bits to arm smmu-v3 stage1 table info

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:48 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:35PM +0530, Vivek Gautam wrote: aisd_bits data is required to prepare stage-1 tables for arm-smmu-v3. Signed-off-by: Vivek Gautam Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Cc: Jean-Philippe Brucker

Re: [PATCH RFC v1 06/15] iommu/virtio: Add headers for table format probing

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:47 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:33PM +0530, Vivek Gautam wrote: From: Jean-Philippe Brucker Add required UAPI defines for probing table format for underlying iommu hardware. The device may provide information about hardware tables and

Re: [PATCH RFC v1 05/15] iommu/arm-smmu-v3: Set sync op from consumer driver of cd-lib

2021-03-12 Thread Vivek Kumar Gautam
On 3/3/21 10:45 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:32PM +0530, Vivek Gautam wrote: Te change allows different consumers of arm-smmu-v3-cd-lib to set their respective sync op for pasid entries. Signed-off-by: Vivek Gautam Cc: Joerg Roedel Cc: Will Deacon Cc:

Re: [PATCH RFC v1 02/15] iommu: Add a simple PASID table library

2021-03-12 Thread Vivek Kumar Gautam
Hi Jean, On 3/3/21 10:41 PM, Jean-Philippe Brucker wrote: Hi Vivek, Thanks again for working on this. I have a few comments but it looks sensible overall. Thanks a lot for reviewing the patch-series. Please find my responses inline below. Regarding the overall design, I was initially

Re: [PATCH RFC v1 04/15] iommu/arm-smmu-v3: Update CD base address info for user-space

2021-03-12 Thread Vivek Kumar Gautam
Hi Jean, On 3/3/21 10:44 PM, Jean-Philippe Brucker wrote: On Fri, Jan 15, 2021 at 05:43:31PM +0530, Vivek Gautam wrote: Update base address information in vendor pasid table info to pass that to user-space for stage1 table management. Signed-off-by: Vivek Gautam Cc: Joerg Roedel Cc: Will

Re: [PATCH RFC v1 12/15] iommu/virtio: Add support for INVALIDATE request

2021-03-03 Thread Vivek Kumar Gautam
Hi Jacob, Kevin, On 3/4/21 11:28 AM, Tian, Kevin wrote: From: Jacob Pan Sent: Thursday, March 4, 2021 2:29 AM Hi Vivek, On Fri, 15 Jan 2021 17:43:39 +0530, Vivek Gautam wrote: From: Jean-Philippe Brucker Add support for tlb invalidation ops that can send invalidation requests to

Re: [PATCH 2/2] iommu: arm-smmu-v3: Report domain nesting info reuqired for stage1

2021-03-03 Thread Vivek Kumar Gautam
Hi Eric, On 2/12/21 11:43 PM, Auger Eric wrote: Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: Update nested domain information required for stage1 page table. s/reuqired/required in the commit title My bad! Will correct it. Signed-off-by: Vivek Gautam ---

Re: [PATCH 1/2] iommu: Report domain nesting info for arm-smmu-v3

2021-03-03 Thread Vivek Kumar Gautam
Hi Eric, On 2/12/21 11:43 PM, Auger Eric wrote: Hi Vivek, On 2/12/21 11:58 AM, Vivek Gautam wrote: Add a vendor specific structure for domain nesting info for arm smmu-v3, and necessary info fields required to populate stage1 page tables. Signed-off-by: Vivek Gautam ---

Re: [PATCH v7 02/16] iommu/smmu: Report empty domain nesting info

2021-02-12 Thread Vivek Kumar Gautam
Hi Eric, On 2/12/21 3:48 PM, Vivek Kumar Gautam wrote: Hi Eric, On 2/12/21 3:27 PM, Auger Eric wrote: Hi Vivek, Yi, On 2/12/21 8:14 AM, Vivek Gautam wrote: Hi Yi, On Sat, Jan 23, 2021 at 2:29 PM Liu, Yi L wrote: Hi Eric, From: Auger Eric Sent: Tuesday, January 19, 2021 6:03 PM Hi

Re: [PATCH v7 02/16] iommu/smmu: Report empty domain nesting info

2021-02-12 Thread Vivek Kumar Gautam
Hi Eric, On 2/12/21 3:27 PM, Auger Eric wrote: Hi Vivek, Yi, On 2/12/21 8:14 AM, Vivek Gautam wrote: Hi Yi, On Sat, Jan 23, 2021 at 2:29 PM Liu, Yi L wrote: Hi Eric, From: Auger Eric Sent: Tuesday, January 19, 2021 6:03 PM Hi Yi, Vivek, [...] I see. I think there needs a change

Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-25 Thread Vivek Kumar Gautam
Hi Shameer, On 1/22/21 9:19 PM, Shameerali Kolothum Thodi wrote: Hi Vivek, -Original Message- From: Vivek Kumar Gautam [mailto:vivek.gau...@arm.com] Sent: 21 January 2021 17:34 To: Auger Eric ; linux-ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; iommu@lists.linux

Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-21 Thread Vivek Kumar Gautam
Hi Eric, On 1/19/21 2:33 PM, Auger Eric wrote: Hi Vivek, On 1/15/21 1:13 PM, Vivek Gautam wrote: This patch-series aims at enabling Nested stage translation in guests using virtio-iommu as the paravirtualized iommu. The backend is supported with Arm SMMU-v3 that provides nested stage-1 and