Re: [virtio-dev] Memory sharing device

2019-02-20 Thread Frank Yang
On Tue, Feb 19, 2019 at 10:25 PM Gerd Hoffmann wrote: > Hi, > > > > That might simlify pass-through of v4l2 host devices, but isn't > > > necessarily the best choice long-term. > > > Right, but if we're not emulating at the v4l2 api level, then it starts > > looking a lot > > like the proposed

Re: [virtio-dev] Memory sharing device

2019-02-20 Thread Frank Yang
On Tue, Feb 19, 2019 at 11:02 PM Gerd Hoffmann wrote: > > > > In general though, this means that the ideal usage of host pointers > would > > > > be to set a few regions up front for certain purposes, then share > that > > > out > > > > amongst other device contexts. This also facilitates

Re: [virtio-dev] Memory sharing device

2019-02-20 Thread Frank Yang
On Tue, Feb 19, 2019 at 10:52 PM Gerd Hoffmann wrote: > Hi, > > > However, dma-buf seems to require either a Linux kernel or a Linux host. > > Sure. They allow passing buffers from one linux driver to another > without copying the data. > > > Dma-bufs aren't also 1:1 with Vulkan host visible

Re: [virtio-dev] Memory sharing device

2019-02-20 Thread Frank Yang
On Wed, Feb 20, 2019 at 7:30 AM Frank Yang wrote: > > > On Tue, Feb 19, 2019 at 10:25 PM Gerd Hoffmann wrote: > >> Hi, >> >> > > That might simlify pass-through of v4l2 host devices, but isn't >> > > necessarily the best choice long-term. >&

Re: [virtio-dev] Memory sharing device

2019-02-20 Thread Frank Yang
On Tue, Feb 19, 2019 at 7:46 PM Michael S. Tsirkin wrote: > On Tue, Feb 19, 2019 at 07:54:04AM -0800, Frank Yang wrote: > > To update driver/device functionality, ideally we want to ship two small > shared > > libraries, > > one to guest userspace and one to plug in to t

Re: [virtio-dev] Memory sharing device

2019-02-24 Thread Frank Yang
On Fri, Feb 22, 2019 at 2:05 PM Michael S. Tsirkin wrote: > On Wed, Feb 13, 2019 at 11:15:12PM -0800, Frank Yang wrote: > > Revised the spec to clean up a straggling mention of callbacks, and > added a > > concrete example of how it would be used for a video codec. > > &

[virtio-dev] Re: [virtio-comment] [PATCH v2 0/3] Large shared memory regions

2019-03-05 Thread Frank Yang
On Fri, Feb 22, 2019 at 3:54 AM Dr. David Alan Gilbert (git) < dgilb...@redhat.com> wrote: > From: "Dr. David Alan Gilbert" > > Hi, > This series formalises the idea of shared memory regions I'd > previously discussed and is intended for use with virtio-fs. > > I've split it into three parts:

Re: [virtio-dev] Memory sharing device

