All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Srujana Challa <schalla@marvell.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	Vamsi Krishna Attunuru <vattunuru@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>, eperezma <eperezma@redhat.com>
Subject: RE: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices
Date: Wed, 10 Apr 2024 12:34:53 +0000	[thread overview]
Message-ID: <DS0PR18MB5368C21CDDE827AA2A496510A0062@DS0PR18MB5368.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20240410071350-mutt-send-email-mst@kernel.org>

> Subject: Re: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell
> OCTEON DPU devices
> 
> On Wed, Apr 10, 2024 at 10:15:37AM +0000, Srujana Challa wrote:
> > > > > > +
> > > > > > +       domain = iommu_get_domain_for_dev(dev);
> > > > > > +       if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY) {
> > > > > > +               dev_info(dev, "NO-IOMMU\n");
> > > > > > +               octep_vdpa_ops.set_map = octep_vdpa_set_map;
> > > > >
> > > > > Is this a shortcut to have get better performance? DMA API
> > > > > should have those greacefully I think.
> > > > When IOMMU is disabled on host and set_map/dma_map is not set,
> > > > vhost-vdpa is reporting an error "Failed to allocate domain,
> > > > device is not
> > > IOMMU cache coherent capable\n".
> > > > Hence we are doing this way to get better performance.
> > >
> > > The problem is, assuming the device does not have any internal IOMMU.
> > >
> > > 1) If we allow it running without IOMMU, it opens a window for guest
> > > to attack the host.
> > > 2) If you see perforamnce issue with IOMMU_DOMAIN_IDENTITY, let's
> > > report it to DMA/IOMMU maintiner to fix that
> > It will be helpful for host networking case when iommu is disabled.
> > Can we take the vfio pci driver approach as a reference where user
> > explicitly set "enable_unsafe_noiommu_mode" using module param?
> 
> vfio is a userspace driver so it's userspace's responsibility.
> what exactly ensures correctness here? does the device have an on-chip
> iommu?
>
Our device features an on-chip IOMMU, although it is not utilized for host-side
targeted DMA operations. We included no-iommu mode in our driver to ensure
that host applications, such as DPDK Virtio user PMD, continue to function even
when operating in a no-IOMMU mode. We observed performance impacts on
certain low-end x86 machines when IOMMU mode was enabled.
I think, correctness is Host userspace application's responsibility, in this case
when vhost-vdpa is used with Host application such as DPDK Virtio user PMD.
 
> > >
> > > Thanks
> >
> > Thanks.
> >


  reply	other threads:[~2024-04-10 12:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 11:21 [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices Srujana Challa
2024-03-29  4:28 ` Jason Wang
2024-03-29 12:34   ` [EXTERNAL] " Srujana Challa
2024-03-31 11:31     ` Michael S. Tsirkin
2024-04-07  3:24       ` Jason Wang
2024-04-07  3:34     ` Jason Wang
2024-04-10 10:15       ` Srujana Challa
2024-04-10 11:19         ` Michael S. Tsirkin
2024-04-10 12:34           ` Srujana Challa [this message]
2024-04-11  6:01             ` Jason Wang
2024-04-12  5:12               ` Srujana Challa
2024-04-12  6:41                 ` Jason Wang
2024-04-12  9:48                   ` Srujana Challa
2024-04-15  6:49                     ` Jason Wang
2024-04-15 12:42                       ` Srujana Challa
2024-04-16  3:17                         ` Jason Wang
2024-04-22 20:42                           ` Michael S. Tsirkin
2024-04-24 13:05                             ` Srujana Challa
2024-04-23  5:40                           ` Srujana Challa
2024-04-11  5:59         ` Jason Wang
2024-03-29 11:37 ` Stefano Garzarella
2024-03-29 13:02   ` [EXTERNAL] " Srujana Challa
2024-03-29 13:19     ` Stefano Garzarella
2024-04-10 12:40       ` Srujana Challa
2024-04-22 20:44 ` Michael S. Tsirkin
2024-04-24 19:08 ` [PATCH v2] " Srujana Challa
2024-04-25  1:57   ` Jason Wang
2024-04-25  9:36   ` 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=DS0PR18MB5368C21CDDE827AA2A496510A0062@DS0PR18MB5368.namprd18.prod.outlook.com \
    --to=schalla@marvell.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jerinj@marvell.com \
    --cc=mst@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=sthotton@marvell.com \
    --cc=vattunuru@marvell.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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.