From: "hch@infradead.org" <hch@infradead.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Peng Fan <peng.fan@nxp.com>, "mst@redhat.com" <mst@redhat.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"hch@infradead.org" <hch@infradead.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
luto@kernel.org, jgross@suse.com, boris.ostrovsky@oracle.com
Subject: Re: [Xen-devel] [RFC] virtio_ring: check dma_mem for xen_domain
Date: Tue, 22 Jan 2019 23:12:32 -0800 [thread overview]
Message-ID: <20190123071232.GA20526@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1901221113410.17936@sstabellini-ThinkPad-X260>
On Tue, Jan 22, 2019 at 11:59:31AM -0800, Stefano Stabellini wrote:
> > if (!virtio_has_iommu_quirk(vdev))
> > return true;
> >
> > @@ -260,7 +262,7 @@ static bool vring_use_dma_api(struct virtio_device *vdev)
> > * the DMA API if we're a Xen guest, which at least allows
> > * all of the sensible Xen configurations to work correctly.
> > */
> > - if (xen_domain())
> > + if (xen_domain() && !dma_dev->dma_mem)
> > return true;
> >
> > return false;
>
> I can see you spotted a real issue, but this is not the right fix. We
> just need something a bit more flexible than xen_domain(): there are
> many kinds of Xen domains on different architectures, we basically want
> to enable this (return true from vring_use_dma_api) only when the xen
> swiotlb is meant to be used. Does the appended patch fix the issue you
> have?
The problem generally is the other way around - if dma_dev->dma_mem
is set the device decription in the device tree explicitly requires
using this memory, so we must _always_ use the DMA API.
The problem is just that that rproc driver absuses the DMA API
in horrible ways.
next prev parent reply other threads:[~2019-01-23 7:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 4:51 Peng Fan
2019-01-21 8:28 ` hch
2019-01-22 2:32 ` Peng Fan
2019-01-22 2:36 ` Michael S. Tsirkin
2019-01-22 19:59 ` [Xen-devel] " Stefano Stabellini
2019-01-23 2:57 ` Michael S. Tsirkin
2019-01-23 7:12 ` hch [this message]
2019-01-23 21:04 ` Stefano Stabellini
2019-01-23 21:14 ` hch
2019-01-23 23:43 ` Stefano Stabellini
2019-01-24 6:47 ` Peng Fan
2019-01-24 19:14 ` Stefano Stabellini
2019-01-24 20:34 ` Michael S. Tsirkin
2019-01-25 9:45 ` Peng Fan
2019-01-25 19:18 ` Stefano Stabellini
2019-01-28 8:00 ` hch
2019-01-29 9:26 ` Peng Fan
2019-01-24 6:42 ` Peng Fan
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=20190123071232.GA20526@infradead.org \
--to=hch@infradead.org \
--cc=boris.ostrovsky@oracle.com \
--cc=jasowang@redhat.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mst@redhat.com \
--cc=peng.fan@nxp.com \
--cc=sstabellini@kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®