- Sep 19, 2019
-
-
James Le Cuirot authored
This dependency is currently "automagic", which is bad for distributions. Signed-off-by:
James Le Cuirot <chewi@gentoo.org> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20190914145155.19360-1-chewi@gentoo.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Greg Kurz authored
Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <156829664683.2070256.13400788010568373502.stgit@bahia.tls.ibm.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Justin Hibbits authored
machdep.cacheline_size is an integer, not a long. Since PowerPC is big-endian this causes sysctlbyname() to fill in the upper bits of the argument, rather than the correct 'lower bits' of the word. Specify the correct type to fix this. Fixes: b255b2c8 ("util: add cacheinfo") Signed-off-by:
Justin Hibbits <chmeeedalf@gmail.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu> Tested-by:
Justin Hibbits <chmeeedalf@gmail.com> Message-Id: <20190821082546.5252-2-laurent@vivier.eu>
-
Eric Blake authored
This file is version-controlled, and not generated from a .json file. Fixes: bf582c34 Reported-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190912184607.3507-1-eblake@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
KONRAD Frederic authored
The "access" arguments clash with a macro under Windows with MinGW: CC m68k-softmmu/target/m68k/fpu_helper.o target/m68k/fpu_helper.c: In function 'fmovem_predec': target/m68k/fpu_helper.c:405:56: error: macro "access" passed 4 arguments, but takes just 2 size = access(env, addr, &env->fregs[i], ra); So this renames them access_fn. Tested with: ./configure --target-list=m68k-softmmu make -j8 Signed-off-by:
KONRAD Frederic <frederic.konrad@adacore.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <1568296920-29939-1-git-send-email-frederic.konrad@adacore.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Thomas Huth authored
We've got a separate option to configure the accelerator nowadays, which is shorter to type and the preferred way of specifying an accelerator. Use it in the source and examples to show that it is the favored option. (However, do not touch the places yet which also specify other machine options or multiple accelerators - these are currently still better handled with one single "-machine" statement instead) Signed-off-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190904052739.22123-1-thuth@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Philippe Mathieu-Daudé authored
"qemu/cutils.h" contains various qemu_strtosz_*() functions useful to convert strings to size. It seems natural to have the opposite usage (from size to string) there too. The function definition is already in util/cutils.c. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Message-Id: <20190903120555.7551-1-philmd@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Chen Zhang authored
Signed-off-by:
Chen Zhang <tgfbeta@me.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <8E5A9C27-C76D-46CF-85B0-79121A00B05F@me.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Sep 17, 2019
-
-
Peter Maydell authored
Switch the SPARC target from the old unassigned_access hook to the new do_transaction_failed hook. This will cause the "if transaction failed" code paths added in the previous commits to become active if the access is to an unassigned address. In particular we'll now handle bus errors during page table walks correctly (generating a translation error with the right kind of fault status). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-8-peter.maydell@linaro.org
-
Peter Maydell authored
The dump_mmu() function does a ldl_phys() at the start, but then never uses the value it loads at all. Remove the unused code. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-7-peter.maydell@linaro.org
-
Peter Maydell authored
Convert the mmu_probe() function to using address_space_ldl() rather than ldl_phys(), so we can explicitly detect memory transaction failures. This makes no practical difference at the moment, because ldl_phys() will return 0 on a transaction failure, and we treat transaction failures and 0 PDEs identically. However the spec says that MMU probe operations are supposed to update the fault status registers, and if we ever implement that we'll want to distinguish the difference. For the moment, just add a TODO comment about the bug. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-6-peter.maydell@linaro.org
-
Peter Maydell authored
Currently we use the ldl_phys() function to read page table entries. With the unassigned_access hook in place, if these hit an unassigned area of memory then the hook will cause us to wrongly generate an exception with a fault address matching the address of the page table entry. Change to using address_space_ldl() so we can detect and correctly handle bus errors and give them their correct behaviour of causing a translation error with a suitable fault status register. Note that this won't actually take effect until we switch the over to using the do_translation_failed hook. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-5-peter.maydell@linaro.org
-
Peter Maydell authored
Currently the ld/st_asi helper functions make calls to the ld*_phys() and st*_phys() functions for those ASIs which imply direct accesses to physical addresses. These implicitly rely on the unassigned_access hook to cause them to generate an MMU fault if the access fails. Switch to using the address_space_* functions instead, which return a MemTxResult that we can check. This means that when we switch SPARC over to using the do_transaction_failed hook we'll still get the same MMU faults we did before. This commit converts the ASIs which do MXCC stream source and destination accesses. It's not clear to me whether raising an MMU fault like this is the correct behaviour if we encounter a bus error, but we retain the same behaviour that the old unassigned_access hook would implement. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-4-peter.maydell@linaro.org
-
Peter Maydell authored
Currently the ld/st_asi helper functions make calls to the ld*_phys() and st*_phys() functions for those ASIs which imply direct accesses to physical addresses. These implicitly rely on the unassigned_access hook to cause them to generate an MMU fault if the access fails. Switch to using the address_space_* functions instead, which return a MemTxResult that we can check. This means that when we switch SPARC over to using the do_transaction_failed hook we'll still get the same MMU faults we did before. This commit converts the ASIs which do "MMU passthrough". Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-3-peter.maydell@linaro.org
-
Peter Maydell authored
Currently the SPARC target uses the old-style do_unassigned_access hook. We want to switch it over to do_transaction_failed, but to do this we must first remove all the direct calls in ldst_helper.c to cpu_unassigned_access(). Factor out the body of the hook function's code into a new sparc_raise_mmu_fault() and call it from the hook and from the various places that used to call cpu_unassigned_access(). In passing, this fixes a bug where the code that raised the MMU exception was directly calling GETPC() from a function that was several levels deep in the callstack from the original helper function: the new sparc_raise_mmu_fault() instead takes the return address as an argument. Other than the use of retaddr rather than GETPC() and a comment format fixup, the body of the new function has no changes from that of the old hook function. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Tested-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 20190801183012.17564-2-peter.maydell@linaro.org
-
Peter Maydell authored
* Fix Patchew CI failures (myself) * i386 fw_cfg refactoring (Philippe) * pmem bugfix (Stefan) * Support for accessing cstate MSRs (Wanpeng) * exec.c cleanups (Wei Yang) * Improved throttling (Yury) * elf-ops.h coverity fix (Stefano) # gpg: Signature made Mon 16 Sep 2019 16:13:12 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (29 commits) hw/i386/pc: Extract the x86 generic fw_cfg code hw/i386/pc: Rename pc_build_feature_control() as generic fw_cfg_build_* hw/i386/pc: Let pc_build_feature_control() take a MachineState argument hw/i386/pc: Let pc_build_feature_control() take a FWCfgState argument hw/i386/pc: Rename pc_build_smbios() as generic fw_cfg_build_smbios() hw/i386/pc: Let pc_build_smbios() take a generic MachineState argument hw/i386/pc: Let pc_build_smbios() take a FWCfgState argument hw/i386/pc: Replace PCMachineState argument with MachineState in fw_cfg_arch_create hw/i386/pc: Pass the CPUArchIdList array by argument hw/i386/pc: Pass the apic_id_limit value by argument hw/i386/pc: Pass the boot_cpus value by argument hw/i386/pc: Rename bochs_bios_init as more generic fw_cfg_arch_create hw/i386/pc: Use address_space_memory in place hw/i386/pc: Extract e820 memory layout code hw/i386/pc: Use e820_get_num_entries() to access e820_entries cpus: Fix throttling during vm_stop qemu-thread: Add qemu_cond_timedwait memory: inline and optimize devend_memop memory: fetch pmem size in get_file_size() elf-ops.h: fix int overflow in load_elf() ... Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Sep 16, 2019
-
-
Philippe Mathieu-Daudé authored
Extract all the functions that are not PC-machine specific into the (arch-specific) fw_cfg.c file. This will allow other X86-machine to reuse these functions. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-16-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Now that the pc_build_feature_control_file() function has been refactored to not depend of PC specific types, rename it to a more generic name. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-15-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Let the pc_build_feature_control_file() function take a generic MachineState argument. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-14-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Pass the FWCfgState object by argument, this will allow us to remove the PCMachineState argument later. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-13-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Now that the pc_build_smbios() function has been refactored to not depend of PC specific types, rename it to a more generic name. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-12-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Let the pc_build_smbios() function take a generic MachineState argument. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-11-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Pass the FWCfgState object by argument, this will allow us to remove the PCMachineState argument later. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-10-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
In the previous commit we removed the last access to PCMachineState. Replace it with a generic MachineState argument and use it to retrieve the CPUArchIdList. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Pass the CPUArchIdList array by argument, this will allow us to remove the PCMachineState argument later. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-8-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Pass the apic_id_limit value by argument, this will allow us to remove the PCMachineState argument later. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-7-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
The boot_cpus is used once. Pass it by argument, this will allow us to remove the PCMachineState argument later. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-6-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
The bochs_bios_init() function is not restricted to the Bochs BIOS and is useful to other BIOS. Since it is not specific to the PC machine, and can be reused by other machines of the X86 architecture, rename it as fw_cfg_arch_create(). Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-5-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
The address_space_memory variable is used once. Use it in place and remove the argument. Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-4-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
Suggested-by:
Samuel Ortiz <sameo@linux.intel.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-3-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
To be able to extract the e820* code out of this file (in the next patch), access e820_entries with its correct helper. Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190818225414.22590-2-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Yury Kotov authored
Throttling thread sleeps in VCPU thread. For high throttle percentage this sleep is more than 10ms. E.g. for 60% - 15ms, for 99% - 990ms. vm_stop() kicks all VCPUs and waits for them. It's called at the end of migration and because of the long sleep the migration downtime might be more than 100ms even for downtime-limit 1ms. Use qemu_cond_timedwait for high percentage to wake up during vm_stop. Signed-off-by:
Yury Kotov <yury-kotov@yandex-team.ru> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-Id: <20190909131335.16848-3-yury-kotov@yandex-team.ru> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Yury Kotov authored
The new function is needed to implement conditional sleep for CPU throttling. It's possible to reuse qemu_sem_timedwait, but it's more difficult than just add qemu_cond_timedwait. Also moved compute_abs_deadline function up the code to reuse it in qemu_cond_timedwait_impl win32. Signed-off-by:
Yury Kotov <yury-kotov@yandex-team.ru> Message-Id: <20190909131335.16848-2-yury-kotov@yandex-team.ru> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Maydell authored
Block patches: - Fix for block jobs when used with I/O threads - Fix for a corruption when using qcow2's LUKS encryption mode - cURL fix - check-block.sh cleanups (for make check) - Refactoring # gpg: Signature made Mon 16 Sep 2019 14:41:15 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-09-16: qemu-iotests: Add test for bz #1745922 block/qcow2: refactor encryption code block/qcow2: Fix corruption introduced by commit 8ac0f15f blockjob: update nodes head while removing all bdrv curl: Check curl_multi_add_handle()'s return code curl: Handle success in multi_check_completion curl: Report only ready sockets curl: Pass CURLSocket to curl_multi_do() curl: Check completion in curl_multi_do() curl: Keep *socket until the end of curl_sock_cb() curl: Keep pointer to the CURLState in CURLSocket tests/qemu-iotests: Fix qemu-io related output in 026.out.nocache tests/Makefile: Do not print the name of the check-block.sh shell script tests/qemu-iotests/check: Replace "tests" with "iotests" in final status text block: Remove unused masks block: Use QEMU_IS_ALIGNED Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Maxim Levitsky authored
Signed-off-by:
Maxim Levitsky <mlevitsk@redhat.com> Tested-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190915203655.21638-4-mlevitsk@redhat.com Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-
Maxim Levitsky authored
* Change the qcow2_co_{encrypt|decrypt} to just receive full host and guest offsets and use this function directly instead of calling do_perform_cow_encrypt (which is removed by that patch). * Adjust qcow2_co_encdec to take full host and guest offsets as well. * Document the qcow2_co_{encrypt|decrypt} arguments to prevent the bug fixed in former commit from hopefully happening again. Signed-off-by:
Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20190915203655.21638-3-mlevitsk@redhat.com Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> [mreitz: Let perform_cow() return the error value returned by qcow2_co_encrypt(), as proposed by Vladimir] Signed-off-by:
Max Reitz <mreitz@redhat.com>
-
Maxim Levitsky authored
This fixes subtle corruption introduced by luks threaded encryption in commit 8ac0f15f Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922 The corruption happens when we do a write that * writes to two or more unallocated clusters at once * doesn't fully cover the first sector * doesn't fully cover the last sector * uses luks encryption In this case, when allocating the new clusters we COW both areas prior to the write and after the write, and we encrypt them. The above mentioned commit accidentally made it so we encrypt the second COW area using the physical cluster offset of the first area. The problem is that offset_in_cluster in do_perform_cow_encrypt can be larger that the cluster size, thus cluster_offset will no longer point to the start of the cluster at which encrypted area starts. Next patch in this series will refactor the code to avoid all these assumptions. In the bugreport that was triggered by rebasing a luks image to new, zero filled base, which lot of such writes, and causes some files with zero areas to contain garbage there instead. But as described above it can happen elsewhere as well Signed-off-by:
Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190915203655.21638-2-mlevitsk@redhat.com Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-
Sergio Lopez authored
block_job_remove_all_bdrv() iterates through job->nodes, calling bdrv_root_unref_child() for each entry. The call to the latter may reach child_job_[can_]set_aio_ctx(), which will also attempt to traverse job->nodes, potentially finding entries that where freed on previous iterations. To avoid this situation, update job->nodes head on each iteration to ensure that already freed entries are no longer linked to the list. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1746631 Signed-off-by:
Sergio Lopez <slp@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-id: 20190911100316.32282-1-mreitz@redhat.com Reviewed-by:
Sergio Lopez <slp@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-
Hanna Reitz authored
If we had done that all along, debugging would have been much simpler. (Also, I/O errors are better than hangs.) Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-id: 20190910124136.10565-8-mreitz@redhat.com Reviewed-by:
Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-
Hanna Reitz authored
Background: As of cURL 7.59.0, it verifies that several functions are not called from within a callback. Among these functions is curl_multi_add_handle(). curl_read_cb() is a callback from cURL and not a coroutine. Waking up acb->co will lead to entering it then and there, which means the current request will settle and the caller (if it runs in the same coroutine) may then issue the next request. In such a case, we will enter curl_setup_preadv() effectively from within curl_read_cb(). Calling curl_multi_add_handle() will then fail and the new request will not be processed. Fix this by not letting curl_read_cb() wake up acb->co. Instead, leave the whole business of settling the AIOCB objects to curl_multi_check_completion() (which is called from our timer callback and our FD handler, so not from any cURL callbacks). Reported-by:
Natalie Gavrielov <ngavrilo@redhat.com> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1740193 Cc: qemu-stable@nongnu.org Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-id: 20190910124136.10565-7-mreitz@redhat.com Reviewed-by:
John Snow <jsnow@redhat.com> Reviewed-by:
Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-