summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* trace: [tracetool] Cosmetic changesLluís Vilanova2014-05-071-7/+7
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* trace: [tracetool] Spacing changesLluís Vilanova2014-05-071-3/+4
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* trace: [tracetool] Add methods 'Event.copy' and 'Arguments.copy'Lluís Vilanova2014-05-071-0/+9
| | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* trace: [tracetool] Add method 'Event.api' to build event namesLluís Vilanova2014-05-076-17/+27
| | | | | | | Makes it easier to ensure proper naming across the different frontends and backends. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-smbios-2' into stagingPeter Maydell2014-05-066-109/+902
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smbios: make qemu generate smbios tables. # gpg: Signature made Mon 05 May 2014 12:20:27 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-smbios-2: SMBIOS: Build aggregate smbios tables and entry point SMBIOS: Use bitmaps to prevent incompatible comand line options SMBIOS: Use macro to set smbios defaults SMBIOS: Update header file definitions SMBIOS: Rename symbols to better reflect future use E820: Add interface for accessing e820 table pc: add 2.1 machine type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * SMBIOS: Build aggregate smbios tables and entry pointGabriel L. Somlo2014-05-055-25/+720
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build an aggregate set of smbios tables and an entry point structure. Insert tables and entry point into fw_cfg respectively under "etc/smbios/smbios-tables" and "etc/smbios/smbios-anchor". Machine types <= 2.0 will for now continue using field-by-field overrides to SeaBIOS defaults, but for machine types 2.1 and up we expect the BIOS to look for and use the aggregate tables generated by this patch. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> [ kraxel: fix 32bit build ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * SMBIOS: Use bitmaps to prevent incompatible comand line optionsGabriel L. Somlo2014-05-052-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same type. These bitmaps will also be used in the future to decide whether or not to build a full table for a given smbios type. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * SMBIOS: Use macro to set smbios defaultsGabriel L. Somlo2014-05-051-14/+13
| | | | | | | | | | | | | | | | | | | | The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. This patch contains no functional changes. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * SMBIOS: Update header file definitionsGabriel L. Somlo2014-05-051-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add definitions for smbios entry point (anchor), and for type 2 (base board) structure which is required by some versions of OS X. Remove definition for type 20 (memory device mapped address) structure, which is no longer required as of smbios spec v2.5. Update all other structure definitions to bring them into compliance with smbios spec v2.8. This patch contains no functional changes. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * SMBIOS: Rename symbols to better reflect future useGabriel L. Somlo2014-05-055-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename the following symbols: - smbios_set_type1_defaults() to the more general smbios_set_defaults(); - bool smbios_type1_defaults to the more general smbios_defaults; - smbios_get_table() to smbios_get_table_legacy(); This patch contains no functional changes. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * E820: Add interface for accessing e820 tableGabriel L. Somlo2014-05-052-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the following two functions: - e820_get_num_entries() - query the size of the e820 table - e820_get_entry() - grab an entry matching a given set of criteria This interface is currently necessary for creating type 19 (memory array mapped address) structures in smbios. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * pc: add 2.1 machine typeMichael S. Tsirkin2014-05-052-7/+47
| | | | | | | | | | | | | | | | | | | | At the moment, 2.1 and 2.0 machines are identical. As several people are working on incompatible changes to the PC machine, collaboration will be made easier by merging this place-holder. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/rth/tgt-axp' into stagingPeter Maydell2014-05-061-1/+1
|\ \ | | | | | | | | | | | | | | | | | | * remotes/rth/tgt-axp: target-alpha: Fix RDUSP Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-alpha: Fix RDUSPRichard Henderson2014-05-021-1/+1
| |/ | | | | | | | | | | Commit 06ef8604e92964cbf30084b7d31091aa7cbbb62f contained a typo. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | Merge remote-tracking branch 'remotes/riku/linux-user-for-upstream' into stagingPeter Maydell2014-05-0611-159/+321
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/riku/linux-user-for-upstream: linux-user: fix getrusage and wait4 failures with invalid rusage struct linux-user/elfload.c: Support ARM HWCAP2 flags linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32 linux-user/elfload.c: Update ARM HWCAP bits linux-user/elfload.c: Fix incorrect ARM HWCAP bits linux-user: remove configure option for setting uname release linux-user: move uname functions to uname.c linux-user: rename cpu-uname -> uname linux-user/signal.c: Set fault address in AArch64 signal info linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct linux-user: Handle arches with llseek instead of _llseek linux-user: Add support for SCM_CREDENTIALS. linux-user: Move if-elses to a switch statement. linux-user: Assert stack used for auxvec, envp, argv linux-user: Add /proc/self/exe open forwarding Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * linux-user: fix getrusage and wait4 failures with invalid rusage structPetar Jovanovic2014-05-051-3/+8
| | | | | | | | | | | | | | | | | | | | Implementations of system calls getrusage and wait4 have not previously handled correctly cases when incorrect address of struct rusage is passed. This change makes sure return values are correctly set for these cases. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user/elfload.c: Support ARM HWCAP2 flagsPeter Maydell2014-05-022-1/+30
| | | | | | | | | | | | | | | | | | The ARM kernel has chosen to spill into the HWCAP2 ELF feature bit flags early, even though it hasn't yet exhausted all 32 bits of the HWCAP word. Add support for setting this in the same way we do for HWCAP. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32Peter Maydell2014-05-021-13/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | The ARM target-specific code in elfload.c was incorrectly allowing the 64-bit ARM target to use most of the existing 32-bit definitions: most noticably this meant that our HWCAP bits passed to the guest were wrong, and register handling when dumping core was totally broken. Fix this by properly separating the 64 and 32 bit code, since they have more differences than similarities. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user/elfload.c: Update ARM HWCAP bitsPeter Maydell2014-05-021-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel has added support for a number of new ARM HWCAP bits; add them to QEMU, including support for setting them where we have a corresponding CPU feature bit. We were also incorrectly setting the VFPv3D16 HWCAP -- this means "only 16 D registers", not "supports 16-bit floating point format"; since QEMU always has 32 D registers for VFPv3, we can just remove the line that incorrectly set this bit. The kernel does not set the HWCAP_FPA even if it is providing FPA emulation via nwfpe, so don't set this bit in QEMU either. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user/elfload.c: Fix incorrect ARM HWCAP bitsPeter Maydell2014-05-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The ELF HWCAP bits for ARM features THUMBEE, NEON, VFPv3 and VFPv3D16 are all off by one compared to the kernel definitions. Fix this discrepancy and add in the missing CRUNCH bit which was the cause of the off-by-one error. (We don't emulate any of the CPUs which have that weird hardware, so it's otherwise uninteresting to us.) Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: remove configure option for setting uname releaseRiku Voipio2014-05-023-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --enable-uname-release was a rather heavyweight hammer, as it allows providing values less that UNAME_MINIMUM_RELEASE. Also, it affects all built linux-user targets, which in most cases is not what user wants. Now that we have UNAME_MINIMUM_RELEASE for all linux-user platforms, we can drop --enable-uname-release and the related CONFIG_UNAME_RELEASE define. Users can still override the variable with QEMU_UNAME=2.6.32 or -r command line option. If distributors need to update a minimum version for a specific target, it can be done by updating UNAME_MINIMUM_RELEASE. Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: move uname functions to uname.cRiku Voipio2014-05-023-102/+110
| | | | | | | | | | | | | | Make syscall.c slightly smaller by moving uname-related functions to uname.c. Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: rename cpu-uname -> unameRiku Voipio2014-05-024-3/+3
| | | | | | | | | | | | | | To move more uname related functions out of syscall.c, rename cpu-uname.{c,h} to uname.{c.h} Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user/signal.c: Set fault address in AArch64 signal infoPeter Maydell2014-05-021-2/+1
| | | | | | | | | | | | | | | | Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: avoid using glibc internals in _syscall5 and in definition of ↵Natanael Copa2014-05-022-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target_sigevent struct Use the public sigset_t instead of the glibc specific internal __sigset_t in _syscall. Calculate the sigevent pad size is calculated in similar way as kernel does it instead of using glibc internal field _pad. This is needed for building with musl libc. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
| * linux-user: Handle arches with llseek instead of _llseekJames Hogan2014-05-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently merged kernel ports (such as OpenRISC and Meta) have an llseek system call instead of _llseek. This is handled for the host architecture by defining __NR__llseek as __NR_llseek, but not for the target architecture. Handle it in the same way for these architectures, defining TARGET_NR__llseek as TARGET_NR_llseek. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Jia Liu <proljc@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: Add support for SCM_CREDENTIALS.Huw Davies2014-05-021-0/+11
| | | | | | | | | | Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: Move if-elses to a switch statement.Huw Davies2014-05-021-18/+33
| | | | | | | | | | | | | | This makes adding more message types cleaner. Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: Assert stack used for auxvec, envp, argvJames Hogan2014-05-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | Assert that the amount of stack space used for auxvec, envp & argv exactly matches the amount allocated. This catches if DLINFO_ITEMS isn't updated when another NEW_AUX_ENT is added. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
| * linux-user: Add /proc/self/exe open forwardingMaxim Ostapenko2014-05-021-0/+5
|/ | | | | | | | | | | QEMU already supports /proc/self/{maps,stat,auxv} so addition of /proc/self/exe is rather trivial. Fixes https://bugs.launchpad.net/qemu/+bug/1299190 Signed-off-by: Maxim Ostapenko <m.ostapenko@partner.samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* Merge remote-tracking branch ↵Peter Maydell2014-05-025-48/+99
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging target-arm queue: * implement XScale cache lockdown cp15 ops * fix v7M CPUID base register * implement WFE and YIELD as yields for A64 * fix A64 "BLR LR" * support Cortex-A57 in virt machine model * a few other minor AArch64 bugfixes # gpg: Signature made Thu 01 May 2014 15:42:17 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-target-arm-20140501: hw/arm/virt: Add support for Cortex-A57 hw/arm/virt: Put GIC register banks on 64K boundaries hw/arm/virt: Create the GIC ourselves rather than (ab)using a15mpcore_priv target-arm: Correct a comment refering to EL0 target-arm: A64: Fix a typo when declaring TLBI ops target-arm: A64: Handle blr lr target-arm: Make vbar_write 64bit friendly on 32bit hosts target-arm: implement WFE/YIELD as a yield for AArch64 armv7m_nvic: fix CPUID Base Register target-arm: Implement XScale cache lockdown operations as NOPs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hw/arm/virt: Add support for Cortex-A57Peter Maydell2014-05-011-0/+5
| | | | | | | | | | | | | | Support the Cortex-A57 in the virt machine model. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1398362083-17737-4-git-send-email-peter.maydell@linaro.org
| * hw/arm/virt: Put GIC register banks on 64K boundariesPeter Maydell2014-05-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | For an AArch64 CPU which supports 64K pages, having the GIC register banks at 4K offsets is potentially awkward. Move them out to being at 64K offsets. (This is harmless for AArch32 CPUs and for AArch64 CPUs with 4K pages, so it is simpler to use the same offsets everywhere than to try to use 64K offsets only for AArch64 host CPUs.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1398362083-17737-3-git-send-email-peter.maydell@linaro.org
| * hw/arm/virt: Create the GIC ourselves rather than (ab)using a15mpcore_privPeter Maydell2014-05-011-29/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than having the virt machine model create an a15mpcore_priv device regardless of the actual CPU type in order to instantiate the GIC, move to having the machine model create the GIC directly. This corresponds to a system which uses a standalone GIC (eg the GIC-400) rather than the one built in to the CPU core. The primary motivation for this is to support the Cortex-A57, which for a KVM configuration will use a GICv2, which is not built into the CPU. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1398362083-17737-2-git-send-email-peter.maydell@linaro.org
| * target-arm: Correct a comment refering to EL0Edgar E. Iglesias2014-05-011-1/+1
| | | | | | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1398926097-28097-5-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: A64: Fix a typo when declaring TLBI opsEdgar E. Iglesias2014-05-011-12/+12
| | | | | | | | | | | | | | | | | | | | Harmless typo as opc1 defaults to zero and opc2 gets re-declared to its correct value. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1398926097-28097-4-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: A64: Handle blr lrEdgar E. Iglesias2014-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | For linked branches, updates to the link register happen conceptually after the read of the branch target register. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Cc: qemu-stable@nongnu.org Message-id: 1398926097-28097-3-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: Make vbar_write 64bit friendly on 32bit hostsEdgar E. Iglesias2014-05-011-1/+1
| | | | | | | | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1398926097-28097-2-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: implement WFE/YIELD as a yield for AArch64Rob Herring2014-05-011-0/+6
| | | | | | | | | | | | | | | | | | Like was done for AArch32 for WFE, implement both WFE and YIELD as a yield operation. This speeds up multi-core system emulation. Signed-off-by: Rob Herring <rob.herring@linaro.org> Message-id: 1397588401-20366-1-git-send-email-robherring2@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * armv7m_nvic: fix CPUID Base RegisterRabin Vincent2014-05-011-1/+1
| | | | | | | | | | | | | | | | | | cp15.c0_cpuid is never initialized for ARMv7-M; take the value directly from cpu->midr instead. Signed-off-by: Rabin Vincent <rabin@rab.in> Message-id: 1398036308-32166-1-git-send-email-rabin@rab.in Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-arm: Implement XScale cache lockdown operations as NOPsPeter Maydell2014-05-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | XScale defines some implementation-specific coprocessor registers for doing cache lockdown operations. Since QEMU doesn't model a cache no proper implementation is possible, but NOP out the registers so that guest code like u-boot that tries to use them doesn't crash. Reported-by: <prqek@centrum.cz> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell2014-05-0224-171/+355
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block patches # gpg: Signature made Wed 30 Apr 2014 19:19:32 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (31 commits) curl: Fix hang reading from slow connections curl: Ensure all informationals are checked for completion curl: Eliminate unnecessary use of curl_multi_socket_all curl: Remove unnecessary explicit calls to internal event handler curl: Remove erroneous sleep waiting for curl completion curl: Fix return from curl_read_cb with invalid state curl: Remove unnecessary use of goto curl: Fix long line block/vdi: Error out immediately in vdi_create() block/bochs: Fix error handling for seek_to_sector() qcow2: Check min_size in qcow2_grow_l1_table() qcow2: Catch bdrv_getlength() error block: Use correct width in format strings qcow2: Avoid overflow in alloc_clusters_noref() block: Use error_abort in bdrv_image_info_specific_dump() block: Fix open_flags in bdrv_reopen() Revert "block: another bdrv_append fix" block: Unlink temporary files in raw-posix/win32 block: Remove BDRV_O_COPY_ON_READ for bs->file block: Create bdrv_backing_flags() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | curl: Fix hang reading from slow connectionsMatthew Booth2014-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When receiving a new aio read request, we first look for an existing transaction whose range will cover the read request by the time it completes. However, we weren't checking that the existing transaction was still active. If it had timed out, we were adding the request to a transaction which would never complete and had already been cancelled, resulting in a hang. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Ensure all informationals are checked for completionMatthew Booth2014-04-301-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation, the correct way to ensure all informationals have been returned by curl_multi_info_read is to loop until it returns NULL. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Eliminate unnecessary use of curl_multi_socket_allMatthew Booth2014-04-301-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | curl_multi_socket_all is a deprecated catch-all which checks for activities on all open curl sockets. We have enough information from the event loop to check only the sockets with activity. This change removes use of curl_multi_socket_all in favour of curl_multi_socket_action called with the relevant handle. At the same time, it also ensures that the driver only checks for completion of read operations after reading from a socket, rather than both reading and writing. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Remove unnecessary explicit calls to internal event handlerMatthew Booth2014-04-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove calls to curl_multi_do where the relevant handles are already registered to the event loop. Ensure that we kick off socket handling with CURL_SOCKET_TIMEOUT after adding a new handle. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Remove erroneous sleep waiting for curl completionMatthew Booth2014-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver will not start more than a fixed number of curl sessions. If it needs more, it must wait for the completion of an existing one. The driver was sleeping, which will prevent the main loop from running, and therefore the event it's waiting on. It was also directly calling its internal handler rather than waiting on existing registered handlers to be called from the main loop. This change causes it simply to wait for a period of time whilst allowing the main loop to execute. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Fix return from curl_read_cb with invalid stateMatthew Booth2014-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A curl write callback is supposed to return the number of bytes it handled. curl_read_cb would have erroneously reported it had handled all bytes in the event that the internal curl state was invalid. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Remove unnecessary use of gotoMatthew Booth2014-04-301-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | This isn't any of the usually acceptable uses of goto. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Fix long lineMatthew Booth2014-04-301-1/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud