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

2015-04-21 Thread Nikolay Nikolaev
_t buf[1]; > + > +qemu_chr_fe_read_all(s->chr, buf, sizeof(buf)); So you read the date from the buffer and just discard it? Are you going to miss messages this way? Please clarify. regards, Nikolay Nikolaev > +return FALSE; > +} > + > static void net_vhost_user_event

Re: [Qemu-devel] [PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt

2015-04-08 Thread Nikolay Nikolaev
d verifying MSIs going through as > expected. Christofer, have you measured the network performance difference with KVM. Probably the next patchseries (with IRQFD) makes bigger difference. In any case, sharing some numbers will be great. Thanks. regards, Nikolay Nikolaev > > Christoffer Da

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v2] vhost-user: add multi queue support

2015-04-08 Thread Nikolay Nikolaev
On Mon, Apr 6, 2015 at 6:07 PM, Michael S. Tsirkin wrote: > > On Sat, Jan 24, 2015 at 02:22:29PM +0200, Nikolay Nikolaev wrote: > > Vhost-user will implement the multiqueueu support in a similar way to what > > multiqueue > > > vhost already has - a separate thread

Re: [Qemu-devel] [Question] about vhost user Interface

2015-02-26 Thread Nikolay Nikolaev
msix check for vhost user interface and > > successfully > > install the guest os by pxe. > > > > Is it OK to do like this and will it cause other problems? > > > > > > > > Thanks. > > > > Haifeng Gao > > > > I think we shou

Re: [Qemu-devel] [dpdk-dev] [RFC PATCH v2 10/14] vhost user support

2015-01-28 Thread Nikolay Nikolaev
lt; memory.nregions; idx++) { >> + regions[idx].guest_phys_address = >> + memory.regions[idx].guest_phys_addr; >> + regions[idx].guest_phys_address_end = >> + memory.regions[idx].guest_phys_addr + >> +

[Qemu-devel] [PATCH v2] vhost-user: add multi queue support

2015-01-24 Thread Nikolay Nikolaev
info_str when bringing up/down the backend Signed-off-by: Nikolay Nikolaev --- docs/specs/vhost-user.txt |5 + hw/virtio/vhost-user.c|6 +- net/vhost-user.c | 39 +-- qapi-schema.json |6 +- qemu-options.hx

Re: [Qemu-devel] [snabb-devel] Re: [PATCH] vhost-user: multiqueue support

2015-01-22 Thread Nikolay Nikolaev
On Wed, Jan 21, 2015 at 4:25 PM, Michael S. Tsirkin wrote: > > On Sat, Dec 06, 2014 at 06:52:56PM +0200, Nikolay Nikolaev wrote: > > Vhost-user will implement the multiqueueu support in a similar way to what > > vhost already has - a separate thread for each queue. > >

[Qemu-devel] [PATCH] vhost-user: multiqueue support

2014-12-06 Thread Nikolay Nikolaev
Vhost-user will implement the multiqueueu support in a similar way to what vhost already has - a separate thread for each queue. To enable multiquue funcionality - a new command line parameter "queues" is introduced for the vhost-user netdev. Signed-off-by: Nikolay Nikolaev ---

Re: [Qemu-devel] Vhost-user - multi queue support

2014-12-03 Thread Nikolay Nikolaev
://github.com/SnabbCo/qemu/commit/f41eeccf4ab6ea5970e2941ce2de0aae893b10f9 > > > This patch was developed by VirtualOpenSystems for snabbswitch. We're plannig to send the patch to the qemu devel list by the end of this week. regards, Nikolay NIkolaev > Are there any current plans to pull

Re: [Qemu-devel] [PATCH] vhost-user: fix mmap offset calculation

2014-11-02 Thread Nikolay Nikolaev
Hello, I can confirm the issue, and this patch fixes it for me. Thanks. regards, Nikolay Nikolaev Virtual Open Systems On Sun, Nov 2, 2014 at 8:01 PM, Michael S. Tsirkin wrote: > qemu_get_ram_block_host_ptr should get ram_addr_t, > vhost-user passes in GPA. > That's very wrong.

Re: [Qemu-devel] WiFi inside VMs?

2014-10-02 Thread Nikolay Nikolaev
heoretically provide the connection between two WiFi devices > inside a simulated topology. > > > Even if such a feature's usefulness is only limited to GNS3, that's still > IMHO a great deal of usefulness, and therefore it should be a worthy goal to > pursue. > > So... Plase? Pretty please? :-) > > Thanks, > Regards, > Vasil Rangelov > > regards, Nikolay Nikolaev Virtual Open Systems

Re: [Qemu-devel] the userspace process vapp mmap filed // [PULL 13/37] vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message

