From: Marc-André Lureau
Once the middle mode is removed, the generated marshal functions will no
longer be exported.
Signed-off-by: Marc-André Lureau
---
monitor.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/monitor.c b/monitor.c
index 7e8ad0c..410c3a
From: Marc-André Lureau
Move the examples in the json file with the rest of the documentation to
avoid duplication.
Signed-off-by: Marc-André Lureau
---
docs/qmp/qmp-events.txt | 664
qapi/block-core.json| 59 -
qapi/block.json
From: Marc-André Lureau
The marshal functions are no longer exported, they are registered in the
dispatch table instead. The following patches will make use of
qmp_dispatch(). This patch temporarily breaks qmp/hmp commands.
Signed-off-by: Marc-André Lureau
---
Makefile | 2 +-
qmp-
From: Marc-André Lureau
It's static file now.
Signed-off-by: Marc-André Lureau
---
Makefile.target| 7 +-
qmp-commands-old.h | 683 +
qmp-commands.hx| 683 -
3 files changed, 685 i
From: Marc-André Lureau
Now that the register function is always generated, we can
remove the so-called "middle" mode to the generator script.
Signed-off-by: Marc-André Lureau
---
scripts/qapi-commands.py | 29 +
1 file changed, 5 insertions(+), 24 deletions(-)
dif
From: Marc-André Lureau
So we can get rid of the static qmp_cmds table.
Signed-off-by: Marc-André Lureau
---
monitor.c | 25 ++---
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/monitor.c b/monitor.c
index bfa0329..a2eb228 100644
--- a/monitor.c
+++ b/monit
From: Marc-André Lureau
Learn a new type of command, QmpCommandFuncAsync. They can return later
thanks to QmpReturn. This commit introduces the new types and register
functions.
Signed-off-by: Marc-André Lureau
---
include/qapi/qmp/dispatch.h | 5 +
qapi/qmp-dispatch.c | 3 +++
q
From: Marc-André Lureau
Replace the old "middle mode" dispatch code using the manually
maintained table by the one generated by qapi scripts.
Signed-off-by: Marc-André Lureau
---
monitor.c | 316 +++---
1 file changed, 34 insertions(+), 2
From: Marc-André Lureau
---
monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor.c b/monitor.c
index 4deef29..25f9608 100644
--- a/monitor.c
+++ b/monitor.c
@@ -306,7 +306,7 @@ static void monitor_flush_locked(Monitor *mon)
return;
}
From: Marc-André Lureau
Let the caller know if the update is immediate or async.
Signed-off-by: Marc-André Lureau
---
hw/display/qxl-render.c | 5 +++--
hw/display/qxl.c| 8
hw/display/qxl.h| 2 +-
include/ui/console.h| 3 ++-
ui/console.c| 14 +
From: Marc-André Lureau
The table is no longer used.
Signed-off-by: Marc-André Lureau
---
monitor.c | 7 -
qmp-commands-old.h | 554 -
2 files changed, 561 deletions(-)
delete mode 100644 qmp-commands-old.h
diff --git a/monitor.c
From: Marc-André Lureau
Add a new QmpClient structure holding the dispatch return callback
and the list of pending QmpReturns.
When a client disconnects, call qmp_client_destroy(). This will remove
all pending returns from the client list, and prevent a reply from being
sent later to new clients
From: Marc-André Lureau
In order to prepare for the async support, give an optionnal qdict for
the dispatch call to be used for the reply. The qemu monitor will have
the request "id" pre-filled.
Signed-off-by: Marc-André Lureau
---
include/qapi/qmp/dispatch.h | 2 +-
monitor.c
From: Marc-André Lureau
Learn a new async command to make a correct screendump.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1230527
Signed-off-by: Marc-André Lureau
---
qapi-schema.json | 21 +++-
ui/console.c | 59 +++
From: Marc-André Lureau
The async support mandates that request have an 'id' (see documentation
in following patch).
Signed-off-by: Marc-André Lureau
---
qapi/qmp-dispatch.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 83ecab5..73ba3a
From: Marc-André Lureau
Presumably 0.15 was the version it was first introduced, but
qmp keeps evolving. There is no point in having that version
has test prefix, qmp makes more sense.
Signed-off-by: Marc-André Lureau
---
tests/test-qmp-commands.c | 10 +-
1 file changed, 5 insertions(
From: Marc-André Lureau
We could have arbitrary async command name, but it make sense to use a
specific name to avoid confusion.
Signed-off-by: Marc-André Lureau
---
scripts/qapi.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 96901ab..d614673 100
From: Marc-André Lureau
Commands with the 'async' key will be registered as async type (see
previous commit), and will allow a synchronous (in command cb) or
asynchronous return (when ready, in idle etc).
Ex:
{ 'command': 'foo-async, 'data': {'arg': 'str'}, async: true }
Signed-off-by: Marc-And
From: Marc-André Lureau
Copy 'id' from request to reply dict. This can be done earlier, such as
done by the monitor (because the qemu monitor may reply directly without
qmp_dispatch), but is now done as well in qmp_dispatch() as convenience
for other users such as QGA and tests.
Signed-off-by: M
From: Marc-André Lureau
Check that async disaptch works.
Signed-off-by: Marc-André Lureau
---
tests/qapi-schema/qapi-schema-test.json | 2 ++
tests/qapi-schema/qapi-schema-test.out | 5 +++
tests/test-qmp-commands.c | 61 +
3 files changed, 68 i
From: Marc-André Lureau
Introduce QmpDispatchReturn, a callback called when a command reply is
ready to be sent. Future patches will extend the concept to allow async
replies.
QmpReturn and associated functions is used internally for sync
fonctions, but will be the basis of a async context (the
From: Marc-André Lureau
Add a function to be called when an async graphic update is done.
Signed-off-by: Marc-André Lureau
---
hw/display/qxl-render.c | 9 +++--
include/ui/console.h| 1 +
ui/console.c| 4
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
docs/qmp/qmp-spec.txt | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/docs/qmp/qmp-spec.txt b/docs/qmp/qmp-spec.txt
index 4c28cd9..f1af7f7 100644
--- a/docs/qmp/qmp-spec.txt
+++ b/docs/qmp/qmp-sp
From: Marc-André Lureau
Existing clients may not handle async replies very well. In order
to avoid the potential issues, let's introduce a capability that
the client must declare in order to make use of async commands.
Eventually, client should already handle unexpected events after a
command is
From: Marc-André Lureau
Check if memfd_create() is part of system libc.
Signed-off-by: Marc-André Lureau
---
configure | 19 +++
1 file changed, 19 insertions(+)
diff --git a/configure b/configure
index f14454e..5e77ed5 100755
--- a/configure
+++ b/configure
@@ -3486,6 +3486,2
From: Marc-André Lureau
Implement memfd_create() fallback if not available in system libc.
memfd_create() is still not included in glibc today, atlhough it's been
available since Linux 3.17 in Oct 2014.
memfd has numerous advantages over traditional shm/mmap for ipc memory
sharing with fd handle
From: Marc-André Lureau
Split VHOST_SET_LOG_BASE call in a seperate function callback, so that
type safety works and more arguments can be added in the next patches.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-backend.c | 8
hw/virtio/vhost-user.c| 17 +++
From: Thibaut Collet
A new vhost user message is added to allow QEMU to ask to vhost user backend to
broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE
capability.
This new message is sent only if the backend supports the new
VHOST_USER_PROTOCOL_F_RARP protocol feature.
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
docs/specs/vhost-user.txt | 48 +--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index 4eadad1..e0292a0 100644
--- a/d
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 88714ff..6662ca9 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -262,7 +262,6 @@
From: "Michael S. Tsirkin"
Data is empty for now, but do make sure master
sets the new feature bit flag.
Signed-off-by: Michael S. Tsirkin
---
tests/vhost-user-test.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
inde
From: Marc-André Lureau
Replace the generic vhost_call() by specific functions for each
function call to help with type safety and changing arguments.
While doing this, I found that "unsigned long long" and "uint64_t" were
used interchangeably and causing compilation warnings, using uint64_t
ins
From: Marc-André Lureau
Add an open/unlink/mmap fallback for system that do not support memfd.
This patch may require additional SELinux policies to work for enforced
systems, but should gracefully fail nonetheless.
Signed-off-by: Marc-André Lureau
---
util/memfd.c | 22 --
From: Marc-André Lureau
Hi,
The following series implement shareable log for vhost-user to support
memory tracking during live migration. On qemu-side, the solution is
fairly straightfoward since vhost already supports the dirty log, only
vhost-user couldn't access the log memory until then.
Th
From: Marc-André Lureau
Replace error_report() and use tracing instead. It's not an error to get
a connection or a disconnection, so silence this and trace it instead.
Signed-off-by: Marc-André Lureau
---
net/vhost-user.c | 4 ++--
trace-events | 3 +++
2 files changed, 5 insertions(+), 2
From: Marc-André Lureau
If the backend is requires it, allocate shareable memory.
vhost_log_get() now uses 2 globals "vhost_log" and "vhost_log_shm", that
way there is a common non-shareable log and a common shareable one.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 57 ++
From: Marc-André Lureau
Add qemu_memfd_alloc/free() helpers.
The function helps to allocate and seal a memfd.
Signed-off-by: Marc-André Lureau
---
include/qemu/memfd.h | 4
util/memfd.c | 59 ++--
2 files changed, 61 insertions(+),
From: Marc-André Lureau
Add a new macro to make the qemu command line with other
values of memory size, and specific chardev id.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/vhost-user-test
From: Marc-André Lureau
Check that backend source and destination do not have simultaneous
ownership during migration.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/tests/vhost-user-test.
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index c0ed5b2..67e09fe 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -334,6 +334,8 @@ static inline void vhost_d
From: Marc-André Lureau
New syscalls are not yet widely distributed. Add them to qemu
linux-headers include directory. Update based on v4.3-rc3 kernel headers.
Exclude mips for now, which is more problematic due to extra header
inclusion and probably unnecessary here.
Signed-off-by: Marc-André
From: Marc-André Lureau
This test checks that the log fd is given to the migration source, and
mark dirty pages during migration.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 171 +++-
1 file changed, 168 insertions(+), 3 deletions(
From: Marc-André Lureau
Check if the backend has VHOST_USER_PROTOCOL_F_LOG_SHMFD feature and
require a shared log.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c| 14 --
include/hw/virtio/vhost-backend.h | 4
2 files changed, 16 insertions(+), 2 delet
From: Marc-André Lureau
If VHOST_USER_PROTOCOL_F_LOG_SHMFD is not announced, block vhost-user
migration.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index cf14e38.
From: Marc-André Lureau
Send the shm for the dirty pages logging if the backend supports
VHOST_USER_PROTOCOL_F_LOG_SHMFD. Wait for a reply to make sure
the old log is no longer used.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-backend.c | 3 ++-
hw/virtio/vhost-user.c
From: Thibaut Collet
The VHOST_USER_PROTOCOL_FEATURE_MASK will be automatically updated when
adding new features to the enum.
Signed-off-by: Thibaut Collet
[Adapted from mailing list discussion - Marc-André]
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 13 +
1 fil
From: Thibaut Collet
Some vhost user backends are able to support live migration.
To provide this service the following features must be added:
1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev
backend is vhost-user.
2. Provide a nop receive callback to vhost-user.
From: Marc-André Lureau
This function is a precondition for most vhost-user tests.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 77b7b68
From: Marc-André Lureau
In the coming patches, a test will use several servers
simultaneously. Wrap the server in a struct, out of the global scope.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 146 ++--
1 file changed, 92 insertion
From: Marc-André Lureau
If the backend is requires it, allocate shareable memory.
vhost_log_get() now uses 2 globals "vhost_log" and "vhost_log_shm", that
way there is a common non-shareable log and a common shareable one.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 57 ++
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index c0ed5b2..67e09fe 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -334,6 +334,8 @@ static inline void vhost_d
From: Marc-André Lureau
This function is a precondition for most vhost-user tests.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 56df5c
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 827c0c4..4be5583 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -186,7 +186,6 @@
From: Marc-André Lureau
Implement memfd_create() fallback if not available in system libc.
memfd_create() is still not included in glibc today, atlhough it's been
available since Linux 3.17 in Oct 2014.
memfd has numerous advantages over traditional shm/mmap for ipc memory
sharing with fd handle
From: Marc-André Lureau
Split VHOST_SET_LOG_BASE call in a seperate function callback, so that
type safety works and more arguments can be added in the next patches.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-backend.c | 8
hw/virtio/vhost-user.c| 17 +++
From: Marc-André Lureau
Hi,
The following series implement shareable log for vhost-user to support
memory tracking during live migration. On qemu-side, the solution is
fairly straightfoward since vhost already supports the dirty log, only
vhost-user couldn't access the log memory until then.
Th
From: Marc-André Lureau
Check if the backend has VHOST_USER_PROTOCOL_F_LOG_SHMFD feature and
require a shared log.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c| 14 --
include/hw/virtio/vhost-backend.h | 4
2 files changed, 16 insertions(+), 2 delet
From: Marc-André Lureau
Add a new macro to make the qemu command line with other
values of memory size, and specific chardev id.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/tests/vh
From: Marc-André Lureau
Send the shm for the dirty pages logging if the backend supports
VHOST_USER_PROTOCOL_F_LOG_SHMFD. Wait for a reply to make sure
the old log is no longer used.
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-backend.c | 3 ++-
hw/virtio/vhost-user.c
From: Marc-André Lureau
Check if memfd_create() is part of system libc.
Signed-off-by: Marc-André Lureau
---
configure | 19 +++
1 file changed, 19 insertions(+)
diff --git a/configure b/configure
index f14454e..5e77ed5 100755
--- a/configure
+++ b/configure
@@ -3486,6 +3486,2
From: Marc-André Lureau
If VHOST_USER_PROTOCOL_F_LOG_SHMFD is not announced, block vhost-user
migration. The blocker is removed in vhost_dev_cleanup().
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 9 +
hw/virtio/vhost.c | 16
2 files changed, 21
From: Marc-André Lureau
Add qemu_memfd_alloc/free() helpers.
The function helps to allocate and seal shared memory.
Signed-off-by: Marc-André Lureau
---
include/qemu/memfd.h | 4 +++
util/memfd.c | 75 ++--
2 files changed, 77 insertion
From: Marc-André Lureau
New syscalls are not yet widely distributed. Add them to qemu
linux-headers include directory. Update based on v4.3-rc3 kernel headers.
Exclude mips for now, which is more problematic due to extra header
inclusion and probably unnecessary here.
Signed-off-by: Marc-André
From: Thibaut Collet
Some vhost user backends are able to support live migration.
To provide this service the following features must be added:
1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev
backend is vhost-user.
2. Provide a nop receive callback to vhost-user.
From: Marc-André Lureau
Add an open/unlink/mmap fallback for system that do not support
memfd (only available since 3.17, ~1y ago).
This patch may require additional SELinux policies to work for enforced
systems, but should fail gracefully in this case.
Signed-off-by: Marc-André Lureau
---
ut
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
docs/specs/vhost-user.txt | 48 +--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index 4eadad1..e0292a0 100644
--- a/d
From: Marc-André Lureau
This test checks that the log fd is given to the migration source, and
mark dirty pages during migration.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 171 +++-
1 file changed, 169 insertions(+), 2 deletions(
From: Marc-André Lureau
Replace error_report() and use tracing instead. It's not an error to get
a connection or a disconnection, so silence this and trace it instead.
Signed-off-by: Marc-André Lureau
---
net/vhost-user.c | 4 ++--
trace-events | 3 +++
2 files changed, 5 insertions(+), 2
From: Marc-André Lureau
Replace the generic vhost_call() by specific functions for each
function call to help with type safety and changing arguments.
While doing this, I found that "unsigned long long" and "uint64_t" were
used interchangeably and causing compilation warnings, using uint64_t
ins
From: Thibaut Collet
The VHOST_USER_PROTOCOL_FEATURE_MASK will be automatically updated when
adding new features to the enum.
Signed-off-by: Thibaut Collet
[Adapted from mailing list discussion - Marc-André]
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost-user.c | 13 +
1 fil
From: Thibaut Collet
A new vhost user message is added to allow QEMU to ask to vhost user backend to
broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE
capability.
This new message is sent only if the backend supports the new
VHOST_USER_PROTOCOL_F_RARP protocol feature.
From: Marc-André Lureau
In the coming patches, a test will use several servers
simultaneously. Wrap the server in a struct, out of the global scope.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 139 +++-
1 file changed, 89 insertion
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
---
hw/virtio/vhost.c| 3 +++
include/qemu/memfd.h | 2 ++
util/memfd.c | 22 ++
3 files changed, 27 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 1e8ee76..eaf8117 100644
--- a/h
From: Marc-André Lureau
Check that backend source and destination do not have simultaneous
ownership during migration.
Signed-off-by: Marc-André Lureau
---
tests/vhost-user-test.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/tests/vhost-user-test.
From: Marc-André Lureau
clang-format is awesome to reflow your code according to qemu coding
style in an editor (in the region you modify).
(note: clang-tidy should be able to add missing braces around
statements, but I haven't tried it, it's quite recent)
Signed-off-by: Marc-André Lureau
---
From: Marc-André Lureau
v2->v3:
- add patch to introduce g_assert_* from recent glib versions
- check QGA_TEST_SIDE_EFFECTING environment variable instead of VM run
- use base64 decoder/encoder functions instead of hardcoded strings
- fix some copy/paste comment
v1->v2:
- do not loop forever whe
From: Marc-André Lureau
Add a few functions to interact with qmp via a simple fd.
Signed-off-by: Marc-André Lureau
Reviewed-by: Michael Roth
---
tests/libqtest.c | 45 +
tests/libqtest.h | 7 +++
2 files changed, 48 insertions(+), 4 deletions(-
From: Marc-André Lureau
Those are mostly useful for writing tests.
Signed-off-by: Marc-André Lureau
---
include/glib-compat.h | 61 +++
1 file changed, 61 insertions(+)
diff --git a/include/glib-compat.h b/include/glib-compat.h
index 318e000..fb
From: Marc-André Lureau
Move the default verbosity settings before loading the configuration
file, or it will overwrite it. Found thanks to writing qga tests :)
Signed-off-by: Marc-André Lureau
Reviewed-by: Michael Roth
---
qga/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Marc-André Lureau
Having a environment variable allows to override default configuration
path, useful for testing. Note that this can't easily be an argument,
since loading config is done before parsing the arguments.
Signed-off-by: Marc-André Lureau
Reviewed-by: Michael Roth
---
qga/ma
From: Marc-André Lureau
Add some local guest agent tests, as it is better than nothing, only
when CONFIG_POSIX (using unix sockets).
With the QGA_TEST_SIDE_EFFECTING environment variable, it will include
tests with side effects, such as freezing/thawing the FS or changing the
time.
(a better te
From: Marc-André Lureau
If a chardev is allowed to be created outside of QMP, then it must be
also possible to free it. This is useful for ivshmem that creates
chardev anonymously and must be able to free them.
Signed-off-by: Marc-André Lureau
Acked-by: Paolo Bonzini
Reviewed-by: Claudio Fonta
From: Marc-André Lureau
Hi,
This series is mostly about adding the client/server code from David
Marchand, code cleanups, and little improvements and fixes for
ivshmem. Finally there is some ivshmem tests (they work fine without
kvm btw).
Git: https://github.com/elmarco/qemu.git ivshmem branch
From: Marc-André Lureau
ivshmem_read() only reads sizeof(long) from the input buffer. Accepting
more could lead to fifo8 abort() on 32bit systems if fifo is not empty.
A following patch will change the protocol to 64-bit little-endian
instead.
Signed-off-by: Marc-André Lureau
Reviewed-by: Cla
From: Marc-André Lureau
If the fifo has 0 bytes, and the read is of size 1, the call to
fifo8_push_all() will copy off boundary data.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 7138b8d..dea4096 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -71,7 +71,6 @@ t
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index fbeb731..7138b8d 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/
From: Marc-André Lureau
ivshmem is going to use MSIX state conditionally.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
include/hw/pci/msix.h | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
From: Marc-André Lureau
Make a new function fifo_update_and_get() that can be reused by other
functions (in next commits).
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 59 ---
1 file changed, 39 inser
From: Marc-André Lureau
Use the latest qemu device modeling API, in particular, convert to
realize to fix the error handling; right now a botched device_add
ivhsmem command kills the VM.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 119
From: Marc-André Lureau
The test whether the chardev is an AF_UNIX socket rejects
"-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device
ivshmem,chardev=chr0", but fails to explain why.
Use an explicit error on why a chardev may be rejected.
Signed-off-by: Marc-André Lureau
Reviewed-by:
From: Marc-André Lureau
Failing to create a chardev shouldn't be fatal.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 62547c0..e7224b9 100644
-
From: Marc-André Lureau
Limit the maximum number of peers to MAXUINT16. This is more realistic
and better matches the limit of the doorbell register.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Marc-André Lureau
qemu_chr_fe_get_msgfd() transfers ownership, there is no need to dup the
fd.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/hw/misc/ivshmem.c
From: Marc-André Lureau
It simplifies a bit the code to allocate the array when setting the
number of peers instead of lazily when receiving the first vector.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 11 ++-
1 file changed, 2 insertions(+),
From: Marc-André Lureau
The common version correctly checks for 0 value case.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index fbb6f40..e678b
From: Marc-André Lureau
Free all objects owned by the device, making sure the device is free,
fixing hot-unplug.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 38 +++---
1 file changed, 35 insertions(+), 3 deletions(-)
d
From: Marc-André Lureau
val isn't used in ivshmem_update_irq() function.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 19640bb..374ecff
From: Marc-André Lureau
Some misc improvements to ivshmem debug.
Signed-off-by: Marc-André Lureau
---
hw/misc/ivshmem.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index c4c130d..50f9c8f 100644
--- a/hw/misc/ivshmem.c
+++
From: Marc-André Lureau
Set the number of peers and array allocation in a single place. Rename
to better reflect the function content.
Signed-off-by: Marc-André Lureau
Reviewed-by: Claudio Fontana
---
hw/misc/ivshmem.c | 27 +++
1 file changed, 11 insertions(+), 16 del
1 - 100 of 3907 matches
Mail list logo