xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: jgross@suse.com, Peng Fan <peng.fan@nxp.com>,
	x86@kernel.org, konrad.wilk@oracle.com, jasowang@redhat.com,
	"Michael S. Tsirkin" <mst@redhat.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	iommu@lists.linux-foundation.org, linux-imx@nxp.com,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] xen: introduce xen_vring_use_dma
Date: Wed, 1 Jul 2020 14:34:56 +0100	[thread overview]
Message-ID: <20200701133456.GA23888@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2006291621300.8121@sstabellini-ThinkPad-T480s>

On Mon, Jun 29, 2020 at 04:46:09PM -0700, Stefano Stabellini wrote:
> > I could imagine some future Xen hosts setting a flag somewhere in the
> > platform capability saying "no xen specific flag, rely on
> > "VIRTIO_F_ACCESS_PLATFORM". Then you set that accordingly in QEMU.
> > How about that?
> 
> Yes, that would be fine and there is no problem implementing something
> like that when we get virtio support in Xen. Today there are still no
> virtio interfaces provided by Xen to ARM guests (no virtio-block/net,
> etc.)
> 
> In fact, in both cases we are discussing virtio is *not* provided by
> Xen; it is a firmware interface to something entirely different:
> 
> 1) virtio is used to talk to a remote AMP processor (RPMesg)
> 2) virtio is used to talk to a secure-world firmware/OS (Trusty)
>
> VIRTIO_F_ACCESS_PLATFORM is not set by Xen in these cases but by RPMesg
> and by Trusty respectively. I don't know if Trusty should or should not
> set VIRTIO_F_ACCESS_PLATFORM, but I think Linux should still work
> without issues.
> 

Any virtio implementation that is not in control of the memory map
(aka not the hypervisor) absolutely must set VIRTIO_F_ACCESS_PLATFORM,
else it is completely broken.

> The xen_domain() check in Linux makes it so that vring_use_dma_api
> returns the opposite value on native Linux compared to Linux as Xen/ARM
> DomU by "accident". By "accident" because there is no architectural
> reason why Linux Xen/ARM DomU should behave differently compared to
> native Linux in this regard.
> 
> I hope that now it is clearer why I think the if (xen_domain()) check
> needs to be improved anyway, even if we fix generic dma_ops with virtio
> interfaces missing VIRTIO_F_ACCESS_PLATFORM.

IMHO that Xen quirk should never have been added in this form..


  reply	other threads:[~2020-07-01 13:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24  9:17 [PATCH] xen: introduce xen_vring_use_dma Peng Fan
2020-06-24  9:06 ` Michael S. Tsirkin
2020-06-24 17:59   ` Stefano Stabellini
2020-06-24 20:47     ` Michael S. Tsirkin
2020-06-24 21:53       ` Stefano Stabellini
2020-06-24 22:16         ` Michael S. Tsirkin
2020-06-25 17:31           ` Stefano Stabellini
2020-06-26 15:32             ` Michael S. Tsirkin
2020-06-29  3:05               ` Peng Fan
2020-06-29  6:21                 ` Michael S. Tsirkin
2020-06-29  6:25                   ` Peng Fan
2020-06-29  6:33                     ` Michael S. Tsirkin
2020-06-29  6:35                       ` Peng Fan
2020-06-29 23:49                 ` Stefano Stabellini
2020-06-30  1:40                   ` Peng Fan
2020-06-29 23:46               ` Stefano Stabellini
2020-07-01 13:34                 ` Christoph Hellwig [this message]
2020-07-01 17:34                   ` Stefano Stabellini
2020-07-01 20:47                     ` Michael S. Tsirkin
2020-07-01 21:23                     ` Michael S. Tsirkin
2020-07-10 17:23                       ` Stefano Stabellini
2020-07-11 18:44                         ` Michael S. Tsirkin
2020-07-15 17:06                           ` Stefano Stabellini
2020-07-13  1:53                         ` Peng Fan
2020-06-29  3:00             ` 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=20200701133456.GA23888@infradead.org \
    --to=hch@infradead.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jasowang@redhat.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=peng.fan@nxp.com \
    --cc=sstabellini@kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).