2014-09-10 Thread Nikolay Nikolaev
memory? We don't see such. We're working on commercial deployment of qemu/vhost-user/snabbswitch and it works well with our tests. regards, Nikolay Nikolaev Virtual Open Systems > -Original Message- > From: Nikolay Nikolaev [mailto:n.nikol...@virtualopensystems.com] >

Re: [Qemu-devel] the userspace process vapp mmap filed // [PULL 13/37] vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message

2014-09-09 Thread Nikolay Nikolaev
software switch implementation can be discussed at a custom commercial level. regards, Nikolay Nikolaev Virtual Open Systems On Tue, Sep 9, 2014 at 3:28 PM, linhafieng wrote: > > > > Forwarded Message > Subject: Re: the userspace process vapp mmap filed //[Qemu-devel]

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Nikolay Nikolaev
On Wed, Aug 13, 2014 at 12:10 PM, Nikolay Nikolaev wrote: > On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev > wrote: >> >> Hello, >> >> >> On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: >> > >> > Hi all, >> > >>

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Nikolay Nikolaev
On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev wrote: > > Hello, > > > On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: > > > > Hi all, > > > > Is anyone there can tell the current status of vhost-net on kvm-arm? > > > > Half a year has passed

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-12 Thread Nikolay Nikolaev
to think that it all can be put together and rebased + the recent irqfd work. One can achiev even better performance (because of the irqfd). > > > > > > ___ > kvmarm mailing list > kvm...@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm regards, Nikolay Nikolaev Virtual Open Systems

Re: [Qemu-devel] [PATCH v2 1/2 for-2.1] vhost-user: Fix VHOST_SET_MEM_TABLE processing

2014-07-12 Thread Nikolay Nikolaev
On Sat, Jul 12, 2014 at 4:42 AM, Nikolay Nikolaev wrote: > > qemu_get_ram_fd doesn't accept a guest physical address. ram_addr_t are > opaque values that are assigned in qemu_ram_alloc. > > Find the ram_addr_t corresponding to the userspace_addr using > qemu_ram_addr_fro

[Qemu-devel] [PATCH v2 2/2 for-2.1] qtest: Adapt vhost-user-test to latehs vhost-user changes

2014-07-11 Thread Nikolay Nikolaev
A new field mmap_offset was added in the vhost-user message, we need to reflect this change in the test too. Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user

[Qemu-devel] [PATCH v2 1/2 for-2.1] vhost-user: Fix VHOST_SET_MEM_TABLE processing

2014-07-11 Thread Nikolay Nikolaev
qemu_get_ram_fd doesn't accept a guest physical address. ram_addr_t are opaque values that are assigned in qemu_ram_alloc. Find the ram_addr_t corresponding to the userspace_addr using qemu_ram_addr_from_host, and then call qemu_get_ram_fd on it. Thanks to Paolo Bonzini Signed-off-by: Ni

[Qemu-devel] [PATCH v2 0/2 for-2.1] vhost-user fixes

2014-07-11 Thread Nikolay Nikolaev
using qemu_ram_addr_from_host first. Thanks to Paolo Bonzini for poinitng the real problem. The related vhost-user qtest is also updated to reflect the changes in vhost-user message structures. Changes since v1: - dropped the patches 1 and 2 and just fixed the "real issue" --- Nikolay Nikolaev

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 18/18] Add qtest for vhost-user

2014-07-11 Thread Nikolay Nikolaev
On Fri, Jul 11, 2014 at 9:35 PM, Michael S. Tsirkin wrote: > On Wed, Jul 09, 2014 at 04:24:03PM +0200, Kevin Wolf wrote: >> Am 27.05.2014 um 14:07 hat Nikolay Nikolaev geschrieben: >> > This test creates a 'server' chardev to listen for vhost-user messages. >>

[Qemu-devel] [PATCH 1/3] Add qemu_is_ram_block

2014-07-10 Thread Nikolay Nikolaev
This function will check if given address maps into a RAMBlock. Signed-off-by: Nikolay Nikolaev --- exec.c | 15 +++ include/exec/ram_addr.h |1 + 2 files changed, 16 insertions(+) diff --git a/exec.c b/exec.c index 5a2a25e..0b1457b 100644 --- a/exec.c +++ b

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 18/18] Add qtest for vhost-user

2014-07-09 Thread Nikolay Nikolaev
On Wed, Jul 9, 2014 at 5:24 PM, Kevin Wolf wrote: > Am 27.05.2014 um 14:07 hat Nikolay Nikolaev geschrieben: >> This test creates a 'server' chardev to listen for vhost-user messages. >> Once VHOST_USER_SET_MEM_TABLE is received it mmaps each received region, >>

[Qemu-devel] [PATCH] qtest: fix vhost-user-test compilation with old GLib

2014-07-09 Thread Nikolay Nikolaev
Mising G_TIME_SPAN_SECOND definition breaks the RHEL6 compilation as GLib version before 2.26 does not have it. In such case just define it. Reported-by: Kevin Wolf Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c |4 1 file changed, 4 insertions(+) diff --git a/tests

[Qemu-devel] [PATCH 2/3] vhost-user: Fix VHOST_SET_MEM_TABLE processing

2014-07-08 Thread Nikolay Nikolaev
gions and avoid qemu_get_ram_fd call on them. Signed-off-by: Nikolay Nikolaev --- hw/virtio/vhost-user.c |4 1 file changed, 4 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 38e5806..876b080 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-u

[Qemu-devel] [PATCH 0/3] vhost-user fixes

2014-07-08 Thread Nikolay Nikolaev
so updated to reflect the changes in vhost-user message structures. --- Nikolay Nikolaev (3): Add qemu_is_ram_block vhost-user: Fix VHOST_SET_MEM_TABLE processing qtest: Adapt vhost-user-test to latehs vhost-user changes exec.c | 15 +++ hw

[Qemu-devel] [PATCH 3/3] qtest: Adapt vhost-user-test to latehs vhost-user changes

2014-07-08 Thread Nikolay Nikolaev
A new field mmap_offset was added in the vhost-user message, we need to reflect this change in the test too. Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user

Re: [Qemu-devel] [PATCH] Handle G_IO_HUP in tcp_chr_read for tcp chardev

2014-07-07 Thread Nikolay Nikolaev
r socket chardev") but keeps its functionality. > > Cc: Antonios Motakis > Cc: Nikolay Nikolaev > Cc: Michael S. Tsirkin > Signed-off-by: Kirill Batuzov > Signed-off-by: Nikita Belov > --- > > GLib limitation resulted in a bug on Windows host. Steps to rep

Re: [Qemu-devel] [PATCH v3] vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message

2014-06-26 Thread Nikolay Nikolaev
} > > diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index 55ca676..e9eb831 100644 > --- a/include/exec/ram_addr.h > +++ b/include/exec/ram_addr.h > @@ -29,6 +29,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void > *host, > MemoryRegion *mr); > ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr); > int qemu_get_ram_fd(ram_addr_t addr); > +void *qemu_get_ram_block_host_ptr(ram_addr_t addr); > void *qemu_get_ram_ptr(ram_addr_t addr); > void qemu_ram_free(ram_addr_t addr); > void qemu_ram_free_from_ptr(ram_addr_t addr); > -- > 1.9.1 > > Looks OK to me. Thanks Damjan. Acked-By: Nikolay Nikolaev

Re: [Qemu-devel] [PATCH v2] vhost-user: fix VHOST_USER_SET_MEM_TABLE

2014-06-26 Thread Nikolay Nikolaev
On Thu, Jun 26, 2014 at 1:22 PM, Damjan Marion wrote: > Old code was affected by memory gaps which > resulted in buffer pointers pointing to > address outside of the mapped regions. > > Signed-off-by: Damjan Marion > --- > docs/specs/vhost-user.txt | 7 --- > exec.c| 7

Re: [Qemu-devel] vhost-user: broken mem regions

2014-06-26 Thread Nikolay Nikolaev
On Thu, Jun 26, 2014 at 12:37 AM, Damjan Marion (damarion) wrote: > > On 25 Jun 2014, at 20:18, Michael S. Tsirkin wrote: > >> On Wed, Jun 25, 2014 at 09:13:36PM +0300, Nikolay Nikolaev wrote: >>> On Wed, Jun 25, 2014 at 9:07 PM, Michael S. Tsirkin wrote: >>>>

Re: [Qemu-devel] vhost-user: broken mem regions

2014-06-25 Thread Nikolay Nikolaev
On Wed, Jun 25, 2014 at 9:07 PM, Michael S. Tsirkin wrote: > On Wed, Jun 25, 2014 at 07:56:46PM +0300, Nikolay Nikolaev wrote: >> On Wed, Jun 25, 2014 at 7:44 PM, Paolo Bonzini wrote: >> >> nregions: 4 >> >> region: >> >> gpa = 0x1

Re: [Qemu-devel] vhost-user: broken mem regions

2014-06-25 Thread Nikolay Nikolaev
On Wed, Jun 25, 2014 at 7:44 PM, Paolo Bonzini wrote: >> nregions: 4 >> region: >> gpa = 0x1 >> size = 3221225472 >> ua = 0x2aab6ac0 > > High memory, above 3 gigabytes. > >> region: >> gpa = 0xFFFC >> size = 262144 >> ua = 0x7fc13d20 > > This

Re: [Qemu-devel] vhost-user: broken mem regions

