- Dec 08, 2020
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201125100640.366523-2-marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Chen authored
The 'elem' is allocated memory in vu_queue_pop(), and its memory should be freed in all error branches after vu_queue_pop(). In addition, in order to free the 'elem' memory outside of while(1) loop, move the definition of 'elem' to the beginning of vus_proc_req(). Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Alex Chen <alex.chen@huawei.com> Reviewed-by:
Raphael Norwitz <raphael.norwitz@nutanix.com> Message-Id: <20201125013055.34147-1-alex.chen@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Nov 17, 2020
-
-
Alex Chen authored
When socket() fails, it returns -1, 0 is the normal return value and should not return error. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
AlexChen <alex.chen@huawei.com> Message-Id: <5F9A5B48.9030509@huawei.com> Reviewed-by:
Raphael Norwitz <raphael.norwitz@nutanix.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Chen authored
We should use printf format specifier "%u" instead of "%d" for argument of type "unsigned int". Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Alex Chen <alex.chen@huawei.com> Message-Id: <5FA28106.6000901@huawei.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Nov 16, 2020
-
-
Alex Chen authored
Either accept() fails or exits normally, we need to close the fd. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Alex Chen <alex.chen@huawei.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201109082829.87496-3-alex.chen@huawei.com> Message-Id: <20201110192316.26397-3-alex.bennee@linaro.org>
-
Alex Chen authored
Close the fd when the connect() fails. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Alex Chen <alex.chen@huawei.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20201109082829.87496-2-alex.chen@huawei.com> Message-Id: <20201110192316.26397-2-alex.bennee@linaro.org>
-
- Nov 12, 2020
-
-
Stefan Hajnoczi authored
QEMU currently truncates the mmap_offset field when sending VHOST_USER_ADD_MEM_REG and VHOST_USER_REM_MEM_REG messages. The struct layout looks like this: typedef struct VhostUserMemoryRegion { uint64_t guest_phys_addr; uint64_t memory_size; uint64_t userspace_addr; uint64_t mmap_offset; } VhostUserMemoryRegion; typedef struct VhostUserMemRegMsg { uint32_t padding; /* WARNING: there is a 32-bit hole here! */ VhostUserMemoryRegion region; } VhostUserMemRegMsg; The payload size is calculated as follows when sending the message in hw/virtio/vhost-user.c: msg->hdr.size = sizeof(msg->payload.mem_reg.padding) + sizeof(VhostUserMemoryRegion); This calculation produces an incorrect result of only 36 bytes. sizeof(VhostUserMemRegMsg) is actually 40 bytes. The consequence of this is that the final field, mmap_offset, is truncated. This breaks x86_64 TCG guests on s390 hosts. Other guest/host combinations may get lucky if either of the following holds: 1. The guest memory layout does not need mmap_offset != 0. 2. The host is little-endian and mmap_offset <= 0xffffffff so the truncation has no effect. Fix this by extending the existing 32-bit padding field to 64-bit. Now the padding reflects the actual compiler padding. This can be verified using pahole(1). Also document the layout properly in the vhost-user specification. The vhost-user spec did not document the exact layout. It would be impossible to implement the spec without looking at the QEMU source code. Existing vhost-user frontends and device backends continue to work after this fix has been applied. The only change in the wire protocol is that QEMU now sets hdr.size to 40 instead of 36. If a vhost-user implementation has a hardcoded size check for 36 bytes, then it will fail with new QEMUs. Both QEMU and DPDK/SPDK don't check the exact payload size, so they continue to work. Fixes: f1aeb14b ("Transmit vhost-user memory regions individually") Cc: Raphael Norwitz <raphael.norwitz@nutanix.com> Cc: Cornelia Huck <cohuck@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201109174355.1069147-1-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Fixes: f1aeb14b ("Transmit vhost-user memory regions individually") Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Raphael Norwitz <raphael.norwitz@nutanix.com>
-
- Nov 03, 2020
-
-
Stefan Hajnoczi authored
Refuse get_config() in excess of sizeof(struct virtio_blk_config). Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201027173528.213464-6-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Stefan Hajnoczi authored
Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201027173528.213464-2-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Marc Hartmayer authored
The option `libexecdir` is relative to `prefix` (see https://mesonbuild.com/Builtin-options.html ), so we have to be aware of this when creating 50-qemu-gpu.json and 50-qemu-virtiofsd.json. Otherwise, tools like libvirt will not be able to find the executable. Fixes: 16bf7a33 ("configure: move directory options from config-host.mak to meson") Signed-off-by:
Marc Hartmayer <mhartmay@linux.ibm.com> Message-Id: <20201103112333.24734-1-mhartmay@linux.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 27, 2020
-
-
Alex Chen authored
The 'kdgb' is allocating memory in get_kdbg(), but it is not freed in both fill_header() and fill_context() failed branches, fix it. Signed-off-by:
AlexChen <alex.chen@huawei.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Reviewed-by:
Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <5F463659.8080101@huawei.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by:
Subbaraya Sundeep <sundeep.lkml@gmail.com> Acked-by:
Michael Rolnik <mrolnik@gmail.com> Acked-by:
Thomas Huth <huth@tuxfamily.org> Acked-by:
James Hogan <jhogan@kernel.org> Acked-by:
Artyom Tarasenko <atar4qemu@gmail.com> Message-id: <20201004182506.2038515-1-f4bug@amsat.org> Message-Id: <20201021163136.27324-3-alex.bennee@linaro.org>
-
Ani Sinha authored
Ani is an individual contributor into qemu project. Adding my email into the correct file to reflect so. Signed-off-by:
Ani Sinha <ani@anisinha.ca> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201007161940.1478-1-ani@anisinha.ca> Message-Id: <20201021163136.27324-2-alex.bennee@linaro.org>
-
- Oct 26, 2020
-
-
Paolo Bonzini authored
Since installation is not part of Makefiles anymore, Make need not know the directories anymore. Meson already knows them through built-in options, do everything using them instead of the config_host dictionary. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 23, 2020
-
-
Stefan Hajnoczi authored
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build the static library once and then reuse it throughout QEMU. Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the vhost-user tools (vhost-user-gpu, etc) do. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20200924151549.913737-14-stefanha@redhat.com [Added CONFIG_LINUX again because libvhost-user doesn't build on macOS. --Stefan] Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Coiby Xu authored
When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by:
Coiby Xu <coiby.xu@gmail.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20200918080912.321299-3-coiby.xu@gmail.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Coiby Xu authored
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Coiby Xu <coiby.xu@gmail.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20200918080912.321299-2-coiby.xu@gmail.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Oct 09, 2020
-
-
Yonggang Luo authored
Signed-off-by:
Yonggang Luo <luoyonggang@gmail.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201001163429.1348-3-luoyonggang@gmail.com> Message-Id: <20201007160038.26953-21-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributors from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Roman Kagan <rvkagan@yandex-team.ru> Message-Id: <20201006160653.2391972-12-f4bug@amsat.org> Message-Id: <20201007160038.26953-18-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributions from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20201006160653.2391972-11-f4bug@amsat.org> Message-Id: <20201007160038.26953-17-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributors from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Bruce Rogers <brogers@suse.com> Message-Id: <20201006160653.2391972-10-f4bug@amsat.org> Message-Id: <20201007160038.26953-16-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Nir Soffer <nirsof@gmail.com> Message-Id: <20201006160653.2391972-9-f4bug@amsat.org> Message-Id: <20201007160038.26953-15-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributions from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20201006160653.2391972-8-f4bug@amsat.org> Message-Id: <20201007160038.26953-14-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributions from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Graeme Gregory <graeme@nuviainc.com> Message-Id: <20201006160653.2391972-7-f4bug@amsat.org> Message-Id: <20201007160038.26953-13-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributors from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Erik Kline <ek@google.com> Message-Id: <20201006160653.2391972-6-f4bug@amsat.org> Message-Id: <20201007160038.26953-12-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributors from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Jiachen Zhang <zhangjiachen.jaycee@bytedance.com> Message-Id: <20201006160653.2391972-5-f4bug@amsat.org> Message-Id: <20201007160038.26953-11-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributors from this domain, add its own entry to the gitdm domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Chai Wen <chaiwen@baidu.com> Message-Id: <20201006160653.2391972-4-f4bug@amsat.org> Message-Id: <20201007160038.26953-10-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
These individual contributors have a number of contributions, add them to the 'individual' group map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Helge Deller <deller@gmx.de> Acked-by:
Stefan Weil <sw@weilnetz.de> Acked-by:
Niek Linnenbank <nieklinnenbank@gmail.com> Acked-by:
David Carlier <devnexen@gmail.com> Acked-by:
Paul Zimmerman <pauldzim@gmail.com> Acked-by:
Volker Rümelin <vr_qemu@t-online.de> Acked-by:
Finn Thain <fthain@telegraphics.com.au> Message-Id: <20201006160653.2391972-3-f4bug@amsat.org> Message-Id: <20201007160038.26953-9-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
There is a number of contributions from these academic domains. Add the entries to the gitdm 'academic' domain map. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Alexander Bulekov <alxndr@bu.edu> Reviewed-by:
Dayeol Lee <dayeol@berkeley.edu> Acked-by:
Fan Yang <Fan_Yang@sjtu.edu.cn> Acked-by:
Xinyu Li <precinct@mail.ustc.edu.cn> Acked-by:
Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-Id: <20201006160653.2391972-2-f4bug@amsat.org> Message-Id: <20201007160038.26953-8-alex.bennee@linaro.org>
-
- Sep 29, 2020
-
-
Stefan Hajnoczi authored
vu_panic() is not guaranteed to exit the program. Return early when errors are encountered. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200921113420.154378-3-stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Stefan Hajnoczi authored
vu_panic() is not guaranteed to exit the program. Return early when errors are encountered. Note that libvhost-user does not have an "unmap" operation for mapped descriptors. Therefore it is correct to return without explicit cleanup. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200921113420.154378-2-stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Sep 23, 2020
-
-
Stefan Hajnoczi authored
clang's C11 atomic_fetch_*() functions only take a C11 atomic type pointer argument. QEMU uses direct types (int, etc) and this causes a compiler error when a QEMU code calls these functions in a source file that also included <stdatomic.h> via a system header file: $ CC=clang CXX=clang++ ./configure ... && make ../util/async.c:79:17: error: address argument to atomic operation must be a pointer to _Atomic type ('unsigned int *' invalid) Avoid using atomic_*() names in QEMU's atomic.h since that namespace is used by <stdatomic.h>. Prefix QEMU's APIs with 'q' so that atomic.h and <stdatomic.h> can co-exist. I checked /usr/include on my machine and searched GitHub for existing "qatomic_" users but there seem to be none. This patch was generated using: $ git grep -h -o '\<atomic\(64\)\?_[a-z0-9_]\+' include/qemu/atomic.h | \ sort -u >/tmp/changed_identifiers $ for identifier in $(</tmp/changed_identifiers); do sed -i "s%\<$identifier\>%q$identifier%g" \ $(git grep -I -l "\<$identifier\>") done I manually fixed line-wrap issues and misaligned rST tables. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200923105646.47864-1-stefanha@redhat.com>
-
Marc Hartmayer authored
Since virtio existed even before it got standardized, the virtio standard defines the following types of virtio devices: + legacy device (pre-virtio 1.0) + non-legacy or VIRTIO 1.0 device + transitional device (which can act both as legacy and non-legacy) Virtio 1.0 defines the fields of the virtqueues as little endian, while legacy uses guest's native endian [1]. Currently libvhost-user does not handle virtio endianness at all, i.e. it works only if the native endianness matches with whatever is actually needed. That means things break spectacularly on big-endian targets. Let us handle virtio endianness for non-legacy as required by the virtio specification [1] and fence legacy virtio, as there is no safe way to figure out the needed endianness conversions for all cases. The fencing of legacy virtio devices is done in `vu_set_features_exec`. [1] https://docs.oasis-open.org/virtio/virtio/v1.1/cs01/virtio-v1.1-cs01.html#x1-210003 Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Marc Hartmayer <mhartmay@linux.ibm.com> Message-id: 20200901150019.29229-3-mhartmay@linux.ibm.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Sep 17, 2020
-
-
zhaolichang authored
I found that there are many spelling errors in the comments of qemu, so I used the spellcheck tool to check the spelling errors and finally found some spelling errors in the contrib folder. Signed-off-by:
zhaolichang <zhaolichang@huawei.com> Reviewed-by:
Alex Bennee <alex.bennee@linaro.org> Message-Id: <20200917075029.313-11-zhaolichang@huawei.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Sep 10, 2020
-
-
Alex Bennée authored
We have an exploding complexity problem in the testing so lets just move the more involved plugins into contrib. tests/plugins still exist for the basic plugins that exercise the API. We restore the old pre-meson style Makefile for contrib as it also doubles as a guide for out-of-tree plugin builds. While we are at it add some examples to the documentation and a specific plugins build target. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200909112742.25730-11-alex.bennee@linaro.org>
-
- Sep 01, 2020
-
-
Marc-André Lureau authored
When cross-compiling, by default qemu_datadir is 'c:\Program Files\QEMU', which is not recognized as being an absolute path, and meson will end up adding the prefix again. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826110419.528931-6-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 27, 2020
-
-
Paolo Bonzini authored
When pixman is not installed (or too old), but virglrenderer is available and "configure" has been run with "--disable-system", the build currently aborts when trying to compile vhost-user-gpu (since it requires pixman). Let's skip the build of vhost-user-gpu when pixman is not installed or too old. Instead of adding CONFIG_PIXMAN, it is simpler to move the detection to pixman. Based on a patch by Thomas Huth. <thuth@redhat.com> Fixes: 9b52b17b ("configure: Allow to build tools without pixman") Reported-by:
Rafael Kitover <rkitover@gmail.com> Reported-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 21, 2020
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-