Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Gerd Hoffmann
> > > 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 sharing the memory > > > between guest processes, which is useful for imple

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Gerd Hoffmann
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 memory pointers, > or v4l2 codec buffers, or ffmpeg codec buffers, etc

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Gerd Hoffmann
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 virtio-hostmem; there's a common pattern of > direct access to host me

Re: [virtio-dev] Re: [PATCH v2 1/4] virtio-blk: document data[] size constraints

2019-02-19 Thread Michael S. Tsirkin
On Mon, Feb 18, 2019 at 02:04:20PM +, Stefan Hajnoczi wrote: > On Mon, Feb 18, 2019 at 08:22:00AM +0100, Jan Kiszka wrote: > > On 31.01.19 05:14, Michael S. Tsirkin wrote: > > > On Thu, Jan 31, 2019 at 10:36:14AM +0800, Stefan Hajnoczi wrote: > > > > The struct virtio_blk_req->data[] field is a

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Michael S. Tsirkin
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 the host VMM. I don't think we want to support that last in QEMU. Generally you want process

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 pointe

Re: [virtio-dev] Memory sharing device

2019-02-19 Thread Frank Yang
On Mon, Feb 18, 2019 at 11:18 PM Gerd Hoffmann wrote: > On Tue, Feb 12, 2019 at 08:17:13AM -0800, Frank Yang wrote: > > In implementing a complete graphics system, shared memory objects may > > transcend device boundaries. > > > > Consider for example, Android and gralloc. The media codec versus

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 nam

Re: [virtio-dev] RFC: Doorbell suppression, packed-ring mode and hardware offload

2019-02-19 Thread Michael S. Tsirkin
On Tue, Feb 19, 2019 at 02:33:04PM +0800, Jason Wang wrote: > > On 2019/2/14 下午12:04, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2019 at 11:34:22AM +0800, Jason Wang wrote: > > > On 2019/2/14 上午1:30, Michael S. Tsirkin wrote: > > > > On Wed, Feb 13, 2019 at 06:33:50PM +0800, Jason Wang wrote: >

Re: [virtio-dev] RFC: Doorbell suppression, packed-ring mode and hardware offload

2019-02-19 Thread Michael S. Tsirkin
On Tue, Feb 19, 2019 at 02:21:01PM +0800, Jason Wang wrote: > > On 2019/2/15 下午12:23, Michael S. Tsirkin wrote: > > On Fri, Feb 15, 2019 at 11:59:55AM +0800, Jason Wang wrote: > > > On 2019/2/14 上午11:41, Michael S. Tsirkin wrote: > > > > > I think it's as simple as increase the avail idx by X? Sin