2014-06-25 Thread Nikolay Nikolaev
On Wed, Jun 25, 2014 at 7:44 PM, Paolo Bonzini wrote: >> nregions: 4 >> region: >> gpa = 0x1 >> size = 3221225472 >> ua = 0x2aab6ac0 > > High memory, above 3 gigabytes. > >> region: >> gpa = 0xFFFC >> size = 262144 >> ua = 0x7fc13d20 > > This

Re: [Qemu-devel] vhost-user: broken mem regions

2014-06-25 Thread Nikolay Nikolaev
On Wed, Jun 25, 2014 at 5:06 PM, Damjan Marion (damarion) < damar...@cisco.com> wrote: > > On 25 Jun 2014, at 15:53, Michael S. Tsirkin wrote: > > > On Wed, Jun 25, 2014 at 01:45:09PM +, Damjan Marion (damarion) wrote: > >> > >> Michael, > >> > >> there is another issue with commited vhost-us

Re: [Qemu-devel] [PATCH 1/3] fixup! libqemustub: add more stubs for qemu-char

2014-06-19 Thread Nikolay Nikolaev
On Fri, Jun 20, 2014 at 8:55 AM, Hu Tao wrote: > build stub/qemu-chr-open-spice.o only with CONFIG_SPICE, this > suppresses the warning when building without CONFIG_SPICE. > > Cc: Nikolay Nikolaev > Signed-off-by: Hu Tao > --- > stubs/Makefile.objs | 2 +- > 1 file ch

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v2] qtest: enable vhost-user-test

2014-06-19 Thread Nikolay Nikolaev
On Thu, Jun 19, 2014 at 9:24 PM, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 08:35:42PM +0300, Nikolay Nikolaev wrote: > > Use qtest-obj-y to get the right library order. CONFIG_POSIX ensures > > mingw compilation won't break. > > > > Signed-off-by: Ni

[Qemu-devel] [PATCH v2] qtest: enable vhost-user-test

2014-06-19 Thread Nikolay Nikolaev
Use qtest-obj-y to get the right library order. CONFIG_POSIX ensures mingw compilation won't break. Signed-off-by: Nikolay Nikolaev --- 0 files changed diff --git a/tests/Makefile b/tests/Makefile index 4caf7de..5661d52 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -156,7 +156,7 @@

[Qemu-devel] [PATCH] fixup! libqemustub: add more stubs for qemu-char

2014-06-19 Thread Nikolay Nikolaev
Fix build break when --disable-spice. Reported-by: Andrew Jones Signed-off-by: Nikolay Nikolaev --- stubs/qemu-chr-open-spice.c |4 1 file changed, 4 insertions(+) diff --git a/stubs/qemu-chr-open-spice.c b/stubs/qemu-chr-open-spice.c index 40a29a9..83d8a66 100644 --- a/stubs/qemu

Re: [Qemu-devel] [snabb-devel] Re: [PATCH 0/6] vhost-user qtest fixes

2014-06-19 Thread Nikolay Nikolaev
On Thu, Jun 19, 2014 at 6:55 PM, Nikolay Nikolaev < n.nikol...@virtualopensystems.com> wrote: > > > > On Thu, Jun 19, 2014 at 6:48 PM, Michael S. Tsirkin > wrote: > >> On Thu, Jun 19, 2014 at 06:06:55PM +0300, Nikolay Nikolaev wrote: >> > The following

Re: [Qemu-devel] [snabb-devel] Re: [PATCH 0/6] vhost-user qtest fixes

2014-06-19 Thread Nikolay Nikolaev
On Thu, Jun 19, 2014 at 6:48 PM, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 06:06:55PM +0300, Nikolay Nikolaev wrote: > > The following series enables vhost-user-test in make check. > > > > The first patch adds a new CONFIG_VHOST_NET_USED in configure > > to

Re: [Qemu-devel] [snabb-devel] Re: [PATCH 1/6] configure: add new config define CONFIG_VHOST_NET_USED

2014-06-19 Thread Nikolay Nikolaev
On Thu, Jun 19, 2014 at 6:35 PM, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 06:07:15PM +0300, Nikolay Nikolaev wrote: > > This will be used in net.c (for now) to enable vhos-user netdev backend. > > > > Signed-off-by: Nikolay Nikolaev > > Did you test this

[Qemu-devel] [PATCH 6/6] qtest: enable vhost-user-test

2014-06-19 Thread Nikolay Nikolaev
Also use qtest-obj-y to get the right library order. Signed-off-by: Nikolay Nikolaev --- tests/Makefile |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 4caf7de..db4accf 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -156,7

[Qemu-devel] [PATCH 3/6] qtest: fix qtest for vhost-user

2014-06-19 Thread Nikolay Nikolaev
Fix compile for older glib, provide conditionally compiled versions of the used glib APIs. Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c | 128 +-- 1 file changed, 113 insertions(+), 15 deletions(-) diff --git a/tests/vhost-user-test.c

[Qemu-devel] [PATCH 4/6] qtest: fix vhost-user-test unbalanced mutex locks

2014-06-19 Thread Nikolay Nikolaev
Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 2934379..2af2381 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -269,6 +269,7

[Qemu-devel] [PATCH 5/6] vhost: fix migration_blocker initialization

2014-06-19 Thread Nikolay Nikolaev
error_set expect errp to be a NULL initialized pointer. Signed-off-by: Nikolay Nikolaev --- hw/virtio/vhost.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index c44c15c..e55fe1c 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio

[Qemu-devel] [PATCH 2/6] libqemustub: add more stubs for qemu-char

2014-06-19 Thread Nikolay Nikolaev
Additional stubs: - chr_baum_init - qemu_chr_open_spice_vmc - qemu_chr_open_spice_port Signed-off-by: Nikolay Nikolaev --- stubs/Makefile.objs |2 ++ stubs/chr-baum-init.c |7 +++ stubs/qemu-chr-open-spice.c | 12 3 files changed, 21 insertions

[Qemu-devel] [PATCH 1/6] configure: add new config define CONFIG_VHOST_NET_USED

2014-06-19 Thread Nikolay Nikolaev
This will be used in net.c (for now) to enable vhos-user netdev backend. Signed-off-by: Nikolay Nikolaev --- configure |3 +++ net/net.c |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9f4ba45..fb3c856 100755 --- a/configure +++ b

[Qemu-devel] [PATCH 0/6] vhost-user qtest fixes

2014-06-19 Thread Nikolay Nikolaev
The following series enables vhost-user-test in make check. The first patch adds a new CONFIG_VHOST_NET_USED in configure to be used in net.c to enable vhost-user netdev backend. Fifth patch fixes an error when calling erro_setg in vhost_dev_init. --- Nikolay Nikolaev (6): configure: add

Re: [Qemu-devel] [PATCH] net: fix vhost-user mingw compilation

2014-06-19 Thread Nikolay Nikolaev
Hello, On Thu, Jun 19, 2014 at 5:24 PM, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 05:16:44PM +0300, Nikolay Nikolaev wrote: > > Hello, > > > > > > On Wed, Jun 18, 2014 at 11:45 PM, Nikolay Nikolaev < > > n.nikol...@virtualopensystems.com> wrote

Re: [Qemu-devel] [PATCH] net: fix vhost-user mingw compilation

2014-06-19 Thread Nikolay Nikolaev
Hello, On Wed, Jun 18, 2014 at 11:45 PM, Nikolay Nikolaev < n.nikol...@virtualopensystems.com> wrote: > Make net.o linkage expect net_init_vhost_user only when > CONFIG_VHOST_NET is defined. > > Signed-off-by: Nikolay Nikolaev > --- > net/net.c |4 > 1

[Qemu-devel] [PATCH] net: fix vhost-user mingw compilation

2014-06-18 Thread Nikolay Nikolaev
Make net.o linkage expect net_init_vhost_user only when CONFIG_VHOST_NET is defined. Signed-off-by: Nikolay Nikolaev --- net/net.c |4 1 file changed, 4 insertions(+) diff --git a/net/net.c b/net/net.c index de76e30..0c30414 100644 --- a/net/net.c +++ b/net/net.c @@ -803,7 +803,9

Re: [Qemu-devel] vhost-user: migration?

2014-06-18 Thread Nikolay Nikolaev
On Wed, Jun 18, 2014 at 3:35 PM, Michael S. Tsirkin wrote: > On Wed, Jun 18, 2014 at 02:41:15PM +0300, Nikolay Nikolaev wrote: > > > > > > > > On Wed, Jun 18, 2014 at 2:29 PM, Michael S. Tsirkin > wrote: > > > > On Wed, Jun 18, 2014 a

Re: [Qemu-devel] vhost-user: migration?

2014-06-18 Thread Nikolay Nikolaev
On Wed, Jun 18, 2014 at 2:29 PM, Michael S. Tsirkin wrote: > On Wed, Jun 18, 2014 at 02:24:32PM +0300, Nikolay Nikolaev wrote: > > Hello, > > > > On Wed, Jun 18, 2014 at 12:33 PM, Michael S. Tsirkin > wrote: > > > > Just a query whether migration works

Re: [Qemu-devel] vhost-user: migration?

2014-06-18 Thread Nikolay Nikolaev
t was it tested > in practice? > > Can you give some pointers of a simple/quick test scenario. Maybe we'll be able to set it up. > > -- > MST > regards, Nikolay Nikolaev

[Qemu-devel] [PATCH 3/3] fixup! Add qtest for vhost-user

2014-06-12 Thread Nikolay Nikolaev
Replace 'memory-file' with 'memory-backend-file'. Signed-off-by: Nikolay Nikolaev --- tests/vhost-user-test.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 486e56b..7c826b4 100644 --- a/tes

[Qemu-devel] [PATCH 1/3] fixup! Add vhost-user as a vhost backend.

2014-06-12 Thread Nikolay Nikolaev
Replace 'memory-file' with 'memory-backend-file'. Signed-off-by: Nikolay Nikolaev --- hw/virtio/vhost-user.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 3244ef8..0df6a93 100644 --- a/hw/virtio/v

[Qemu-devel] [PATCH 2/3] fixup! Add the vhost-user netdev backend to the command line

2014-06-12 Thread Nikolay Nikolaev
Replace 'memory-file' with 'memory-backend-file'. Signed-off-by: Nikolay Nikolaev --- qemu-options.hx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 1ad2528..ab06df1 100644 --- a/qemu-options.hx +++ b/qemu-o

[Qemu-devel] [PATCH 0/3] Fixups for vhost-user

2014-06-12 Thread Nikolay Nikolaev
#x27;vhost'. Tested after rebasing on same tree branch 'numa'. --- Nikolay Nikolaev (3): fixup! Add vhost-user as a vhost backend. fixup! Add the vhost-user netdev backend to the command line fixup! Add qtest for vhost-user docs/specs/vhost-user.txt | 266 +++

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line

2014-06-11 Thread Nikolay Nikolaev
Hello, On Wed, Jun 11, 2014 at 6:38 PM, Michael S. Tsirkin wrote: > On Tue, Jun 10, 2014 at 05:17:05PM +0300, Nikolay Nikolaev wrote: >> Fixes remarks: >> - rever vhost-force to vhostforce (consistent with tap) >> - removed has_unsupported member from VhostUserChard

[Qemu-devel] [PATCH v10-fix 1/1] fixup! Add the vhost-user netdev backend to the command line

2014-06-10 Thread Nikolay Nikolaev
Fixes remarks: - rever vhost-force to vhostforce (consistent with tap) - removed has_unsupported member from VhostUserChardevProps - removed double error reporting when parsing chardev options Signed-off-by: Nikolay Nikolaev --- net/vhost-user.c | 18 ++ qapi-schema.json

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10-fix 15/18] Add the vhost-user netdev backend to the command line

2014-06-10 Thread Nikolay Nikolaev
Hello, On Tue, Jun 10, 2014 at 1:50 PM, Michael S. Tsirkin wrote: > > On Tue, Jun 10, 2014 at 01:34:13PM +0300, Michael S. Tsirkin wrote: > > On Tue, Jun 10, 2014 at 01:02:16PM +0300, Nikolay Nikolaev wrote: > > > The supplied chardev id will be inspected for supported

[Qemu-devel] [PATCH v10-fix 18/18] Add qtest for vhost-user

2014-06-10 Thread Nikolay Nikolaev
ount point defaults to '/hugetlbfs' and can be specified via the environment variable QTEST_HUGETLBFS_PATH. The rom pc-bios/pxe-virtio.rom is used to instantiate a virtio pcicontroller. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- tests/Makefile |4

[Qemu-devel] [PATCH v10-fix 16/18] Add vhost-user protocol documentation

2014-06-10 Thread Nikolay Nikolaev
This document describes the basic message format used by vhost-user for communication over a unix domain socket. The protocol is based on the existing ioctl interface used for the kernel version of vhost. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- docs/specs/vhost

[Qemu-devel] [PATCH v10-fix 15/18] Add the vhost-user netdev backend to the command line

2014-06-10 Thread Nikolay Nikolaev
checks for validity: - requires `-numa node,memdev=..` - requires `-device virtio-net-*` The `vhostforce` option is used to force vhost-net when we deal with non-MSIX guests. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hmp-commands.hx|4 +- hw/net/vhost_net.c

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Nikolay Nikolaev
On Thu, Jun 5, 2014 at 7:08 PM, Eric Blake wrote: > On 05/27/2014 06:06 AM, Nikolay Nikolaev wrote: > > The supplied chardev id will be inspected for supported options. Only > > a socket backend, with a set path (i.e. a Unix socket) and optionally > > the server parameter

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Nikolay Nikolaev
On Mon, Jun 9, 2014 at 4:31 PM, Michael S. Tsirkin wrote: > On Mon, Jun 09, 2014 at 04:28:23PM +0300, Nikolay Nikolaev wrote: > > Hello, > > > > > > On Thu, Jun 5, 2014 at 5:37 PM, Luiz Capitulino > wrote: > > > > On Tue, 27 May 2014 15:0

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Nikolay Nikolaev
Hello, On Thu, Jun 5, 2014 at 5:37 PM, Luiz Capitulino wrote: > On Tue, 27 May 2014 15:06:43 +0300 > Nikolay Nikolaev wrote: > > > The supplied chardev id will be inspected for supported options. Only > > a socket backend, with a set path (i.e. a Unix socket) and opti

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-06-09 Thread Nikolay Nikolaev
Hello Michael, On Sun, Jun 8, 2014 at 6:12 PM, Michael S. Tsirkin wrote: > On Tue, May 27, 2014 at 03:03:21PM +0300, Nikolay Nikolaev wrote: > > In this patch series we would like to introduce our approach for putting > a > > virtio-net backend in an external userspace pro

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-06-04 Thread Nikolay Nikolaev
On Wed, Jun 4, 2014 at 10:30 PM, Michael S. Tsirkin wrote: > On Tue, May 27, 2014 at 03:03:21PM +0300, Nikolay Nikolaev wrote: > > In this patch series we would like to introduce our approach for putting > a > > virtio-net backend in an external userspace process. Our event

