Jason Wang
2023-Feb-20 02:37 UTC
[PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
On Fri, Feb 17, 2023 at 8:43 PM Jason Gunthorpe <jgg at nvidia.com> wrote:> > On Fri, Feb 17, 2023 at 05:12:29AM -0500, Michael S. Tsirkin wrote: > > On Thu, Feb 16, 2023 at 08:14:50PM -0400, Jason Gunthorpe wrote: > > > On Tue, Feb 07, 2023 at 08:08:43PM +0800, Nanyong Sun wrote: > > > > From: Rong Wang <wangrong68 at huawei.com> > > > > > > > > Once enable iommu domain for one device, the MSI > > > > translation tables have to be there for software-managed MSI. > > > > Otherwise, platform with software-managed MSI without an > > > > irq bypass function, can not get a correct memory write event > > > > from pcie, will not get irqs. > > > > The solution is to obtain the MSI phy base address from > > > > iommu reserved region, and set it to iommu MSI cookie, > > > > then translation tables will be created while request irq. > > > > > > Probably not what anyone wants to hear, but I would prefer we not add > > > more uses of this stuff. It looks like we have to get rid of > > > iommu_get_msi_cookie() :\ > > > > > > I'd like it if vdpa could move to iommufd not keep copying stuff from > > > it.. > > > > Absolutely but when is that happening? > > Don't know, I think it has to come from the VDPA maintainers, Nicolin > made some drafts but wasn't able to get it beyond that.Cindy (cced) will carry on the work. Thanks> > Please have people who need more iommu platform enablement to pick it > up instead of merging hacks like this.. > > We are very close to having nested translation on ARM so anyone who is > serious about VDPA on ARM is going to need iommufd anyhow. > > Jason >
Michael S. Tsirkin
2023-Mar-10 08:41 UTC
[PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
On Mon, Feb 20, 2023 at 10:37:18AM +0800, Jason Wang wrote:> On Fri, Feb 17, 2023 at 8:43 PM Jason Gunthorpe <jgg at nvidia.com> wrote: > > > > On Fri, Feb 17, 2023 at 05:12:29AM -0500, Michael S. Tsirkin wrote: > > > On Thu, Feb 16, 2023 at 08:14:50PM -0400, Jason Gunthorpe wrote: > > > > On Tue, Feb 07, 2023 at 08:08:43PM +0800, Nanyong Sun wrote: > > > > > From: Rong Wang <wangrong68 at huawei.com> > > > > > > > > > > Once enable iommu domain for one device, the MSI > > > > > translation tables have to be there for software-managed MSI. > > > > > Otherwise, platform with software-managed MSI without an > > > > > irq bypass function, can not get a correct memory write event > > > > > from pcie, will not get irqs. > > > > > The solution is to obtain the MSI phy base address from > > > > > iommu reserved region, and set it to iommu MSI cookie, > > > > > then translation tables will be created while request irq. > > > > > > > > Probably not what anyone wants to hear, but I would prefer we not add > > > > more uses of this stuff. It looks like we have to get rid of > > > > iommu_get_msi_cookie() :\ > > > > > > > > I'd like it if vdpa could move to iommufd not keep copying stuff from > > > > it.. > > > > > > Absolutely but when is that happening? > > > > Don't know, I think it has to come from the VDPA maintainers, Nicolin > > made some drafts but wasn't able to get it beyond that. > > Cindy (cced) will carry on the work. > > ThanksHmm didn't see anything yet. Nanyong Sun maybe you can take a look?> > > > Please have people who need more iommu platform enablement to pick it > > up instead of merging hacks like this.. > > > > We are very close to having nested translation on ARM so anyone who is > > serious about VDPA on ARM is going to need iommufd anyhow. > > > > Jason > >
Possibly Parallel Threads
- [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
- [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
- [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
- [RFC v1 0/8] vhost-vdpa: add support for iommufd
- [PATCH 0/8] Let iommufd charge IOPTE allocations to the memory cgroup