Re: [RFC v1 5/8] mshv: add paravirtualized IOMMU support

2021-08-10 Thread Wei Liu
On Wed, Aug 04, 2021 at 12:13:42PM +0530, Praveen Kumar wrote: > On 04-08-2021 03:17, Wei Liu wrote: > >>> +static size_t hv_iommu_unmap(struct iommu_domain *d, unsigned long iova, > >>> +size_t size, struct iommu_iotlb_gather *gather) > >>> +{ > >>> + size_t unmapped; > >>> +

Re: [RFC v1 5/8] mshv: add paravirtualized IOMMU support

2021-08-04 Thread Praveen Kumar
On 04-08-2021 03:17, Wei Liu wrote: >>> +static size_t hv_iommu_unmap(struct iommu_domain *d, unsigned long iova, >>> + size_t size, struct iommu_iotlb_gather *gather) >>> +{ >>> + size_t unmapped; >>> + struct hv_iommu_domain *domain = to_hv_iommu_domain(d); >>> +

Re: [RFC v1 5/8] mshv: add paravirtualized IOMMU support

2021-08-03 Thread Wei Liu
On Wed, Aug 04, 2021 at 12:10:45AM +0530, Praveen Kumar wrote: > On 09-07-2021 17:13, Wei Liu wrote: > > +static void hv_iommu_domain_free(struct iommu_domain *d) > > +{ > > + struct hv_iommu_domain *domain = to_hv_iommu_domain(d); > > + unsigned long flags; > > + u64 status; > > + struct

Re: [RFC v1 5/8] mshv: add paravirtualized IOMMU support

2021-08-03 Thread Praveen Kumar
On 09-07-2021 17:13, Wei Liu wrote: > +static void hv_iommu_domain_free(struct iommu_domain *d) > +{ > + struct hv_iommu_domain *domain = to_hv_iommu_domain(d); > + unsigned long flags; > + u64 status; > + struct hv_input_delete_device_domain *input; > + > + if

[RFC v1 5/8] mshv: add paravirtualized IOMMU support

2021-07-09 Thread Wei Liu
Microsoft Hypervisor provides a set of hypercalls to manage device domains. Implement a type-1 IOMMU using those hypercalls. Implement DMA remapping as the first step for this driver. Interrupt remapping will come in a later stage. Signed-off-by: Wei Liu --- drivers/iommu/Kconfig| 14