- Jan 02, 2021
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Reviewed-by:
Daniel Berrangé <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 18, 2020
-
-
Alex Chen authored
When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid() returns 0 and assigns the result to *fd, so We have to check that *fd is 0, not that fd is 0. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
AlexChen <alex.chen@huawei.com> Message-Id: <5F9AC6FF.4000301@huawei.com> Reviewed-by:
Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by:
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
-
- Dec 13, 2020
-
-
Pan Nengyuan authored
Missing g_error_free in pdb_init_from_file() error path. Fix that. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by:
Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Chen Qun <kuhn.chenqun@huawei.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201023061218.2080844-5-kuhn.chenqun@huawei.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Pan Nengyuan authored
Missing g_error_free in QEMU_Elf_init() error path. Fix that. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by:
Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Chen Qun <kuhn.chenqun@huawei.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201023061218.2080844-4-kuhn.chenqun@huawei.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Dec 10, 2020
-
-
Markus Armbruster authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h contrib/libvhost-user/libvhost-user.c contrib/libvhost-user/libvhost-user.h contrib/plugins/hotblocks.c contrib/plugins/hotpages.c contrib/plugins/howvec.c contrib/plugins/lockstep.c linux-user/mips64/cpu_loop.c linux-user/mips64/signal.c linux-user/sparc64/cpu_loop.c linux-user/sparc64/signal.c linux-user/x86_64/cpu_loop.c linux-user/x86_64/signal.c target/s390x/gen-features.c tests/fp/platform.h tests/migration/s390x/a-b-bios.c tests/plugin/bb.c tests/plugin/empty.c tests/plugin/insn.c tests/plugin/mem.c tests/test-rcu-simpleq.c tests/test-rcu-slist.c tests/test-rcu-tailq.c tests/uefi-test-tools/UefiTestToolsPkg/BiosTablesTest/BiosTablesTest.c contrib/plugins/, tests/plugin/, and tests/test-rcu-slist.c appear not to include osdep.h intentionally. The remaining reverts are the same as in commit bbfff196. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201113061216.2483385-1-armbru@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Acked-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Alexander Bulekov <alxndr@bu.edu>
-
- Dec 09, 2020
-
-
Stefan Hajnoczi authored
Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201118091644.199527-4-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Stefan Hajnoczi authored
Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201118091644.199527-3-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Stefan Hajnoczi authored
Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201118091644.199527-2-stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Dec 08, 2020
-
-
Marc-André Lureau authored
By making libvhost-user a subproject, check it builds standalone (without the global QEMU cflags etc). Note that the library still relies on QEMU include/qemu/atomic.h and linux_headers/. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201125100640.366523-6-marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201125100640.366523-5-marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201125100640.366523-4-marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Marc-André Lureau authored
Undo the damage from commit 5f9ff1ef ("libvhost-user: Support tracking inflight I/O in shared memory") which introduced glib dependency through osdep.h inclusion. libvhost-user.c tries to stay free from glib usage. Use glibc memfd_create directly when available (assumed so when MFD_ALLOW_SEALING is defined). A following commit will make the project standalone and check for memfd API at configure time, instead of a panic at runtime. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20201125100640.366523-3-marcandre.lureau@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
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>
-