All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, stevensd@chromium.org,
	marcheu@chromium.org, zachr@chromium.org, keiichiw@chromium.org,
	posciak@chromium.org
Subject: Re: [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API
Date: Thu, 12 Sep 2019 14:38:21 +0200	[thread overview]
Message-ID: <20190912123821.rraib5entkcxt5p5@sirius.home.kraxel.org> (raw)
In-Reply-To: <20190912094121.228435-1-tfiga@chromium.org>

  Hi,

> To seamlessly enable buffer sharing with drivers using such frameworks,
> make the virtio-gpu driver expose the resource handle as the DMA address
> of the buffer returned from the DMA-buf mapping operation.  Arguably, the
> resource handle is a kind of DMA address already, as it is the buffer
> identifier that the device needs to access the backing memory, which is
> exactly the same role a DMA address provides for native devices.

No.  A scatter list has guest dma addresses, period.  Stuffing something
else into a scatterlist is asking for trouble, things will go seriously
wrong when someone tries to use such a fake scatterlist as real scatterlist.

Also note that "the DMA address of the buffer" is bonkers in virtio-gpu
context.  virtio-gpu resources are not required to be physically
contigous in memory, so typically you actually need a scatter list to
describe them.

cheers,
  Gerd


  parent reply	other threads:[~2019-09-12 12:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  9:41 [RFC PATCH] drm/virtio: Export resource handles via DMA-buf API Tomasz Figa
2019-09-12 12:38 ` Gerd Hoffmann
2019-09-12 12:38 ` Gerd Hoffmann [this message]
2019-09-12 14:04   ` Tomasz Figa
2019-09-13  8:07     ` Gerd Hoffmann
2019-09-13  8:07     ` Gerd Hoffmann
2019-09-13  8:31       ` Tomasz Figa
2019-09-13 11:05         ` Gerd Hoffmann
2019-09-13 11:05         ` Gerd Hoffmann
2019-09-19 11:41           ` Keiichi Watanabe
2019-09-17 13:23 ` Daniel Vetter
2019-09-17 13:23 ` Daniel Vetter
2019-10-05  5:41   ` Tomasz Figa
2019-10-05  5:41     ` Tomasz Figa
2019-10-08 10:03     ` Daniel Vetter
2019-10-08 10:03     ` Daniel Vetter
2019-10-08 10:49       ` Tomasz Figa
2019-10-08 15:04         ` Daniel Vetter
2019-10-16  3:19           ` Tomasz Figa
2019-10-16  6:12             ` Gerd Hoffmann
2019-10-16  6:12             ` Gerd Hoffmann
2019-10-16  6:12               ` Gerd Hoffmann
2019-10-16  8:27               ` Tomasz Figa
2019-10-16  9:18             ` Daniel Vetter
2019-10-16  9:18             ` Daniel Vetter
2019-10-16 10:31               ` Tomasz Figa
2019-10-08 15:04         ` Daniel Vetter

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=20190912123821.rraib5entkcxt5p5@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keiichiw@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcheu@chromium.org \
    --cc=posciak@chromium.org \
    --cc=stevensd@chromium.org \
    --cc=tfiga@chromium.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zachr@chromium.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.