2019-02-06 Thread Frank Yang
On Tue, Feb 5, 2019 at 11:03 PM Gerd Hoffmann wrote: > On Tue, Feb 05, 2019 at 01:06:42PM -0800, Roman Kiryanov wrote: > > Hi Dave, > > > > > In virtio-fs we have two separate stages: > > > a) A shared arena is setup (and that's what the spec Stefan pointed > to is about) - > > > it's

Re: [virtio-dev] Memory sharing device

2019-02-06 Thread Frank Yang
(Virtio-serial also doesn't seem like a good option due to specialization to console forwarding and having an encoded limit on the number of connections) On Wed, Feb 6, 2019 at 7:09 AM Frank Yang wrote: > > > On Tue, Feb 5, 2019 at 11:03 PM Gerd Hoffmann wrote: > >> On Tue,

Re: [virtio-dev] Memory sharing device

2019-02-06 Thread Frank Yang
On Wed, Feb 6, 2019 at 12:14 PM Dr. David Alan Gilbert wrote: > * Roman Kiryanov (r...@google.com) wrote: > > Hi Dave, > > > > > In virtio-fs we have two separate stages: > > > a) A shared arena is setup (and that's what the spec Stefan pointed > to is about) - > > > it's statically

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
In implementing a complete graphics system, shared memory objects may transcend device boundaries. Consider for example, Android and gralloc. The media codec versus the GPU rendering are commonly considered as separate devices, but they work better if operating on a common shared memory type

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 8:46 AM Dr. David Alan Gilbert wrote: > * Frank Yang (l...@google.com) wrote: > > Thanks Roman for the reply. Yes, we need sensors, sound, codecs, etc. as > > well. > > > > For general string passing, yes, perhaps virtio-vsock can be used.

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 11:15 AM Michael S. Tsirkin wrote: > On Tue, Feb 12, 2019 at 11:01:21AM -0800, Frank Yang wrote: > > > > > > > > On Tue, Feb 12, 2019 at 10:22 AM Michael S. Tsirkin > wrote: > > > > On Tue, Feb 12, 2019 at 07:56:58AM -0800,

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 10:22 AM Michael S. Tsirkin wrote: > On Tue, Feb 12, 2019 at 07:56:58AM -0800, Frank Yang wrote: > > Stepping back to standardization and portability concerns, it is also not > > necessarily desirable to use general pipes to do what we want, because &g

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 9:20 AM Frank Yang wrote: > > > On Tue, Feb 12, 2019 at 8:46 AM Dr. David Alan Gilbert < > dgilb...@redhat.com> wrote: > >> * Frank Yang (l...@google.com) wrote: >> > Thanks Roman for the reply. Yes, we need sensors, sound, codecs, etc.

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 11:06 AM Michael S. Tsirkin wrote: > On Tue, Feb 12, 2019 at 09:26:10AM -0800, Frank Yang wrote: > > BTW, the other unique aspect is that the ping messages allow a _host_ > pointer > > to serve as the lump of shared memory; > > then there is

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 8:02 PM Michael S. Tsirkin wrote: > On Tue, Feb 12, 2019 at 06:50:29PM -0800, Frank Yang wrote: > > > > > > On Tue, Feb 12, 2019 at 11:06 AM Michael S. Tsirkin > wrote: > > > > On Tue, Feb 12, 2019 at 09:26:10AM -0800, Frank

Re: [virtio-dev] Memory sharing device

2019-02-12 Thread Frank Yang
On Tue, Feb 12, 2019 at 8:19 PM Michael S. Tsirkin wrote: > On Tue, Feb 12, 2019 at 11:02:19PM -0500, Michael S. Tsirkin wrote: > > On Tue, Feb 12, 2019 at 06:50:29PM -0800, Frank Yang wrote: > > > > > > > > > On Tue, Feb 12, 2019 at 11:06 AM Michael S. Tsir

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Frank Yang
On Mon, Feb 18, 2019 at 11:12 PM Gerd Hoffmann wrote: > Hi, > > > slots by doing so. So for Vulkan, we rely on having one large host > visible > > region on the host that is a single region of host shared memory. That, > is > > then sub-allocated for the guest. So there is no Vulkan host

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Frank Yang
On Mon, Feb 18, 2019 at 11:54 PM Gerd Hoffmann wrote: > Hi, > > > As another example, consider camera / video playback. I've heard that the > > way to approach this > > is to build v4l2 and build a virtio-v4l2 layer underneath. > > That would be one option, yes. virtio-v4l2 is a pretty bad

Re: [virtio-dev] Memory sharing device

2019-02-11 Thread Frank Yang
On Mon, Feb 11, 2019 at 6:49 AM Michael S. Tsirkin wrote: > On Mon, Feb 04, 2019 at 11:42:25PM -0800, Roman Kiryanov wrote: > > Hi Gerd, > > > > > virtio-gpu specifically needs that to support vulkan and opengl > > > extensions for coherent buffers, which must be allocated by the host > gpu > >

Re: [virtio-dev] Memory sharing device

2019-02-11 Thread Frank Yang
andard way to send Shmid/offset/size to other devices, or have that be a standard struct in the hypervisor? On Mon, Feb 11, 2019 at 7:14 AM Frank Yang wrote: > > > On Mon, Feb 11, 2019 at 6:49 AM Michael S. Tsirkin wrote: > >> On Mon, Feb 04, 2019 at 11:42:25PM -0800, Roman

Re: [virtio-dev] Memory sharing device

2019-02-05 Thread Frank Yang
Hi all, I'm Frank who's been using Roman's goldfish address space driver for Vulkan host visible memory for the emulator. Some more in-depth replies inline. On Tue, Feb 5, 2019 at 2:04 AM Dr. David Alan Gilbert wrote: > * Roman Kiryanov (r...@google.com) wrote: > > Hi Gerd, > > > > >

Re: [virtio-dev] Memory sharing device

2019-02-05 Thread Frank Yang
On Tue, Feb 5, 2019 at 7:17 AM Frank Yang wrote: > Hi all, > > I'm Frank who's been using Roman's goldfish address space driver for > Vulkan host visible memory for the emulator. Some more in-depth replies > inline. > > On Tue, Feb 5, 2019 at 2:04 AM Dr. David Alan Gilbert

[virtio-dev] Re: [virtio-comment] [PATCH v2 0/3] Large shared memory regions

2019-06-17 Thread Frank Yang
Yup On Mon, Jun 17, 2019 at 11:38 AM Michael S. Tsirkin wrote: > On Tue, Mar 05, 2019 at 07:47:52AM -0800, Frank Yang wrote: > > > > > > On Fri, Feb 22, 2019 at 3:54 AM Dr. David Alan Gilbert (git) < > > dgilb...@redhat.com> wrote: > > > > F

[virtio-dev] Re: guest / host buffer sharing ...

2019-11-07 Thread Frank Yang
So I'm not really sure why people are having issues sharing buffers that live on the GPU. Doesn't that show up as some integer ID on the host, and some $GuestFramework (dmabuf, gralloc) ID on the guest, and it all works out due to maintaining the correspondence in your particular stack of virtual

Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-03 Thread Frank Yang
On Tue, Dec 3, 2019 at 1:33 AM Gerd Hoffmann wrote: > On Mon, Dec 02, 2019 at 09:24:31AM -0800, Frank Yang wrote: > > Interesting; what's the use case for this? > > Mostly reduce data copying. > > > Do we already have a mechanism > > to import memory to virtio-gpu

Re: [virtio-dev] [PATCH] [RFC RESEND] vdec: Add virtio video decode device specification

2019-10-17 Thread Frank Yang
On Wed, Oct 16, 2019 at 11:58 PM Tomasz Figa wrote: > On Mon, Oct 14, 2019 at 9:19 PM Gerd Hoffmann wrote: > > > > > > Well. I think before even discussing the protocol details we need a > > > > reasonable plan for buffer handling. I think using virtio-gpu > buffers > > > > should be an

Re: [virtio-dev] [PATCH] [RFC RESEND] vdec: Add virtio video decode device specification

2019-10-17 Thread Frank Yang
On Thu, Oct 17, 2019 at 8:00 AM Frank Yang wrote: > > > On Wed, Oct 16, 2019 at 11:58 PM Tomasz Figa wrote: > >> On Mon, Oct 14, 2019 at 9:19 PM Gerd Hoffmann wrote: >> > >> > > > Well. I think before even discussing the protocol details we need a &g

Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-02 Thread Frank Yang
Interesting; what's the use case for this? Do we already have a mechanism to import memory to virtio-gpu via importing a bo handle from somewhere else? On Thu, Nov 28, 2019 at 9:37 PM Gerd Hoffmann wrote: > On Thu, Nov 28, 2019 at 07:04:23PM +0100, Matti Moell wrote: > > Hi Gerd, > > > > I