- Jan 08, 2022
-
-
Frédéric Pétrot authored
Addition of div and rem on 128-bit integers, using the 128/64->128 divu and 64x64->128 mulu in host-utils. These operations will be used within div/rem helpers in the 128-bit riscv target. Signed-off-by:
Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr> Co-authored-by:
Fabien Portas <fabien.portas@grenoble-inp.org> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Message-id: 20220106210108.138226-4-frederic.petrot@univ-grenoble-alpes.fr Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
David Hildenbrand authored
Temporarily modifying the SIGBUS handler is really nasty, as we might be unlucky and receive an MCE SIGBUS while having our handler registered. Unfortunately, there is no way around messing with SIGBUS when MADV_POPULATE_WRITE is not applicable or not around. Let's forward SIGBUS that don't belong to us to the already registered handler and document the situation. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-8-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Jan 07, 2022
-
-
David Hildenbrand authored
Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE path can run concurrently. Note that page_mutex and page_cond are shared between concurrent invocations, which shouldn't be a problem. This is a preparation for future virtio-mem prealloc code, which will call os_mem_prealloc() asynchronously from an iothread when handling guest requests. Reviewed-by:
Pankaj Gupta <pankaj.gupta@ionos.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-7-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
David Hildenbrand authored
Let's simplify the case when we only want a single thread and don't have to mess with signal handlers. Reviewed-by:
Pankaj Gupta <pankaj.gupta@ionos.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-6-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
David Hildenbrand authored
Let's limit the number of threads to something sane, especially that - We don't have more threads than the number of pages we have - We don't have threads that initialize small (< 64 MiB) memory Reviewed-by:
Pankaj Gupta <pankaj.gupta@ionos.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-5-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
David Hildenbrand authored
Let's minimize the number of global variables to prepare for os_mem_prealloc() getting called concurrently and make the code a bit easier to read. The only consumer that really needs a global variable is the sigbus handler, which will require protection via a mutex in the future either way as we cannot concurrently mess with the SIGBUS handler. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-4-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
David Hildenbrand authored
Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is, therefore, faster and easier to handle than our current approach. While MADV_POPULATE_WRITE is, in general, faster than manual prefaulting, and especially faster with 4k pages, there is still value in prefaulting using multiple threads to speed up preallocation. More details on MADV_POPULATE_WRITE can be found in the Linux commits 4ca9b3859dac ("mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables") and eb2faa513c24 ("mm/madvise: report SIGBUS as -EFAULT for MADV_POPULATE_(READ|WRITE)"), and in the man page proposal [1]. This resolves the TODO in do_touch_pages(). In the future, we might want to look into using fallocate(), eventually combined with MADV_POPULATE_READ, when dealing with shared file/fd mappings and not caring about memory bindings. [1] https://lkml.kernel.org/r/20210816081922.5155-1-david@redhat.com Reviewed-by:
Pankaj Gupta <pankaj.gupta@ionos.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-3-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
David Hildenbrand authored
Let's prepare touch_all_pages() for returning differing errors. Return an error from the thread and report the last processed error. Translate SIGBUS to -EFAULT, as a SIGBUS can mean all different kind of things (memory error, read error, out of memory). When allocating memory fails via the current SIGBUS-based mechanism, we'll get: os_mem_prealloc: preallocating memory failed: Bad address Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20211217134611.31172-2-david@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Nov 16, 2021
-
-
Hanna Reitz authored
Invoke the transaction drivers' .clean() methods only after all .commit() or .abort() handlers are done. This makes it easier to have nested transactions where the top-level transactions pass objects to lower transactions that the latter can still use throughout their commit/abort phases, while the top-level transaction keeps a reference that is released in its .clean() method. (Before this commit, that is also possible, but the top-level transaction would need to take care to invoke tran_add() before the lower-level transaction does. This commit makes the ordering irrelevant, which is just a bit nicer.) Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-8-hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-8-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
- Nov 10, 2021
-
-
Greg Kurz authored
The drain_rcu_call() function can be blocked as long as an RCU reader stays in a read-side critical section. This is typically what happens when a TCG vCPU is executing a busy loop. It can deadlock the QEMU monitor as reported in https://gitlab.com/qemu-project/qemu/-/issues/650 . This can be avoided by allowing drain_rcu_call() to enforce an RCU grace period. Since each reader might need to do specific actions to end a read-side critical section, do it with notifiers. Prepare ground for this by adding a notifier list to the RCU reader struct and use it in wait_for_readers() if drain_rcu_call() is in progress. An API is added for readers to register their notifiers. This is largely based on a draft from Paolo Bonzini. Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211109183523.47726-2-groug@kaod.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Nov 02, 2021
-
-
Eugenio Pérez authored
As qemu guidelines: Unless a pointer is used to modify the pointed-to storage, give it the "const" attribute. In the particular case of iova_tree_find it allows to enforce what is requested by its comment, since the compiler would shout in case of modifying or freeing the const-qualified returned pointer. Signed-off-by:
Eugenio Pérez <eperezma@redhat.com> Acked-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211013182713.888753-2-eperezma@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 28, 2021
-
-
Luis Pires authored
These will be used to implement new decimal floating point instructions from Power ISA 3.1. The remainder is now returned directly by divu128/divs128, freeing up phigh to receive the high 64 bits of the quotient. Signed-off-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211025191154.350831-4-luis.pires@eldorado.org.br> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Luis Pires authored
In preparation for changing the divu128/divs128 implementations to allow for quotients larger than 64 bits, move the div-by-zero and overflow checks to the callers. Signed-off-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211025191154.350831-2-luis.pires@eldorado.org.br> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 15, 2021
-
-
Kevin Wolf authored
Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted while iterating through the whole list. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211008133442.141332-11-kwolf@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Peter Krempa <pkrempa@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Oct 14, 2021
-
-
Paolo Bonzini authored
Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130829.632254-15-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This makes the pthreads check dead in configure, so remove it as well. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130829.632254-9-pbonzini@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 13, 2021
-
-
Kacper Słomiński authored
This allows the use of native signalfd instead of the sigtimedwait based emulation on systems other than Linux. Signed-off-by:
Kacper Słomiński <kacper.slominski72@gmail.com> Message-Id: <20210905011621.200785-1-kacper.slominski72@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 30, 2021
-
-
Marc-André Lureau authored
The QAPI schema shouldn't rely on C system headers #define, but on configure-time project #define, so we can express the build condition in a C-independent way. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210907121943.3498701-3-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 29, 2021
-
-
Luis Pires authored
The previous code didn't detect overflows if the high 64-bit of the dividend were equal to the 64-bit divisor. In that case, 64 bits wouldn't be enough to hold the quotient. Signed-off-by:
Luis Pires <luis.pires@eldorado.org.br> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210910112624.72748-2-luis.pires@eldorado.org.br> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Sep 27, 2021
-
-
Markus Armbruster authored
Simple unions predate flat unions. Having both complicates the QAPI schema language and the QAPI generator. We haven't been using simple unions in new code for a long time, because they are less flexible and somewhat awkward on the wire. To prepare for their removal, convert simple union SocketAddressLegacy to an equivalent flat one, with existing enum SocketAddressType replacing implicit enum type SocketAddressLegacyKind. Adds some boilerplate to the schema, which is a bit ugly, but a lot easier to maintain than the simple union feature. Cc: "Daniel P. Berrangé" <berrange@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20210917143134.412106-9-armbru@redhat.com>
-
- Sep 15, 2021
-
-
Alex Chen authored
As we can see from the following function call stack, amaster and aslave can not be NULL: char_pty_open() -> qemu_openpty_raw() -> openpty(). In addition, according to the API specification for openpty(): https://www.gnu.org/software/libc/manual/html_node/Pseudo_002dTerminal-Pairs.html , the arguments name, termp and winp can all be NULL, but arguments amaster or aslave can not be NULL. Finally, amaster and aslave has been dereferenced at the beginning of the openpty(). So the checks on amaster and aslave in the openpty() are redundant. Remove them. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Alex Chen <alex.chen@huawei.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <5F9FE5B8.1030803@huawei.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Sep 13, 2021
-
-
Richard Henderson authored
This seems to be either a glibc or gcc bug, but the code appears to be fine with the warning suppressed. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210803211907.150525-1-richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 07, 2021
-
-
Philippe Mathieu-Daudé authored
Pass qemu_vfio_do_mapping() an Error* argument so it can propagate any error to callers. Replace error_report() which only report to the monitor by the more generic error_setg_errno(). Reviewed-by:
Fam Zheng <fam@euphon.net> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-11-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
To simplify qemu_vfio_dma_map(): - reduce 'ret' (returned value) scope by returning errno directly, - remove the goto 'out' label. Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-10-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
Both qemu_vfio_find_fixed_iova() and qemu_vfio_find_temp_iova() return an errno which is unused (or overwritten). Have them propagate eventual errors to callers, returning a boolean (which is what the Error API recommends, see commit e3fe3988 "error: Document Error API usage rules" for rationale). Suggested-by:
Klaus Jensen <k.jensen@samsung.com> Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-9-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
Extract qemu_vfio_water_mark_reached() for readability, and have it provide an error hint it its Error* handle. Suggested-by:
Klaus Jensen <k.jensen@samsung.com> Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-8-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
Currently qemu_vfio_dma_map() displays errors on stderr. When using management interface, this information is simply lost. Pass qemu_vfio_dma_map() an Error** handle so it can propagate the error to callers. Reviewed-by:
Fam Zheng <fam@euphon.net> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-7-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
qemu_vfio_add_mapping() returns a pointer to an indexed entry in pre-allocated QEMUVFIOState::mappings[], thus can not be NULL. Remove the pointless check. Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-5-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
Simplify qemu_vfio_dma_[un]map() handlers by replacing a pair of qemu_mutex_lock/qemu_mutex_unlock calls by the WITH_QEMU_LOCK_GUARD macro. Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-4-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Philippe Mathieu-Daudé authored
Instead of displaying the error on stderr, use error_report() which also report to the monitor. Reviewed-by:
Fam Zheng <fam@euphon.net> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Klaus Jensen <k.jensen@samsung.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210902070025.197072-3-philmd@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Sep 06, 2021
-
-
Michael Tokarev authored
Commit 4cfd970e added an assert which ensures the path within an address of a unix socket returned from the kernel is at least one byte and does not exceed sun_path buffer. Both of this constraints are wrong: A unix socket can be unnamed, in this case the path is completely empty (not even \0) And some implementations (notable linux) can add extra trailing byte (\0) _after_ the sun_path buffer if we passed buffer larger than it (and we do). So remove the assertion (since it causes real-life breakage) but at the same time fix the usage of sun_path. Namely, we should not access sun_path[0] if kernel did not return it at all (this is the case for unnamed sockets), and use the returned salen when copyig actual path as an upper constraint for the amount of bytes to copy - this will ensure we wont exceed the information provided by the kernel, regardless whenever there is a trailing \0 or not. This also helps with unnamed sockets. Note the case of abstract socket, the sun_path is actually a blob and can contain \0 characters, - it should not be passed to g_strndup and the like, it should be accessed by memcpy-like functions. Fixes: 4cfd970e Fixes: http://bugs.debian.org/993145 Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> CC: qemu-stable@nongnu.org
-
- Aug 04, 2021
-
-
Marc-André Lureau authored
Commit 776b97d3 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix() and copied the whole sun_path without taking "salen" into account. Later, commit 3b14b4ec "sockets: Fix socket_sockaddr_to_address_unix() for abstract sockets" handled the abstract UNIX path, by stripping the leading \0 character and fixing address details, but didn't use salen either. Not taking "salen" into account may result in incorrect "path" being returned in monitors commands, as we read past the address which is not necessarily \0-terminated. Fixes: 776b97d3 Fixes: 3b14b4ec Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
xiaoqiang zhao <zxq_yx_007@163.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Jul 26, 2021
-
-
Richard Henderson authored
From clang-13: util/selfmap.c:26:21: error: variable 'errors' set but not used \ [-Werror,-Wunused-but-set-variable] Quite right of course, but there's no reason not to check errors. First, incrementing errors is incorrect, because qemu_strtoul returns an errno not a count -- just or them together so that we have a non-zero value at the end. Second, if we have an error, do not add the struct to the list, but free it instead. Cc: Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jul 22, 2021
-
-
Stefan Hajnoczi authored
Commit d8fb7d09 ("vl: switch -M parsing to keyval") stopped adding the "machine" QemuOptsList. This causes "machine" options to not show up in QMP query-command-line-options output. For example, libvirt cannot detect that kernel_irqchip support is available. Adjust the "machine" opts enumeration in qmp_query_command_line_options() so that options are properly reported. Fixes: d8fb7d09 ("vl: switch -M parsing to keyval") Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20210721151055.424580-1-stefanha@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 21, 2021
-
-
Richard Henderson authored
Use it to avoid some clang-12 -Watomic-alignment errors, forcing some structures to be aligned and as a pointer when we have ensured that the address is aligned. Tested-by:
Cole Robinson <crobinso@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Stefano Garzarella authored
The `aio-max-batch` parameter will be propagated to AIO engines and it will be used to control the maximum number of queued requests. When there are in queue a number of requests equal to `aio-max-batch`, the engine invokes the system call to forward the requests to the kernel. This parameter allows us to control the maximum batch size to reduce the latency that requests might accumulate while queued in the AIO engine queue. If `aio-max-batch` is equal to 0 (default value), the AIO engine will use its default maximum batch size value. Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Message-id: 20210721094211.69853-3-sgarzare@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jul 20, 2021
-
-
Paolo Bonzini authored
The leak is basically impossible to reach, since the only common way to get ferror(fp) is by passing a directory to -readconfig. In that case, the error occurs before qdict is set to anything non-NULL. However, it's theoretically possible to get there after an EIO. Cc: armbru@redhat.com Reported-by:
Peter Maydell <peter.maydell@linaro.org> Fixes: f7544edc ("qemu-config: add error propagation to qemu_config_parse", 2021-03-06) Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Ensure that the callback to qemu_config_foreach is never called upon an error, by moving the invocation before the "out" label. Cc: armbru@redhat.com Fixes: 37701411 ("qemu-config: parse configuration files to a QDict", 2021-06-04) Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 09, 2021
-
-
Mark Nelson authored
We know that in the body of this if statement i is less than len, so we really should be copying len - i bytes not i - len bytes. Fix this typo. Fixes: 8d8404f1 ("util: Add qemu_guest_getrandom and associated routines") Signed-off-by:
Mark Nelson <mdnelson8@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210709120600.11080-1-mdnelson8@gmail.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Markus Armbruster authored
Commit c6ecec43 "qemu-option: Check return value instead of @err where convenient" simplified opts = qemu_opts_create(list, qdict_get_try_str(qdict, "id"), 1, &local_err); if (local_err) { error_propagate(errp, local_err); return NULL; } to opts = qemu_opts_create(list, qdict_get_try_str(qdict, "id"), 1, errp); if (!opts) { return NULL; } but neglected to delete assert(opts != NULL); Do that now. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210610085026.436081-1-armbru@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-