All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Nanyong Sun <sunnanyong@huawei.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.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: Thu, 23 Mar 2023 09:20:44 -0300	[thread overview]
Message-ID: <ZBxEHFF9p4wtfcQv@nvidia.com> (raw)
In-Reply-To: <b2c24e31-a708-8556-0029-93c0aa22a6ef@huawei.com>

On Thu, Mar 23, 2023 at 08:15:44PM +0800, Nanyong Sun wrote:
> On 2023/3/23 19:31, Jason Gunthorpe wrote:
> 
> > On Thu, Mar 23, 2023 at 05:22:36PM +0800, Nanyong Sun wrote:
> > > > A patch to export that function is alread posted:
> > > > 
> > > > https://lore.kernel.org/linux-iommu/BN9PR11MB52760E9705F2985EACCD5C4A8CBA9@BN9PR11MB5276.namprd11.prod.outlook.com/T/#u
> > > > 
> > > > But I do not want VDPA to mis-use it unless it also implements all the
> > > > ownership stuff properly.
> > > > 
> > > I want to confirm if we need to introduce iommu group logic to vdpa, as "all
> > > the ownership stuff" ?
> > You have to call iommu_device_claim_dma_owner()
> > 
> > But again, this is all pointless, iommufd takes are of all of this and
> > VDPA should switch to it instead of more hacking.
> > 
> > Jason
> > .
> Yeah,  thanks for your suggestion,but as Michael and Jason Wang said,
> before iommufd is ready, we may need to make vDPA work well on software
> managed MSI platforms.
> To achieve that, basically we have two ways:
> 
> 1. export iommu_get_resv_regions, and get regions device by device.
> 2. introduce iommu group, get regions by iommu_get_group_resv_regions, which
> already exported.

I do not think you should dig the hole deeper. If proper iommu
support is important to you then you should invest in iommufd
conversion.

Jason

  reply	other threads:[~2023-03-23 12:20 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
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 [this message]
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=ZBxEHFF9p4wtfcQv@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jasowang@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lulu@redhat.com \
    --cc=mst@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.