summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests/qruncom.c: Remove libqemu.a exampleChen Wei-Ren2011-12-091-284/+0
| | | | | | | | Remove libqemu example since libqemu.a is not available anymore. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tests/Makefile: Remove qruncom targetChen Wei-Ren2011-12-091-6/+0
| | | | | | | | Remove qruncom target from the Makefile file. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* tcg: Remove redundant declarations of TCG_TARGET_REG_BITSStefan Weil2011-12-091-5/+0
| | | | | | | TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* mips_malta: resolve endless loop when loading biosChen Rui2011-12-061-0/+1
| | | | | Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Chen Rui <chennrui@gmail.com>
* memory: minor documentation fixes/enhancementsAdemar de Souza Reis Jr2011-12-062-19/+25
| | | | | | | | | | | | Fix typos and minor documentation errors in both memory.h and docs/memory.txt. Also add missing documentation formatting tags to transaction functions. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Ademar de Souza Reis Jr <areis@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* linux-user/syscall.c: Don't skip stracing for fcntl64 failure casePeter Maydell2011-12-061-2/+4
| | | | | | | | | | In an fcntl64 failure path, we were returning directly rather than simply breaking out of the switch statement. This skips the strace code for printing the syscall return value, so don't do that. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Rename get_tls to tls_varJan Kiszka2011-12-062-3/+3
| | | | | | | get_tls() can serve as a lvalue as well, so 'get' might be confusing. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* linux-user/arm/nwfpe/fpopcode.h: Fix non-UTF-8 charactersPeter Maydell2011-12-061-17/+17
| | | | | | | | | Fix some stray non-UTF-8 characters used in some ASCII art tables by converting them to plain ASCII '|' instead. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* linux-user/cpu-uname.c: Convert to UTF-8Peter Maydell2011-12-061-1/+1
| | | | | | | | | Convert comment from ISO-8859-1 encoding to UTF-8 to match the rest of QEMU's source code. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Convert keymap file to UTF-8 encodingStefan Weil2011-12-061-1/+1
| | | | | | | | Most QEMU files either are pure ASCII or use UTF-8. Convert this keymap file which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Convert source files to UTF-8 encodingStefan Weil2011-12-065-5/+5
| | | | | | | | Most QEMU files either are pure ASCII or use UTF-8. Convert some files which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* configure: Pull linux-headers/asm symlink creation out of loopPeter Maydell2011-12-061-17/+20
| | | | | | | | | | Pull the creation of the linux-headers/asm symlink out of the loop so we don't pointlessly delete and recreate it once for each target. Also move the setting of the includes variable up so that it is in the same place as the other code which sets this variable. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* pcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_errorZhi Yong Wu2011-12-064-4/+4
| | | | | | | This function name is a bit wrong. Although it doesn't impact function, it is a bit necessary that we should fixup it. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* fix spelling in hw sub directoryDong Xu Wang2011-12-0622-30/+30
| | | | | | | Correct obvious spelling errors in qemu/hw directory. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* fix typo: delete redundant semicolonDong Xu Wang2011-12-0615-21/+21
| | | | | | | Double semicolons should be single. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* win32: fix memory leakZhi Hui Li2011-12-061-0/+7
| | | | | | | | | | | | | | | | | | | | string is allocated by g_malloc, will not be used after putenv, should be free before return. Paolo Bonzini <pbonzini@redhat.com> confirmed this is safe under Wine: "1) the underlying Win32 APIs require separate arguments for the variable and value; 2) even though in the end Wine stores the environment as name=value (http://source.winehq.org/source/dlls/ntdll/env.c), it does so in a single consecutive block of memory, not as a char* array like POSIX does. While (2) might apply only to Wine, (1) surely applies to Windows as well." Tested-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* net/socket.c : fix memory leakZhi Hui Li2011-12-061-0/+3
| | | | | Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* configure: Print a banner comment at the top of config.logPeter Maydell2011-12-061-0/+5
| | | | | | | | | Print a banner comment at the top of config.log identifying when configure was run and the arguments used. This is occasionally useful for debugging purposes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* configure: Include #define name in check_define compiler errorPeter Maydell2011-12-061-1/+1
| | | | | | | | | | Include the name of the #define being tested for in the compiler error produced when a check_define test is run and fails. This appears only in the config.log, but it does make it a little easier to debug problems by inspecting config.log. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* console: Fix qemu_default_pixelformat() for 24 bppMarkus Armbruster2011-12-061-0/+1
| | | | | | | | | Falls through to 32 bpp. Harmless, because the only difference is the alpha component, and we're not using that. Spotted by Coverity. Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* console: Fix console_putchar() for CSI JMarkus Armbruster2011-12-061-0/+1
| | | | | | | | | | It falls through to the code for CSI K. "Erase Down" also does "Erase End of Line", "Erase Up" also does "Erase Start of Line", and "Erase Screen" also does "Erase Line". Happens not to be visible. Fix it anyway. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* console: Clean up confusing indentation in console_putchar()Markus Armbruster2011-12-061-9/+9
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* hw/arm_gic.c: Ignore attempts to complete nonexistent IRQsPeter Maydell2011-12-051-9/+18
| | | | | | | | | | | | | Ignore attempts to complete non-existent IRQs; this fixes a buffer overrun if the guest writes a bad value to the GICC_EOIR register. (This case is UNPREDICTABLE so ignoring it is a valid choice.) Note that doing nothing if the guest writes 1023 to this register is not in fact a change in behaviour: the old code would also always do nothing in this case but in a non-obvious way. (The buffer overrun was noted by Coverity, see bug 887883.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* configure: Drop armv4l/armv4b distinction in $cpuPeter Maydell2011-12-051-14/+12
| | | | | | | | | | | | | Drop the distinction between armv4l/armv4b in the $cpu variable (ie host cpu type) in favour of calling everything 'arm'. This makes it the same as the ARCH setting and removes some special casing. The only thing we were using the distinction for was to decide which endianness to use in cross compilation; do a cpp define check there instead. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* pseries: Fix array overrun bug in PCI codeDavid Gibson2011-12-051-1/+1
| | | | | | | | | | spapr_populate_pci_devices() containd a loop with PCI_NUM_REGIONS (7) iterations. However this overruns the 'bars' global array, which only has 6 elements. In fact we only want to run this loop for things listed in the bars array, so this patch corrects the loop bounds to reflect that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* target-arm/helper.c: Don't allocate TCG resources unless TCG enabledPeter Maydell2011-12-051-1/+1
| | | | | | | | Don't call arm_translate_init() (which allocates TCG resources) unless TCG is enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* target-arm/translate.c: Fix slightly misleading comment in Thumb decoderPeter Maydell2011-12-051-3/+5
| | | | | | | | | | Clarify some slightly misleading comments in the Thumb decoder's handling of the memory hint space -- in particular one code path marked as 'UNPREDICTABLE or unallocated hint' also includes some legitimate preload instructions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* Fix hw_error messages from arm_timer.cPeter Chubb2011-12-051-4/+4
| | | | | | | | | | Two of the calls to hw_error() in arm_timer.c contain the wrong function name. As suggested by Andreas Färber, use the C99 standard __func__ macro to get the correct name, instead of putting the name directly into the code. Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-12-0540-343/+1329
|\
| * block: convert qemu_aio_flush() calls to bdrv_drain_all()Stefan Hajnoczi2011-12-0512-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Many places in QEMU call qemu_aio_flush() to complete all pending asynchronous I/O. Most of these places actually want to drain all block requests but there is no block layer API to do so. This patch introduces the bdrv_drain_all() API to wait for requests across all BlockDriverStates to complete. As a bonus we perform checks after qemu_aio_wait() to ensure that requests really have finished. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: wait_for_overlapping_requests() deadlock detectionStefan Hajnoczi2011-12-051-0/+8
| | | | | | | | | | | | | | | | | | | | Debugging a reentrant request deadlock was fun but in the future we need a quick and obvious way of detecting such bugs. Add an assert that checks we are not about to deadlock when waiting for another request. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: implement bdrv_co_is_allocated() boundary casesStefan Hajnoczi2011-12-051-8/+18
| | | | | | | | | | | | | | | | | | | | | | Cases beyond the end of the disk image are only implemented for block drivers that do not provide .bdrv_co_is_allocated(). It's worth making these cases generic so that block drivers that do implement .bdrv_co_is_allocated() also get them for free. Suggested-by: Mark Wu <wudxw@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * dma-helpers: Add trace eventsKevin Wolf2011-12-052-0/+17
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * cow: use bdrv_co_is_allocated()Stefan Hajnoczi2011-12-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that bdrv_co_is_allocated() is available we can use it instead of the synchronous bdrv_is_allocated() interface. This is a follow-up that Kevin Wolf <kwolf@redhat.com> pointed out after applying the series that introduces bdrv_co_is_allocated(). It is safe to make cow_read() a coroutine_fn because its only caller is a coroutine_fn. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: add -drive copy-on-read=on|offStefan Hajnoczi2011-12-054-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the -drive copy-on-read=on|off command-line option: copy-on-read=on|off copy-on-read is "on" or "off" and enables whether to copy read backing file sectors into the image file. Copy-on-read avoids accessing the same backing file sectors repeatedly and is useful when the backing file is over a slow network. By default copy-on-read is off. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: core copy-on-read logicStefan Hajnoczi2011-12-052-0/+73
| | | | | | | | | | Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: request overlap detectionStefan Hajnoczi2011-12-051-2/+43
| | | | | | | | | | | | | | | | | | Detect overlapping requests and remember to align to cluster boundaries if the image format uses them. This assumes that allocating I/O is performed in cluster granularity - which is true for qcow2, qed, etc. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: wait for overlapping requestsStefan Hajnoczi2011-12-051-0/+35
| | | | | | | | | | | | | | | | | | When copy-on-read is enabled it is necessary to wait for overlapping requests before issuing new requests. This prevents races between the copy-on-read and a write request. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: add interface to toggle copy-on-readStefan Hajnoczi2011-12-053-0/+28
| | | | | | | | | | | | | | | | | | The bdrv_enable_copy_on_read()/bdrv_disable_copy_on_read() functions can be used to programmatically enable or disable copy-on-read for a block device. Later patches add the actual copy-on-read logic. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: add request trackingStefan Hajnoczi2011-12-052-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block layer does not know about pending requests. This information is necessary for copy-on-read since overlapping requests must be serialized to prevent races that corrupt the image. The BlockDriverState gets a new tracked_request list field which contains all pending requests. Each request is a BdrvTrackedRequest record with sector_num, nb_sectors, and is_write fields. Note that request tracking is always enabled but hopefully this extra work is so small that it doesn't justify adding an enable/disable flag. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * coroutine: add qemu_co_queue_restart_all()Stefan Hajnoczi2011-12-053-8/+14
| | | | | | | | | | | | | | | | | | It's common to wake up all waiting coroutines. Introduce the qemu_co_queue_restart_all() function to do this instead of looping over qemu_co_queue_next() in every caller. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macrosStefan Hajnoczi2011-12-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add macros for aligning a number to a multiple, for example: QEMU_ALIGN_DOWN(500, 2000) = 0 QEMU_ALIGN_UP(500, 2000) = 2000 Since ALIGN_UP() is a common macro name use the QEMU_* namespace prefix. Hopefully this will protect us from included headers that leak something with a similar name. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: add bdrv_co_is_allocated() interfaceStefan Hajnoczi2011-12-052-13/+26
| | | | | | | | | | | | | | | | This patch introduces the public bdrv_co_is_allocated() interface which can be used to query image allocation status while the VM is running. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: drop .bdrv_is_allocated() interfaceStefan Hajnoczi2011-12-052-22/+18
| | | | | | | | | | | | | | | | | | | | | | Now that all block drivers have been converted to .bdrv_co_is_allocated() we can drop .bdrv_is_allocated(). Note that the public bdrv_is_allocated() interface is still available but is in fact a synchronous wrapper around .bdrv_co_is_allocated(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * cow: convert to .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-051-4/+4
| | | | | | | | | | | | | | | | | | The cow block driver does not keep internal state for cluster lookups. This means it is safe to perform cluster lookups in coroutine context without risk of race conditions that corrupt internal state. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vdi: convert to .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-051-3/+3
| | | | | | | | | | | | | | | | | | It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vdi_is_allocated() does not block. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * vvfat: convert to .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-051-2/+2
| | | | | | | | | | | | | | | | | | It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vvfat_is_allocated() does not block. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: convert qcow2, qcow2, and vmdk to .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-053-11/+18
| | | | | | | | | | | | | | | | | | | | The qcow2, qcow, and vmdk block drivers are based on coroutines. They have a coroutine mutex which protects internal state. We can convert the .bdrv_is_allocated() function to .bdrv_co_is_allocated() by holding the mutex around the cluster lookup operation. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qed: convert to .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-051-4/+11
| | | | | | | | | | | | | | | | | | | | | | The bdrv_qed_is_allocated() function is a synchronous wrapper around qed_find_cluster(), which performs the cluster lookup. In order to convert the synchronous function to a coroutine function we yield instead of using qemu_aio_wait(). Note that QED's cache is already safe for parallel requests so no locking is needed. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: add .bdrv_co_is_allocated()Stefan Hajnoczi2011-12-052-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the .bdrv_co_is_allocated() interface which is identical to .bdrv_is_allocated() but runs in coroutine context. Running in coroutine context implies that other coroutines might be performing I/O at the same time. Therefore it must be safe to run while the following BlockDriver functions are in-flight: .bdrv_co_readv() .bdrv_co_writev() .bdrv_co_flush() .bdrv_co_is_allocated() The new .bdrv_co_is_allocated() interface is useful because it can be used when a VM is running, whereas .bdrv_is_allocated() is a synchronous interface that does not cope with parallel requests. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud