From: Marc-André Lureau
Move kvm mmu notifiers check before calling file_ram_alloc().
This shouldn't change the validation logic.
Signed-off-by: Marc-André Lureau
---
exec.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index c4f9036..dcc6632
From: Marc-André Lureau
Move file opening part in a seperate function file_ram_open(). This
allows for reuse of file_ram_alloc() with only a fd.
Signed-off-by: Marc-André Lureau
---
exec.c | 58 ++
1 file changed, 34 insertions(+), 24 del
From: Marc-André Lureau
Instead of writing our own mmap handling code, reuse the code from
exec.c.
RFC because memory_region_init_ram_from_fd() adds some restrictions
(check for xen, kvm sync-mmu, etc) and changes (such as size
alignment). In practice, this doesn't seem to hurt though.
Signed-o
From: Marc-André Lureau
This will exercise the memfd memory backend and should generally be
better for testing than memory-backend-file (thanks to anonymous files
and sealing).
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 12 ++--
1 file changed, 6 insertions(+), 6 de
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
include/qemu/memfd.h | 1 +
util/memfd.c | 19 ++-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/include/qemu/memfd.h b/include/qemu/memfd.h
index 745a8c5..41c24d8 100644
--- a/include/qemu/m
From: Marc-André Lureau
Add qemu_ram_alloc_from_fd(), which can be use to allocate ramblock from
fd only.
Signed-off-by: Marc-André Lureau
---
exec.c | 45 ++---
include/exec/ram_addr.h | 3 +++
2 files changed, 33 insertions(+), 15 del
From: Marc-André Lureau
Add a new function to Initialize a RAM memory region with a mmap-ed file
descriptor.
Signed-off-by: Marc-André Lureau
---
include/exec/memory.h | 20
memory.c | 16
2 files changed, 36 insertions(+)
diff --git a/includ
From: Marc-André Lureau
If the previous ivshmem patch is applied, qemu_set_ram_fd() is no longer used.
Signed-off-by: Marc-André Lureau
---
exec.c | 10 --
include/exec/ram_addr.h | 1 -
2 files changed, 11 deletions(-)
diff --git a/exec.c b/exec.c
index 8675b5e..ec7
From: Marc-André Lureau
Add a new memory backend, similar to hostmem-file, except that it
doesn't need a file path, or hugepages directory permissions. It also
try to enforce memory sealing if available.
This backend is mainly useful for easily sharing the memory with other
processes, for exampl
From: Marc-André Lureau
"qemu -device ivshmem-plain" will crash, because it doesn't check that
'memdev' was provided.
Signed-off-by: Marc-André Lureau
---
hw/misc/ivshmem.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshm
From: Marc-André Lureau
"qemu -device ivshmem-{plain,doorbell}" will crash, because the device
doesn't check that the required argument is provided.
Signed-off-by: Marc-André Lureau
---
hw/misc/ivshmem.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/hw/mis
From: Marc-André Lureau
"qemu -device ivshmem-{plain,doorbell}" will crash, because the device
doesn't check that the required argument is provided. (screwed up in
commit 5400c02)
Signed-off-by: Marc-André Lureau
Reviewed-by: Markus Armbruster
---
hw/misc/ivshmem.c | 30 ++
From: Marc-André Lureau
The following changes since commit d44122ecd0fa62d20762bdd8f214f077cb8e011b:
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
(2016-04-12 17:47:15 +0100)
are available in the git repository at:
g...@github.com:elmarco/qemu.git tags/ivshme
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
backends/hostmem-file.c | 8
1 file changed, 8 insertions(+)
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index b17a1f1..5c4b808 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -121,11
From: Marc-André Lureau
Since f1060c55bf1377b4, the pointer is directly passed to
qemu_ram_free(). However, on initialization failure, it may be called
with a NULL pointer. Return immediately in this case.
This fixes a SEGV when memory initialization failed, for example
permission denied on open
From: Marc-André Lureau
Test a few guest-exec guest agent commands, added in qemu 2.5.
Signed-off-by: Marc-André Lureau
---
tests/test-qga.c | 81
1 file changed, 81 insertions(+)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 7
From: Marc-André Lureau
Hi
vhost-user & virtio are not so simple and evolve regularly. There
isn't a reference code that would help you get started either. And
the backends duplicate most of the effort.
Furthermore, due to usage of ancillary data, shared memory, eventfd,
atomics, it is not so s
From: Marc-André Lureau
The call fd is not watched
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-bridge.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 7d548d8..b9bf018 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-bridge.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index b7bb79a..c21cd79 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -1196
From: Marc-André Lureau
dispatcher_remove() is in use.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-bridge.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 0779ba2..7d548d8 100644
--- a/tests/vhost-user-bridge.c
+++ b/t
From: Marc-André Lureau
Use the libvhost-user library.
This ended up being a rather large patch that cannot be easily splitted,
due to massive code move and API changes.
Signed-off-by: Marc-André Lureau
---
tests/Makefile|2 +-
tests/vhost-user-bridge.c | 1167 +---
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-bridge.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index b9bf018..b7bb79a 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -388,7
From: Marc-André Lureau
Add a library to help implementing vhost-user backend (or slave).
Dealing with vhost-user as an application developper isn't so easy: you
have all the trouble with any protocol: validation, unix ancillary data,
shared memory, eventfd, logging, and on top of that you need
From: Marc-André Lureau
Hi,
vhost-user allows to drive a virtio device in a seperate process. So
far, it has been mainly used with virtio-net. It can work with other
devices such as input and gpu, as shown in this series.
Some of the benefits of using vhost-user are:
- parallelism, since the ba
From: Marc-André Lureau
Create a vhost-user-backend object that holds a connection to a
vhost-user backend and can be referenced from virtio devices that
support it.
Currently, you may specify the executable to spawn directly from command
line, ex: -object vhost-user-backend,id=vui,cmd="./vhost-
From: Marc-André Lureau
Split vhost_user_read(), so only header can be read with
vhost_user_read_header().
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 28 +++-
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/v
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
include/hw/virtio/virtio-gpu.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 1602a13..0cc8e67 100644
--- a/include/hw/virtio/virtio-gpu.h
From: Marc-André Lureau
The define was introduced with qemu_chr_fe_read_all() in 7b0bfdf52d,
however never used.
Signed-off-by: Marc-André Lureau
---
qemu-char.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index caa737d..efa1e2a 100644
---
From: Marc-André Lureau
vhost switches between masked notifier and guest notifier when
unmasking. virtio_pci_vq_vector_unmask() checks if there was pending
notification, but at the time it is checked, vhost-user backend doesn't
guarantee that the switch happened yet, so it may lose some events.
From: Marc-André Lureau
Add a new scanout callback that doesn't require any gl context in
qemu (importing a dmabuf fd would require qemu egl&gl contexts, and
would be unnecessary when using spice anyway)
Signed-off-by: Marc-André Lureau
---
include/ui/console.h | 10 ++
ui/console.c
From: Marc-André Lureau
Learn to use a vhost-user as a virtio-input backend. Usage:
-object vhost-user-backend,id=vuid -device virtio-input-host-pci,vhost-user=vuid
Signed-off-by: Marc-André Lureau
---
hw/input/virtio-input-host.c | 67 ++--
hw/input/vi
From: Marc-André Lureau
Create a CharDriver from an existing socket fd. Is there a better way to
do that?
Signed-off-by: Marc-André Lureau
---
include/sysemu/char.h | 2 ++
qemu-char.c | 37 -
2 files changed, 38 insertions(+), 1 deletion(-)
diff
From: Marc-André Lureau
A sync read should block until data is available, instead of
retrying. Change the channel to blocking during read.
Signed-off-by: Marc-André Lureau
---
qemu-char.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-char.c b/qemu-char.c
index efa1e2a..ce09226 100
From: Marc-André Lureau
Add a new vhost-user message to give a unix socket for gpu updates to a
vhost-user backend.
Signed-off-by: Marc-André Lureau
---
contrib/libvhost-user/libvhost-user.h | 1 +
hw/virtio/vhost-user.c| 11 +++
include/hw/virtio/vhost-backend.h |
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
docs/specs/vhost-user.txt | 9 ++
hw/virtio/vhost-user.c| 58 +++
include/hw/virtio/vhost-backend.h | 4 +++
3 files changed, 71 insertions(+)
diff --git a/docs/specs/vhos
From: Marc-André Lureau
Add to virtio-gpu devices a "vhost-user" property. When set, the
associated vhost-user backend is used to handle the virtio rings.
For now, a socketpair is created for the backend to share the rendering
results with qemu via a simple VHOST_GPU protocol.
Example usage:
-o
From: Marc-André Lureau
Add a vhost-user input backend example, based on virtio-input-host
device. It takes an evdev path as argument, and can be associated with a
vhost-user-backend object, ex:
-object vhost-user-backend,id=vuid,cmd="vhost-user-input /dev/input/event0"
Signed-off-by: Marc-Andr
From: Marc-André Lureau
Add a vhost-user gpu backend example, based on virtio-gpu/3d device. It
is to be associated with a vhost-user-backend object, ex:
-object vhost-user-backend,id=vug,cmd="vhost-user-gpu"
Signed-off-by: Marc-André Lureau
---
Makefile |3 +
From: Marc-André Lureau
If -c is specified, vubr will try to connect to the socket instead of
listening for connections.
Signed-off-by: Marc-André Lureau
Tested-by: Yuanhan Liu
Reviewed-by: Yuanhan Liu
---
tests/vhost-user-bridge.c | 38 ++
1 file changed,
From: Marc-André Lureau
Do not crash when backend is not present while enabling the ring. A
following patch will save the enabled state so it can be restored once
the backend is started.
Signed-off-by: Marc-André Lureau
Tested-by: Yuanhan Liu
Reviewed-by: Yuanhan Liu
---
hw/net/vhost_net.c |
From: Marc-André Lureau
Hi,
In a previous series "RFCv2: vhost-user: shutdown and reconnection", I
proposed to add a new slave request to handle graceful shutdown, for
both qemu configuration, server or client, while keeping the guest
running with link down status.
However, for the simple case
From: Marc-André Lureau
If the backend failed to start (for example feature negociation failed),
do not exit, but disconnect the char device instead. Slightly more
robust for reconnect case.
Signed-off-by: Marc-André Lureau
Tested-by: Yuanhan Liu
Reviewed-by: Yuanhan Liu
---
net/vhost-user.c
From: Marc-André Lureau
This is a simple reconnect test, that simply checks if vhost-user
reconnection is possible and restore the state. A more complete test
would actually manipulate and check the ring contents (such extended
testing would benefit from the libvhost-user proposed in QEMU list to
From: Marc-André Lureau
A driver may change the vring enable state at run time but vhost-user
backend may not be present (a contrived example is when the backend is
disconnected and the device is reconfigured after driver rebinding)
Restore the vring state when the vhost-user backend is started,
From: Marc-André Lureau
Do not overwrite x86-64 tests, re-enable vhost-user-test.
Signed-off-by: Marc-André Lureau
Reviewed-by: Eric Blake
---
tests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index a3e20e3..932ad2a 100644
--- a
From: 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: Tets
From: Marc-André Lureau
This patch is a similar solution to what Yuanhan Liu/Huawei Xie have
suggested for DPDK. When vubr quits (killed or crashed), a restart of
vubr would get stale vring base from QEMU. That would break the kernel
virtio net completely, making it non-work any more, unless a dr
From: 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-of
From: Marc-André Lureau
The initial vhost-user connection sets the features to be negotiated
with the driver. Renegotiation isn't possible without device reset.
To handle reconnection of vhost-user backend, ensure the same set of
features are provided, and reuse already acked features.
Signed-o
From: Marc-André Lureau
Do not create a leaking temporary file, but use a static file instead.
Signed-off-by: Marc-André Lureau
Reported-by: Peter Maydell
---
tests/test-qga-config | 8
tests/test-qga.c | 27 ---
2 files changed, 12 insertions(+), 23 del
From: Marc-André Lureau
Hi,
Here are 2 small patches to remove the need for temporary file
creation in test-qga.
Marc-André Lureau (2):
build-sys: define QEMU_SRC_PATH
tests: use static qga config file
scripts/create_config | 3 +++
tests/test-qga-config | 8
tests/test-qga.c
From: Marc-André Lureau
Do not create a leaking temporary file, but use a static file instead.
Signed-off-by: Marc-André Lureau
Reported-by: Peter Maydell
---
tests/test-qga-config | 8
tests/test-qga.c | 27 ---
2 files changed, 12 insertions(+), 23 del
From: Marc-André Lureau
Define QEMU_SRC_PATH in config-host.h, to ease accessing of tests data
files.
Signed-off-by: Marc-André Lureau
---
scripts/create_config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/create_config b/scripts/create_config
index 1dd6a35..2fbe126 100755
--
From: Marc-André Lureau
Look up the associated head monitor config.
Signed-off-by: Marc-André Lureau
---
ui/spice-display.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 34095fb..142c941 100644
--- a/ui/spice-dis
From: Marc-André Lureau
Hi
Here are a few fixes for virtio-gpu multihead & spice support. To
actually test this, you also need pending kernel fixes, and a small
fix in spice-gtk for the virgl case.
Marc-André Lureau (3):
virgl: count the calls to gl_block
spice: use the right head for multi
From: Marc-André Lureau
Spice client needs the whole GL texture dimension to be able to show a
scanout with a monitor offset (different than +0+0).
Furthermore, this fixes a crash when calling surface_{width,height}()
after dpy_gfx_replace_surface(con, NULL) was called in
virgl_cmd_set_scanout()
From: Marc-André Lureau
In virgl_cmd_resource_flush(), when several consoles are updated, it
needs to keep blocking until all spice gl draws are done. This fixes an
assert() in spice when using multiple monitors with virgl.
Signed-off-by: Marc-André Lureau
---
hw/display/virtio-gpu.c|
From: Marc-André Lureau
Do not create a leaking temporary file, but use a static file instead.
Signed-off-by: Marc-André Lureau
Reported-by: Peter Maydell
---
tests/data/test-qga-config | 8
tests/test-qga.c | 27 ---
2 files changed, 12 insertions(
From: Marc-André Lureau
Hi,
Here are 2 small patches to remove the need for temporary file
creation in test-qga.
v1->v2:
- use a symlink to tests/data instead of hardcoding SRC_PATH
Marc-André Lureau (2):
build-sys: link tests/data
tests: use static qga config file
configure
From: Marc-André Lureau
Link a common tests data directory to the build directory.
Signed-off-by: Marc-André Lureau
---
configure | 5 +
1 file changed, 5 insertions(+)
diff --git a/configure b/configure
index 8c2f90b..c79234c 100755
--- a/configure
+++ b/configure
@@ -6008,6 +6008,11 @@
From: Marc-André Lureau
Hi
A small series to do some chardev cleanup when removing them and
leaving qemu.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1347077
Marc-André Lureau (3):
char: clean up remaining chardevs when leaving
socket: add listen feature
socket: unlink unix socket
From: Marc-André Lureau
This helps to remove various chardev resources leaks when leaving qemu.
Signed-off-by: Marc-André Lureau
---
include/sysemu/char.h | 7 +++
qemu-char.c | 9 +
vl.c | 1 +
3 files changed, 17 insertions(+)
diff --git a/include/syse
From: Marc-André Lureau
Add a flag to tell whether the channel socket is listening.
Signed-off-by: Marc-André Lureau
---
include/io/channel.h | 1 +
io/channel-socket.c | 7 +++
2 files changed, 8 insertions(+)
diff --git a/include/io/channel.h b/include/io/channel.h
index d37acd2..e52f0
From: Marc-André Lureau
qemu leaves unix socket files behind when removing a listening chardev
or leaving. qemu could clean that up, even if doing so isn't race-free.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1347077
Signed-off-by: Marc-André Lureau
---
include/qemu/sockets.h
From: Marc-André Lureau
Hi
A small series to do some chardev cleanup when removing them and
leaving qemu.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1347077
v1->v2:
- use atexit() for qemu_chr_cleanup()
- add missing braces
Marc-André Lureau (3):
char: clean up remaining chardevs wh
From: Marc-André Lureau
This helps to remove various chardev resources leaks when leaving qemu.
Signed-off-by: Marc-André Lureau
---
qemu-char.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/qemu-char.c b/qemu-char.c
index c926e9a..98dcd49 100644
--- a/qemu-char.c
+++ b/qemu
From: Marc-André Lureau
qemu leaves unix socket files behind when removing a listening chardev
or leaving. qemu could clean that up, even if doing so isn't race-free.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1347077
Signed-off-by: Marc-André Lureau
---
include/qemu/sockets.h
From: Marc-André Lureau
Add a flag to tell whether the channel socket is listening.
Signed-off-by: Marc-André Lureau
---
include/io/channel.h | 1 +
io/channel-socket.c | 7 +++
2 files changed, 8 insertions(+)
diff --git a/include/io/channel.h b/include/io/channel.h
index d37acd2..e52f0
From: Marc-André Lureau
Add a make 'help', to print a summary of the main Makefile targets.
The format is loosely inspired by Linux make 'help' output.
Signed-off-by: Marc-André Lureau
---
Makefile | 33 +
1 file changed, 33 insertions(+)
diff --git a/Makefile
From: Marc-André Lureau
Calling qemu_chr_fe_set_msgfds() on unconnected socket can lead to crash
if s->ioc is NULL.
Signed-off-by: Marc-André Lureau
---
qemu-char.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 84f49ac..06eaba3 1
From: Marc-André Lureau
Check return value, and drop the unnecessary 'if' check for fd_num.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 495e09f..5dae496
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
net/vhost-user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index d72ce9b..392f982 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -310,7 +310,6 @@ static int net_
From: Marc-André Lureau
Hi,
Since 'vhost-user: simple reconnection support' was merged, it is
possible to disconnect and reconnect a vhost-user backend. However,
many code paths in qemu may trigger assert() when the backend is
disconnected.
Some assert() could simply be replaced by error_report
From: Marc-André Lureau
Return read errors (not sure why those were ignored)
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index e51df27..819481d 100644
--- a
From: Marc-André Lureau
Just some more error checking.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 44 +++-
1 file changed, 31 insertions(+), 13 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 5dae496..e
From: Marc-André Lureau
Let's use qemu proper error reporting API.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 21 +
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index e2d1614..4e23d73 100644
--- a/hw/virt
From: Marc-André Lureau
May be called on multiple code path, so it's easier to make it safe in
the first place.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index
From: Marc-André Lureau
This helps following vhost_dev_cleanup() patch to check if the device
was added before removing it from the list.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vho
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 22ea653..cc2f68a 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -383,7 +383,7 @@ void vh
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 50f4dcd..3f1fecc 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -313,7 +313,7 @@ int vho
From: Marc-André Lureau
vhost_dev_init() may need to be cleaned up on failure too. Just call
vhost_dev_cleanup() in all cases. But first zero-alloc the struct to
avoid the garbage.
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(
From: Marc-André Lureau
Lot of code path assumes get_vhost_net() return non-null. Keep it
after a successful vhost_net_init(). vhost_net_cleanup() will clear the
vhost-dev connection-related data after vhost_user_stop().
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 1 -
net/tap.c
From: Marc-André Lureau
Check early connection failure and resume.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 8b2164b..7fe12e6 10
From: Marc-André Lureau
Clear dev->log* when calling vhost_log_put()
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 4e23d73..febf64f 100644
--- a/hw/virtio/vhost.c
+++
From: Marc-André Lureau
Make sure the log is being released on cleanup and the structure
cleared.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index febf64f..237db77 100644
--- a/hw/virtio/vhost
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 1 +
net/vhost-user.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index f1dd367..22ea653 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -417,6 +417
From: Marc-André Lureau
Calling a vhost operation may fail, especially with disconnectable
backends. Treat some that look harmless as recoverable errors (print
error, or ignore on error code path).
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 32 +---
1
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index c3d3481..2c6535c 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1004,21 +10
From: Marc-André Lureau
Now that get_vhost_net() returns non-null after a successful
vhost_net_init(), we no longer need to check this case.
This reverts commit ecd34898596c60f79886061618dd7e01001113ad.
Signed-off-by: Marc-André Lureau
---
hw/net/vhost_net.c | 7 +--
1 file changed, 1 ins
From: Marc-André Lureau
A function to wait on the backend to be connected, to be used in the
following patches.
Signed-off-by: Marc-André Lureau
---
include/sysemu/char.h | 8
qemu-char.c | 9 +
2 files changed, 17 insertions(+)
diff --git a/include/sysemu/char.h b/
From: Marc-André Lureau
vhost_net_init() calls vhost_dev_init() and in case of failure, calls
vhost_dev_cleanup() directly. However, the structure is already
partially cleaned on error. Calling vhost_dev_cleanup() again will call
vhost_virtqueue_cleanup() on already clean queues, and causing pote
From: Marc-André Lureau
The chardev waits for an initial connection before starting qemu,
vhost-user wants the backend negotiation to be completed. vhost-user is
started in the net_vhost_user_event callback, which is synchronously
called after the socket is connected.
Signed-off-by: Marc-André L
From: Marc-André Lureau
Add a chr_wait_connected for the tcp backend, and use it in the
open_socket() function.
Signed-off-by: Marc-André Lureau
---
qemu-char.c | 63 ++---
1 file changed, 44 insertions(+), 19 deletions(-)
diff --git a/q
From: Marc-André Lureau
All these functions must be called only after the backend is connected.
They are called from virtio-net.c, after either virtio or link status
change.
The check for nc->peer->link_down should ensure vhost_net_{start,stop}()
are always called between vhost_user_{start,stop}
From: Marc-André Lureau
qapi'fy the 'qmp_capabilities' command.
Signed-off-by: Marc-André Lureau
---
monitor.c| 4 ++--
qapi-schema.json | 19 +++
qmp-commands.hx | 2 +-
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/monitor.c b/monitor.c
index bbd5
From: Marc-André Lureau
Since a few commands are using 'gen': false, they are not registered
automatically by the generator. Register manually instead.
This is in preparation for removal of qapi 'middle' mode generation.
Signed-off-by: Marc-André Lureau
---
monitor.c | 11 +++
1 file
From: Marc-André Lureau
Even though device_add is not fully qapi'fied, we may add it to the json
schema with 'gen': false, so registration and documentation can be
generated.
Signed-off-by: Marc-André Lureau
---
qapi-schema.json | 26 ++
1 file changed, 26 insertions(+)
From: Marc-André Lureau
Stop using the so-called 'middle' mode. Instead, use qmp_find_command()
from generated qapi commands registry.
Note: this commit requires a 'make clean' prior to make, since the
generated files do not depend on Makefile (due to a cyclic rule
introduced in 4115852bb0).
Si
From: Marc-André Lureau
Hi,
Although some QMP commands are still not fully qapi'fied, it is
possible to use more qapi common and generated code by dropping the
'middle' mode.
This series of patches was sent last year as part of a larger series
'post-Eric's fixes, QAPI improvements'. It is still
From: Marc-André Lureau
Now that the register function is always generated, we can
remove the so-called "middle" mode from the generator script.
Signed-off-by: Marc-André Lureau
---
scripts/qapi-commands.py | 29 +
1 file changed, 5 insertions(+), 24 deletions(-)
d
701 - 800 of 3981 matches
Mail list logo