Re: [Qemu-devel] [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-05-28 Thread Nikolay Nikolaev
ojects too. Patch 16 adds a protocol description document that can be used as a reference. > > Confused here, please can you share your thoughts. > All the the code and discussions are publicly available. > > > Thanks > Anshul Makkar > www.justkernel.com > > > >

[Qemu-devel] [PATCH v10 14/18] Add new vhost-user netdev backend

2014-05-27 Thread Nikolay Nikolaev
connection it will set link_down accordingly and notify virtio-net; the virtio-net interface will go down. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/net/vhost-user.h | 17 + net/Makefile.objs|2 - net/clients.h|3 + net/vh

[Qemu-devel] [PATCH v10 03/18] Add chardev API qemu_chr_fe_set_msgfds

2014-05-27 Thread Nikolay Nikolaev
This will set an array of file descriptors to the internal structures. The next time a message is send the array will be send as ancillary data. This feature works on the UNIX domain socket backend only. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/sysemu/char.h

[Qemu-devel] [PATCH v10 11/18] Add vhost-backend and VhostBackendType

2014-05-27 Thread Nikolay Nikolaev
Use vhost_set_backend_type to initialise a proper vhost_ops structure. In vhost_net_init and vhost_net_start_one call conditionally TAP related initialisation depending on the vhost backend type. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c

[Qemu-devel] [PATCH v10 04/18] Add chardev API qemu_chr_fe_get_msgfds

2014-05-27 Thread Nikolay Nikolaev
This extends the existing qemu_chr_fe_get_msgfd by allowing to read a set of fds. The function for receiving the fds - unix_process_msgfd is extended to allocate the needed array size. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/sysemu/char.h | 15

[Qemu-devel] [PATCH v10 16/18] Add vhost-user protocol documentation

2014-05-27 Thread Nikolay Nikolaev
This document describes the basic message format used by vhost-user for communication over a unix domain socket. The protocol is based on the existing ioctl interface used for the kernel version of vhost. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- docs/specs/vhost

[Qemu-devel] [PATCH v10 18/18] Add qtest for vhost-user

2014-05-27 Thread Nikolay Nikolaev
ount point defaults to '/hugetlbfs' and can be specified via the environment variable QTEST_HUGETLBFS_PATH. The rom pc-bios/pxe-virtio.rom is used to instantiate a virtio pcicontroller. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- tests/Makefile |4

[Qemu-devel] [PATCH v10 10/18] Add vhost_ops to vhost_dev struct and replace all relevant ioctls

2014-05-27 Thread Nikolay Nikolaev
Decouple vhost from the Linux kernel by introducing vhost_ops. The intention is to provide different backends - a 'kernel' backend based on the ioctl interface, and an 'user' backend based on a UNIX domain socket and shared memory interface. Signed-off-by: Antonios Motakis Si

[Qemu-devel] [PATCH v10 17/18] libqemustub: add stubs to be able to use qemu-char.c

2014-05-27 Thread Nikolay Nikolaev
tify_event - vc_init and this array: - serial_hds Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- stubs/Makefile.objs |8 stubs/bdrv-commit-all.c |7 +++ stubs/chr-msmouse.c |7 +++ stubs/get-next-serial.c |3 +++

[Qemu-devel] [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-05-27 Thread Nikolay Nikolaev
checks for validity: - requires `-numa node,memdev=..` - requires `-device virtio-net-*` The `vhostforce` option is used to force vhost-net when we deal with non-MSIX guests. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hmp-commands.hx|4 +- hw/net/vhost_net.c

[Qemu-devel] [PATCH v10 13/18] vhost-net: vhost-user feature bits support

2014-05-27 Thread Nikolay Nikolaev
Handle the feature bits negotiation when using vhost-user. Allow the underlying implementation to have a finer control over all the bits except the VIRTIO_NET_F_MAC. Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c | 35 +++ 1 file changed, 35 insertions

[Qemu-devel] [PATCH v10 08/18] Refactor virtio-net to use generic get_vhost_net

2014-05-27 Thread Nikolay Nikolaev
This decouples virtio-net from the TAP netdev backend and allows support for other backends to be implemented. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c | 30 +++--- hw/net/virtio-net.c | 29

[Qemu-devel] [PATCH v10 07/18] vhost_net should call the poll callback only when it is set

2014-05-27 Thread Nikolay Nikolaev
The poll callback needs to be called when bringing up or down the vhost_net instance. As it is not mandatory for an NetClient to implement it, invoke it only when it is set. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c | 13 ++--- 1 file

[Qemu-devel] [PATCH v10 06/18] vhost: add vhost_get_features and vhost_ack_features

2014-05-27 Thread Nikolay Nikolaev
Generalize the features get/ack to be used for both vhost-net and vhost-scsi. In vhost-net add vhost_net_get_feature_bits to select the feature bit set depending on the NetClient kind. Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c| 56

[Qemu-devel] [PATCH v10 12/18] Add vhost-user as a vhost backend.

2014-05-27 Thread Nikolay Nikolaev
global ram_list for ram blocks with a valid fd field set. This would be set when the '-object memory-file' option with share=on property is used. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hw/virtio/Makefile.objs |2 hw/virtio/vhost-backend.c |5 +

[Qemu-devel] [PATCH v10 05/18] Add G_IO_HUP handler for socket chardev

2014-05-27 Thread Nikolay Nikolaev
This is used to detect that the remote end has disconnected. Just call tcp_char_disconnect on receiving this event. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/sysemu/char.h |1 + qemu-char.c | 21 + 2 files changed, 22

[Qemu-devel] [PATCH v10 09/18] vhost_net_init will use VhostNetOptions to get all its arguments

2014-05-27 Thread Nikolay Nikolaev
pass the fd. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- hw/net/vhost_net.c| 23 --- hw/scsi/vhost-scsi.c | 10 +- hw/virtio/vhost.c | 12 +++- include/hw/virtio/vhost.h |2 +- include/net/vhost_net.h

[Qemu-devel] [PATCH v10 02/18] Add chardev API qemu_chr_fe_read_all

2014-05-27 Thread Nikolay Nikolaev
This function will attempt to read data from the chardev trying to fill the buffer up to the given length. Add tcp_chr_disconnect to reuse disconnection code where needed. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/sysemu/char.h | 14 qemu-char.c

[Qemu-devel] [PATCH v10 01/18] Add kvm_eventfds_enabled function

2014-05-27 Thread Nikolay Nikolaev
Add a function to check if the eventfd capability is present in KVM in the host kernel. Signed-off-by: Antonios Motakis Signed-off-by: Nikolay Nikolaev --- include/sysemu/kvm.h | 11 +++ kvm-all.c|4 kvm-stub.c |1 + 3 files changed, 16 insertions

[Qemu-devel] [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-05-27 Thread Nikolay Nikolaev
n status Changes from v3: - Convert -mem-path to QemuOpts with prealloc, share and unlink properties - Set 1 sec timeout when read/write to the unix domain socket - Fix file descriptor leak Changes from v2: - Reconnect when the backend disappears Changes from v1: - Implementation of vhost-user

Re: [Qemu-devel] [PATCH v9 00/20] Vhost and vhost-net support for userspace based backends

2014-05-20 Thread Nikolay Nikolaev
--- >> qemu-options.hx | 25 ++- >> stubs/Makefile.objs | 8 + >> stubs/bdrv-commit-all.c | 7 + >> stubs/chr-msmouse.c | 7 + >> stubs/get-next-serial.c | 3 + >> stubs/is-daemonized.c | 7 + >> stubs/machine-init-done.c | 6 + >> stubs/monitor-init.c | 6 + >> stubs/notify-event.c | 6 + >> stubs/vc-init.c | 7 + >> tests/Makefile| 4 + >> tests/vhost-user-test.c | 309 ++ >> +++ >> vl.c | 23 ++- >> 42 files changed, 1979 insertions(+), 158 deletions(-) >> create mode 100644 docs/specs/vhost-user.txt >> create mode 100644 hw/virtio/vhost-backend.c >> create mode 100644 hw/virtio/vhost-user.c >> create mode 100644 include/hw/virtio/vhost-backend.h >> create mode 100644 include/net/vhost-user.h >> create mode 100644 net/vhost-user.c >> create mode 100644 stubs/bdrv-commit-all.c >> create mode 100644 stubs/chr-msmouse.c >> create mode 100644 stubs/get-next-serial.c >> create mode 100644 stubs/is-daemonized.c >> create mode 100644 stubs/machine-init-done.c >> create mode 100644 stubs/monitor-init.c >> create mode 100644 stubs/notify-event.c >> create mode 100644 stubs/vc-init.c >> create mode 100644 tests/vhost-user-test.c >> >> > regards, Nikolay Nikolaev