From: "Michael S. Tsirkin" <mst@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
Halil Pasic <pasic@linux.ibm.com>,
stefanha@redhat.com, pbonzini@redhat.com, jasowang@redhat.com,
pasic@linux.vnet.ibm.com, virtio-dev@lists.oasis-open.org,
dan.daly@intel.com, cunming.liang@intel.com,
zhihong.wang@intel.com
Subject: Re: [virtio-dev] Re: [RFC] content: tweak VIRTIO_F_IO_BARRIER
Date: Mon, 27 Aug 2018 14:36:46 -0400 [thread overview]
Message-ID: <20180827133424-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180716110419.GA27375@debian>
On Mon, Jul 16, 2018 at 07:04:19PM +0800, Tiwei Bie wrote:
> > > > So, do we still consider VIRTIO_F_IO_BARRIER useful with its current
> > > > definition? Do we need to clarify assumptions, start afresh, or add a
> > > > new feature? This is not clear to me from the discussion.
> > >
> > > The discussion is to talk about how to fix the potential
> > > problems that currently may happen when the virtio devices
> > > (which need to bypass the IOMMU) work on the platforms
> > > (which have DMA limitations).
> > >
> > > Currently,
> > >
> > > - IO_BARRIER is just to tell drivers which type of barriers
> > > should be used.
> > >
> > > - IOMMU_PLATFORM (from my understanding) is to tell drivers
> > > whether the devices need to bypass the IOMMU.
> > >
> > > Michael is asking whether we should tweak above two bits
> > > or whether we should do something else to solve this problem.
> > >
> > > If we want to tweak above two bits, they may become
> > > something like:
> > >
> > > - PLATFORM_CACHE (from IO_BARRIER): about the memory
> > > operations visibility between driver and device.
>
> Should the driver always try to determine device's
> DMA-coherence in the platform specific way?
Point is, some systems don't have any PV interfaces
besides virtio. These need a virtio way to discover
coherence as long as we don't emulate the more expensive
platform specific one.
> > >
> > > - PLATFORM_IOMMU (from IOMMU_PLATFORM):
> >
> > I'm not sure we necessarily need to swap the name
> > around like that.
> >
> > > about whether
> > > the DMA addr passed to the device should be prepared
> > > (because e.g. the device is behind an IOMMU, or the
> > > device can only access parts of system memory).
>
> For the case that device can only access parts of system
> memory, if we need virtio device to support this, it seems
> that we also need to provide a way for virtio driver to
> know the inaccessible memory range?
I guess at this point people seem to be happy with
a platform-specific way to discover this.
> >
> > Maybe we want to also include the case where device IO
> > addresses don't match physical addresses (e.g. include
> > an offset).
> >
> >
>
> It seems that above idea doesn't fix all the problems,
> e.g. the case mentioned by Jason, that virtio driver
> cannot use swiotlb (which is transparent to the device)
> when the IOMMU_PLATFORM bit isn't offered by the device.
Right so is this a real use-case?
Are there platforms where
- it is hard to make virtio appear not behind an iommu
- iommu can not support a passthrough mode
- virtio addressing needs to be limited
--
MST
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2018-08-27 18:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 12:24 [virtio-dev] [RFC] content: tweak VIRTIO_F_IO_BARRIER Tiwei Bie
2018-06-25 16:07 ` Halil Pasic
2018-06-25 17:42 ` Michael S. Tsirkin
2018-06-25 18:40 ` Halil Pasic
2018-06-25 21:27 ` Michael S. Tsirkin
2018-06-26 13:48 ` Halil Pasic
2018-06-25 19:19 ` [virtio-dev] " Michael S. Tsirkin
2018-06-26 13:47 ` Halil Pasic
2018-06-26 18:19 ` Tiwei Bie
2018-06-26 18:39 ` Michael S. Tsirkin
2018-06-27 16:08 ` Cornelia Huck
2018-06-28 8:52 ` Tiwei Bie
2018-06-28 12:56 ` Jason Wang
2018-06-29 4:21 ` Michael S. Tsirkin
2018-06-29 6:11 ` Jason Wang
2018-06-29 4:20 ` Michael S. Tsirkin
2018-07-16 11:04 ` Tiwei Bie
2018-08-27 18:36 ` Michael S. Tsirkin [this message]
2018-07-01 3:23 ` 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=20180827133424-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=cohuck@redhat.com \
--cc=cunming.liang@intel.com \
--cc=dan.daly@intel.com \
--cc=jasowang@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
--cc=tiwei.bie@intel.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=zhihong.wang@intel.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.