Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-22 Thread Michael S. Tsirkin
On Tue, Sep 22, 2015 at 01:50:47PM +0200, Marc-André Lureau wrote: > hi > > On Tue, Sep 22, 2015 at 1:41 PM, Michael S. Tsirkin wrote: > > There's a single log at the moment: > > static struct vhost_log *vhost_log; > > > > But all devices are updated by the memory core, we don't > > have

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-22 Thread Marc-André Lureau
hi On Tue, Sep 22, 2015 at 1:41 PM, Michael S. Tsirkin wrote: > There's a single log at the moment: > static struct vhost_log *vhost_log; > > But all devices are updated by the memory core, we don't > have a list in the vhost code. Do you mean that all devices will have their memory list

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-22 Thread Michael S. Tsirkin
On Tue, Sep 22, 2015 at 01:01:03PM +0200, Marc-André Lureau wrote: > Hi > > On Tue, Sep 22, 2015 at 12:12 PM, Michael S. Tsirkin wrote: > >> But then it should also VHOST_SET_LOG_BASE all the other devices with > >> the new log, unless you want to tackle only the future log users. So > >> it need

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 22, 2015 at 12:12 PM, Michael S. Tsirkin wrote: >> But then it should also VHOST_SET_LOG_BASE all the other devices with >> the new log, unless you want to tackle only the future log users. So >> it needs to track all the users of the log. > > We already do this. > Same applies to

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-22 Thread Michael S. Tsirkin
On Mon, Sep 21, 2015 at 11:44:38PM +0200, Marc-André Lureau wrote: > Hi > > On Mon, Sep 21, 2015 at 9:29 PM, Michael S. Tsirkin wrote: > >> Can this be considered a future enhancement? > > > > What's the big issue? Just count the devices that need a shared one, if > > that count is 0 reallocate w

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-21 Thread Marc-André Lureau
Hi On Mon, Sep 21, 2015 at 9:29 PM, Michael S. Tsirkin wrote: >> Can this be considered a future enhancement? > > What's the big issue? Just count the devices that need a shared one, if > that count is 0 reallocate with shared == false. But then it should also VHOST_SET_LOG_BASE all the other d

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-21 Thread Michael S. Tsirkin
On Mon, Sep 21, 2015 at 10:02:02AM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > On Sat, Sep 19, 2015 at 12:11:58PM +0200, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > If the backend is of type VHOST_BACKEND_TYPE_USER, allocate > > > sh

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-21 Thread Marc-André Lureau
Hi - Original Message - > On Sat, Sep 19, 2015 at 12:11:58PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > If the backend is of type VHOST_BACKEND_TYPE_USER, allocate > > shareable memory. Next patch will only allocate when the backend > > has the required

Re: [Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-21 Thread Michael S. Tsirkin
On Sat, Sep 19, 2015 at 12:11:58PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > If the backend is of type VHOST_BACKEND_TYPE_USER, allocate > shareable memory. Next patch will only allocate when the backend > has the required feature. > > Note: vhost_log_get() can use

[Qemu-devel] [PATCH v4 07/22] vhost: alloc shareable log

2015-09-19 Thread marcandre . lureau
From: Marc-André Lureau If the backend is of type VHOST_BACKEND_TYPE_USER, allocate shareable memory. Next patch will only allocate when the backend has the required feature. Note: vhost_log_get() can use a global "vhost_log" that can be shared by several vhost devices. We may want instead a com