Re: [Qemu-devel] [PATCH RFC 00/14] vhost-user: shutdown and reconnection

2016-03-27 Thread Tetsuya Mukawa
On 2016/03/28 10:53, Tetsuya Mukawa wrote: > On 2016/03/26 3:00, Marc-André Lureau wrote: >> Hi >> >> On Thu, Mar 24, 2016 at 8:10 AM, Yuanhan Liu >> wrote: >>>>> The following series starts from the idea that the slave can request a >>>>>

Re: [Qemu-devel] [PATCH RFC 00/14] vhost-user: shutdown and reconnection

2016-03-27 Thread Tetsuya Mukawa
On 2016/03/26 3:00, Marc-André Lureau wrote: > Hi > > On Thu, Mar 24, 2016 at 8:10 AM, Yuanhan Liu > wrote: The following series starts from the idea that the slave can request a "managed" shutdown instead and later recover (I guess the use case for this is to allow for example to u

Re: [Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2016-01-11 Thread Tetsuya Mukawa
On 2016/01/12 4:20, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Hi >> >> On Fri, Dec 4, 2015 at 3:55 PM, Tetsuya Mukawa wrote: >>>> What's the use case or test case? >>> One of example is userspace device driver like DPDK PMD. >&

[Qemu-devel] [PATCH v2] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-20 Thread Tetsuya Mukawa
negotiates vhost-user backend. v2: * Fixed typo. Signed-off-by: Tetsuya Mukawa --- exec.c | 10 ++ hw/misc/ivshmem.c | 9 +++-- include/exec/ram_addr.h | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 8718a75..7f0ce42

Re: [Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-07 Thread Tetsuya Mukawa
2015-12-07 20:31 GMT+09:00 Marc-André Lureau : > Hi > > On Fri, Dec 4, 2015 at 3:55 PM, Tetsuya Mukawa wrote: >>> What's the use case or test case? >> >> One of example is userspace device driver like DPDK PMD. >> Actually, I've found this fd relate

Re: [Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-04 Thread Tetsuya Mukawa
2015-12-04 22:20 GMT+09:00 Marc-André Lureau : > Hi > > On Fri, Dec 4, 2015 at 4:52 AM, Tetsuya Mukawa wrote: >> If virtio-net driver allocates memory in vishmem shared memory, > > s/vishmem/ivshmem Thanks, I will fix it. > > How can virtio-net allocate memory in ivs

[Qemu-devel] [PATCH] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-03 Thread Tetsuya Mukawa
negotiates vhost-user backend. Signed-off-by: Tetsuya Mukawa --- exec.c | 10 ++ hw/misc/ivshmem.c | 9 +++-- include/exec/ram_addr.h | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 0bf0a6e..908c4bf 100644 --- a/exec.c

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-07-21 Thread Tetsuya Mukawa
On 2015/07/19 21:48, Michael S. Tsirkin wrote: > On Wed, Jun 24, 2015 at 07:57:45AM +0200, Michael S. Tsirkin wrote: >> On Wed, Jun 24, 2015 at 02:46:30PM +0900, Tetsuya Mukawa wrote: >>> On 2015/06/23 18:41, Michael S. Tsirkin wrote: >>>> On Tue, Jun 23, 2015 at 05

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-24 Thread Tetsuya Mukawa
On 2015/06/24 14:57, Michael S. Tsirkin wrote: >> Also, if QEMU or the backend is closed unexpectedly, there is no way to >> recover without restarting both applications. > This was previously discussed: > https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00585.html > It

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-23 Thread Tetsuya Mukawa
On 2015/06/23 18:41, Michael S. Tsirkin wrote: > On Tue, Jun 23, 2015 at 05:31:06PM +0900, Tetsuya Mukawa wrote: >> On 2015/06/22 17:14, Michael S. Tsirkin wrote: >>> On Mon, Jun 22, 2015 at 12:50:43PM +0900, Tetsuya Mukawa wrote: >>>> Hi guys, >>>> >

Re: [Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-06-23 Thread Tetsuya Mukawa
On 2015/06/22 16:54, Michael S. Tsirkin wrote: > On Mon, Jun 22, 2015 at 12:50:46PM +0900, Tetsuya Mukawa wrote: >> When wrong vhost-user message are passed, the connection should be shutdown. >> >> Signed-off-by: Tetsuya Mukawa > This silently changes the protocol semanti

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-23 Thread Tetsuya Mukawa
On 2015/06/22 17:14, Michael S. Tsirkin wrote: > On Mon, Jun 22, 2015 at 12:50:43PM +0900, Tetsuya Mukawa wrote: >> Hi guys, >> >> Here are patches to add feature to start QEMU without vhost-user backend. >> Currently, if we want to use vhost-user backend, the backend mu

[Qemu-devel] [PATCH v2 5/5] vhost-user: Add new option to specify vhost-user backend supports

2015-06-21 Thread Tetsuya Mukawa
es 0x68000 Above log indicates the backend features QEMU should be passed. Signed-off-by: Tetsuya Mukawa --- hw/net/vhost_net.c | 6 +- hw/net/virtio-net.c| 15 +++ hw/scsi/vhost-scsi.c | 2 +- hw/virtio/vhost-user.c | 6 ++ hw/virt

[Qemu-devel] [PATCH v2 4/5] vhost-user: Enable 'nowait' and 'reconnect' option

2015-06-21 Thread Tetsuya Mukawa
The patch enables 'nowait' option for server mode, and 'reconnect' option for client mode. Signed-off-by: Tetsuya Mukawa --- net/vhost-user.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 8b7749a..58cd5dc 100644 --- a/ne

[Qemu-devel] [PATCH v2 3/5] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-06-21 Thread Tetsuya Mukawa
When wrong vhost-user message are passed, the connection should be shutdown. Signed-off-by: Tetsuya Mukawa --- hw/virtio/vhost-user.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index d6f2163..2215c39

[Qemu-devel] [PATCH v2 2/5] qemu-char: Add qemu_chr_disconnect to close a fd accepted by listen fd

2015-06-21 Thread Tetsuya Mukawa
The patch introduces qemu_chr_disconnect(). The function is used for closing a fd accepted by listen fd. Though we already have qemu_chr_delete(), but it closes not only accepted fd but also listen fd. This new function is used when we still want to keep listen fd. Signed-off-by: Tetsuya Mukawa

[Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-21 Thread Tetsuya Mukawa
- v1 changes from RFC patch The last patch of this series was changed like below. - Rebase to latest master. - Remove needless has_backend_feature variable. - Change user interface to be able to specify each feature by name. - Add (Since 2.4) to schema file. - Fix commit titl

[Qemu-devel] [PATCH v2 1/5] vhost-user: Add ability to know vhost-user backend disconnection

2015-06-21 Thread Tetsuya Mukawa
Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tetsuya Mukawa --- net

Re: [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features

2015-06-17 Thread Tetsuya Mukawa
On 2015/06/16 21:27, Eric Blake wrote: > On 05/28/2015 10:42 PM, Tetsuya Mukawa wrote: >> This patch adds below '-net' options to let QEMU know which features >> vhost-user backend will support. > [meta-comment: when posting a new revision of a series, do it as a new &g

Re: [Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend

2015-06-15 Thread Tetsuya Mukawa
On 2015/06/15 23:08, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:26PM +0900, Tetsuya Mukawa wrote: >>- Change user interface to be able to specify each feature by name. > I disagree with this change, the uint64_t backend_features option was > better because: >

Re: [Qemu-devel] [PATCH v1 3/4] vhost-user: Enable 'nowait' and 'reconnect' option

2015-06-15 Thread Tetsuya Mukawa
On 2015/06/15 22:58, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:29PM +0900, Tetsuya Mukawa wrote: >> The patch enables 'nowait' option for server mode, and 'reconnect' >> option for client mode. >> >> Signed-off-by: Tetsuya Mukawa &g

Re: [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features

2015-06-15 Thread Tetsuya Mukawa
On 2015/06/15 22:58, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:30PM +0900, Tetsuya Mukawa wrote: >> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c >> index 3af6faf..7fbb306 100644 >> --- a/hw/net/virtio-net.c >> +++ b/hw/net/virtio-net.c >>

Re: [Qemu-devel] [PATCH v1 2/4] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-06-15 Thread Tetsuya Mukawa
On 2015/06/15 22:40, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:28PM +0900, Tetsuya Mukawa wrote: >> When wrong vhost-user message are passed, the connection should be >> shutdown. >> >> Signed-off-by: Tetsuya Mukawa >> --- >> hw/virtio/vhost-us

Re: [Qemu-devel] [PATCH v1 1/4] vhost-user: Add ability to know vhost-user backend disconnection

2015-06-15 Thread Tetsuya Mukawa
On 2015/06/15 22:32, Stefan Hajnoczi wrote: > On Fri, May 29, 2015 at 01:42:27PM +0900, Tetsuya Mukawa wrote: >> Current QEMU cannot detect vhost-user backend disconnection. The >> patch adds ability to know it. >> To know disconnection, add watcher to detect G_IO_HUP event. W

Re: [Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend

2015-06-10 Thread Tetsuya Mukawa
On 2015/05/29 13:42, Tetsuya Mukawa wrote: > Hi guys, > > Here are patches to add feature to start QEMU without vhost-user backend. > Currently, if we want to use vhost-user backend, the backend must start before > QEMU. Also, if QEMU or the backend is closed unexpectedly, the

[Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features

2015-05-28 Thread Tetsuya Mukawa
et.h When connection between QEMU and the backend is established, QEMU checkes feature values of the backend to make sure the expected features are provided. If it doesn't, the connection will be closed by QEMU. Signed-off-by: Tetsuya Mukawa --- hw/net/vhost_net.c | 6 ++- hw/n

[Qemu-devel] [PATCH v1 3/4] vhost-user: Enable 'nowait' and 'reconnect' option

2015-05-28 Thread Tetsuya Mukawa
The patch enables 'nowait' option for server mode, and 'reconnect' option for client mode. Signed-off-by: Tetsuya Mukawa --- net/vhost-user.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 1967ff4..f823d78 100644 --- a/ne

[Qemu-devel] [PATCH v1 1/4] vhost-user: Add ability to know vhost-user backend disconnection

2015-05-28 Thread Tetsuya Mukawa
Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tetsuya Mukawa --- net

[Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend

2015-05-28 Thread Tetsuya Mukawa
re by name. - Add (Since 2.4) to schema file. - Fix commit title and body. Tetsuya Mukawa (4): vhost-user: Add ability to know vhost-user backend disconnection vhost-user: Shutdown vhost-user connection when wrong messages are passed vhost-user: Enable 'nowait' and '

[Qemu-devel] [PATCH v1 2/4] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-05-28 Thread Tetsuya Mukawa
When wrong vhost-user message are passed, the connection should be shutdown. Signed-off-by: Tetsuya Mukawa --- hw/virtio/vhost-user.c | 17 ++--- include/sysemu/char.h | 7 +++ qemu-char.c| 15 +++ 3 files changed, 32 insertions(+), 7 deletions(-) diff

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-28 Thread Tetsuya Mukawa
On 2015/05/28 10:25, Tetsuya Mukawa wrote: > On 2015/05/26 21:52, Eric Blake wrote: >> On 05/25/2015 10:29 PM, Tetsuya Mukawa wrote: >> >>>>>> { 'struct': 'NetdevTapOptions', >>>>>> @@ -2259,7 +2261,8 @@ >>>>>&

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-27 Thread Tetsuya Mukawa
On 2015/05/26 21:52, Eric Blake wrote: > On 05/25/2015 10:29 PM, Tetsuya Mukawa wrote: > >>>>> { 'struct': 'NetdevTapOptions', >>>>> @@ -2259,7 +2261,8 @@ >>>>> '*vhostfd':'str', >>&

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Tetsuya Mukawa
On 2015/05/26 11:46, Tetsuya Mukawa wrote: > Hi Eric, > > On 月, 2015-05-25 at 16:11 -0600, Eric Blake wrote: >> On 05/25/2015 01:28 AM, Tetsuya Mukawa wrote: >>> This patch adds 'backend_features' option for vhost-user backends. >>> If this option is

Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Tetsuya Mukawa
Hi Eric, On 月, 2015-05-25 at 16:11 -0600, Eric Blake wrote: > On 05/25/2015 01:28 AM, Tetsuya Mukawa wrote: > > This patch adds 'backend_features' option for vhost-user backends. > > If this option is specified, QEMU assumes vhost-user backends support > > the featu

[Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports

2015-05-25 Thread Tetsuya Mukawa
es 0x68000 Above log indicates the backend features QEMU should be passed. Signed-off-by: Tetsuya Mukawa --- hw/net/vhost_net.c | 9 - hw/net/virtio-net.c| 24 hw/scsi/vhost-scsi.c | 2 +- hw/virtio/vhost-user.c | 9 +++

[Qemu-devel] [RFC PATCH 2/4] vhost-user: Shutdown vhost-user connection when wrong messages are passed

2015-05-25 Thread Tetsuya Mukawa
When wrong vhost-user message are passed, the connection should be shutdown. Signed-off-by: Tetsuya Mukawa --- hw/virtio/vhost-user.c | 17 ++--- include/sysemu/char.h | 7 +++ qemu-char.c| 15 +++ 3 files changed, 32 insertions(+), 7 deletions(-) diff

[Qemu-devel] [RFC PATCH 3/4] vhost-user: Enable 'nowait' and 'reconnect' option

2015-05-25 Thread Tetsuya Mukawa
The patch enables 'nowait' option for server mode, and 'reconnect' option for client mode. Signed-off-by: Tetsuya Mukawa --- net/vhost-user.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 55c05a5..d31fc41 100644 --- a/ne

[Qemu-devel] [RFC PATCH 1/4] vhost-user: Add ability to know vhost-user backend disconnection

2015-05-25 Thread Tetsuya Mukawa
Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tetsuya Mukawa --- net

[Qemu-devel] [RFC PATCH 0/4] Add feature to start QEMU without vhost-user backend

2015-05-25 Thread Tetsuya Mukawa
make sure the expected features are provided. If it doesn't, the connection will be closed by QEMU. Regards, Tetsuya Tetsuya Mukawa (4): vhost-user: Add ability to know vhost-user backend disconnection vhost-user: Shutdown vhost-user connection when wrong messages are passed

Re: [Qemu-devel] [PATCH] vhost-user: Add ability to know vhost-user backend disconnection

2015-04-22 Thread Tetsuya Mukawa
On 2015/04/22 5:19, Nikolay Nikolaev wrote: > On Tue, Apr 21, 2015 at 9:36 AM, Tetsuya Mukawa wrote: >> Current QEMU cannot detect vhost-user backend disconnection. The >> patch adds ability to know it. >> To know disconnection, add watcher to detect G_IO_HUP event. When

[Qemu-devel] [PATCH] vhost-user: Add ability to know vhost-user backend disconnection

2015-04-21 Thread Tetsuya Mukawa
Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tetsuya Mukawa --- net