From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Nanyong Sun <sunnanyong@huawei.com>,
joro@8bytes.org, will@kernel.org, robin.murphy@arm.com,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, wangrong68@huawei.com,
Cindy Lu <lulu@redhat.com>
Subject: Re: [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
Date: Fri, 10 Mar 2023 03:41:36 -0500 [thread overview]
Message-ID: <20230310034101-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEsVBhxtpUFs7TrQzAecO8kK_NR+b1EvD2H7MjJ+2aEKJw@mail.gmail.com>
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@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@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
Hmm 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
> >
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Cindy Lu <lulu@redhat.com>,
kvm@vger.kernel.org, Nanyong Sun <sunnanyong@huawei.com>,
will@kernel.org, joro@8bytes.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, iommu@lists.linux.dev,
Jason Gunthorpe <jgg@nvidia.com>,
netdev@vger.kernel.org, robin.murphy@arm.com,
wangrong68@huawei.com
Subject: Re: [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
Date: Fri, 10 Mar 2023 03:41:36 -0500 [thread overview]
Message-ID: <20230310034101-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEsVBhxtpUFs7TrQzAecO8kK_NR+b1EvD2H7MjJ+2aEKJw@mail.gmail.com>
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@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@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
Hmm 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
> >
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-03-10 8:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 12:08 [PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI Nanyong Sun
2023-02-13 12:22 ` Michael S. Tsirkin
2023-02-13 12:22 ` Michael S. Tsirkin
2023-02-15 11:48 ` Michael S. Tsirkin
2023-02-15 11:48 ` Michael S. Tsirkin
2023-02-16 12:11 ` Nanyong Sun
2023-02-16 4:43 ` Jason Wang
2023-02-16 4:43 ` Jason Wang
2023-02-16 12:10 ` Nanyong Sun
2023-02-17 0:14 ` Jason Gunthorpe
2023-02-17 5:35 ` Jason Wang
2023-02-17 5:35 ` Jason Wang
2023-02-17 10:11 ` Michael S. Tsirkin
2023-02-17 10:11 ` Michael S. Tsirkin
2023-02-20 2:36 ` Jason Wang
2023-02-20 2:36 ` Jason Wang
2023-02-20 15:24 ` Michael S. Tsirkin
2023-02-20 15:24 ` Michael S. Tsirkin
2023-02-17 10:12 ` Michael S. Tsirkin
2023-02-17 10:12 ` Michael S. Tsirkin
2023-02-17 12:43 ` Jason Gunthorpe
2023-02-20 2:37 ` Jason Wang
2023-02-20 2:37 ` Jason Wang
2023-03-10 8:41 ` Michael S. Tsirkin [this message]
2023-03-10 8:41 ` Michael S. Tsirkin
2023-03-10 9:45 ` Jason Wang
2023-03-10 9:45 ` Jason Wang
2023-03-10 9:53 ` Michael S. Tsirkin
2023-03-10 9:53 ` Michael S. Tsirkin
2023-03-10 12:36 ` Jason Gunthorpe
2023-03-23 9:22 ` Nanyong Sun
2023-03-23 11:31 ` Jason Gunthorpe
2023-03-23 12:15 ` Nanyong Sun
2023-03-23 12:20 ` Jason Gunthorpe
2023-06-02 12:11 ` Michael S. Tsirkin
2023-06-02 12:11 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230310034101-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jasowang@redhat.com \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lulu@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=sunnanyong@huawei.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wangrong68@huawei.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.