summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori2011-01-1016-35/+410
|\
| * pci: fix migration path for devices behind bridgesMichael S. Tsirkin2010-12-271-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device path used for migration is currently broken for for all devices behind a nested bridge. Replace this by a hierarchical list of slot/function numbers, walking the path from root down to device. Add :00 after the domain number so that if there are no nested bridges, this is compatible with what we have now. Note: as pointed out by Gleb, using openfirmware paths might be cleaner, doing this would break compatibility though, and the IDs used are not guest or user visible at all, so breaking the compatibility is probably not worth it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pcie/aer: glue aer error injection into qemu monitorIsaku Yamahata2010-12-244-0/+266
| | | | | | | | | | | | | | introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: introduce a helper function to convert qdev id to PCIDeviceIsaku Yamahata2010-12-242-0/+36
| | | | | | | | | | | | | | | | This patch introduce a helper function to get PCIDevice from qdev id. This function will be used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * qdev: export qdev_find_recursive() for later useIsaku Yamahata2010-12-242-1/+3
| | | | | | | | | | | | | | This patch exports qdev_find_recursive() for later use. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * build, pci: remove QMP dependency on core PCI codeIsaku Yamahata2010-12-223-3/+40
| | | | | | | | | | | | | | | | by introducing pci-stub.c, eliminate QMP dependency on core PCI code rquired by query-pci command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pcie: add flr supportIsaku Yamahata2010-12-226-13/+12
| | | | | | | | | | | | | | Support flr: trigger device reset on flr config write. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pc/piix: fix mismerge of b1aeb92666d2fde413c34578b3b42bbfe5f2a506Isaku Yamahata2010-12-221-8/+4
| | | | | | | | | | | | | | | | The change set of b1aeb92666d2fde413c34578b3b42bbfe5f2a506 in pci branch was mismerged. The compatibility should be kept for 0.13, not for 0.14. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * qdev: remove an unused functionMichael S. Tsirkin2010-12-212-7/+1
| | | | | | | | | | | | qbus_reset_all is unused, remove it Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * qbus: register reset handler for qbus whose parent is NULLIsaku Yamahata2010-12-203-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stefan Weil reported the regression caused by ec990eb622ad46df5ddcb1e94c418c271894d416 as follows > The second regression also occurs with MIPS malta. > Networking no longer works with the default pcnet nic. > > This is caused because the reset function for pcnet is no > longer called during system boot. The result in an invalid > mac address (all zero) and a non-working nic. > > For this second regression I still have no simple solution. > Of course mips_malta.c should be converted to qdev which > would fix both problems (but only for malta system emulation). The issue is, it is assumed that all qbuses, qdeves are under main_system_bus. But there are qbuses whose parent is NULL. So it is necessary to trigger reset for those qbuses. (On the other hand, if NULL is passed to qdev_create(), its parent bus is main_system_bus.) Ideally those buses should be moved under bus controller device which is qdev. But it's not done yet. So register qbus reset handler for qbus whose parent is NULL. Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * qdev: sysbus_get_default must not return a NULL pointer (fix regression)Stefan Weil2010-12-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Every system should have some sort of main system bus, so sysbus_get_default should always return a valid bus. Without this patch, at least mipssim and malta no longer start but raise a null pointer access exception (caused by commit ec990eb622ad46df5ddcb1e94c418c271894d416). Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: don't use bus number in migration, stub outMichael S. Tsirkin2010-12-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Using bus numbers in migration is clearly wrong as they are guest assigned. Not really sure what the right thing to do is, for now stick 0 in there so things keep working for non-nested setups, add a TODO. We also probably have to mark nested bridges as non-migrateable until this is fixed? Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
* | slirp: fix unaligned access in bootp codeAurelien Jarno2011-01-101-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slirp code tries to be smart an avoid data copy by using pointer to the data. This solution leads to unaligned access, in this case preq_addr, which is a 32-bit long structure. There is no real point of avoiding data copy in a such case, as the value itself is smaller or the same size as a pointer. The patch replaces pointers to the preq_addr structure by the strcture itself, and use the address 0.0.0.0 if no address has been requested (this is not a valid address in such a request). It compares it with htonl(0L) for correctness reasons, in case a code checker look for such mistakes. It also uses memcpy() for copying the data, which takes care of alignement issues. This fixes an unaligned access on IA64 host while requesting a DHCP address. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | bswap.h: add cpu_to_be64wu()Aurelien Jarno2011-01-101-0/+15
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg/arm: improve constant loadingAurelien Jarno2011-01-101-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve constant loading in two ways: - On all ARM versions, it's possible to load 0xffffff00 = -0x100 using the mvn rd, #0. Fix the conditions. - On <= ARMv6 versions, where movw and movt are not available, load the constants using mov and orr with rotations depending on the constant to load. This is very useful for example to load constants where the low byte is 0. This reduce the generated code size by about 7%. Also fix the coding style at the same time. Cc: Andrzej Zaborowski <balrog@zabor.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg/ia64: remove an unnecessary stop bitAurelien Jarno2011-01-101-1/+1
| | | | | | | | | | | | Spotted by Richard Henderson. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-sh4: improve TLBAurelien Jarno2011-01-101-21/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SH4 is using 16-bit instructions which means most of the constants are loaded through a constant pool at the end of the subroutine. The same memory page is therefore accessed in exec and read mode. With the current implementation, a QEMU TLB entry is set to read or read/write mode after an UTLB search and to exec mode after an ITLB search, which causes a lot of TLB exceptions to switch from read or read/write to exec and vice versa. This patch optimizes that by already setting the QEMU TLB entry in read or read/write mode when an UTLB entry is copied into ITLB (during an ITLB miss). This improve the emulation speed by about 14%. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-sh4: implement writes to mmaped ITLBAurelien Jarno2011-01-093-0/+23
| | | | | | | | | | | | | | | | | | | | | | Some Linux kernels seems to implement ITLB/UTLB flushing through by writing all TLB entries through the memory mapped interface instead of writing one to MMUCR.TI. Implement memory mapped ITLB write interface so that such kernels can boot. This fixes https://bugs.launchpad.net/bugs/700774 . Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg: fix typo in readmeMike Frysinger2011-01-091-1/+1
| | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | tcg/README: Spelling fixesStefan Weil2011-01-091-4/+4
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qemu-tech: Spelling fixesStefan Weil2011-01-091-2/+2
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qemu-doc: Spelling fixesStefan Weil2011-01-091-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | neccessary -> necessary Keberos -> Kerberos emuilated -> emulated transciever -> transceiver emulaton -> emulation inital -> initial MingGW -> MinGW Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qemu-doc: Add missing blanksStefan Weil2011-01-091-2/+2
| | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qemu-doc: Add missing menu entryStefan Weil2011-01-091-0/+2
| | | | | | | | | | | | | | Each @section should have a menu entry and a @node entry. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qemu-doc: Clean whitespaceStefan Weil2011-01-091-2/+2
| | | | | | | | | | | | | | Remove blanks at line endings. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | usb-bsd: fix a file descriptor leakBlue Swirl2011-01-091-32/+39
| | | | | | | | | | | | | | | | | | | | | | Fix a file descriptor leak reported by cppcheck: [/src/qemu/usb-bsd.c:392]: (error) Resource leak: bfd [/src/qemu/usb-bsd.c:388]: (error) Resource leak: dfd Rearrange the code to avoid descriptor leaks. Also add braces as needed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | alsaaudio: add endianness support for VoiceInMichael Walle2011-01-091-7/+27
| | | | | | | | | | Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
* | ossaudio: add endianness support for VoiceInMichael Walle2011-01-091-5/+15
| | | | | | | | | | Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
* | tcg/mips: fix branch target change during code retranslationAurelien Jarno2011-01-081-1/+1
| | | | | | | | | | | | | | TCG on MIPS was trying to avoid changing the branch offset, but didn't due to a stupid typo. Fix it. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg/arm: fix qemu_st64 for big endian targetsAurelien Jarno2011-01-081-1/+1
| | | | | | | | | | | | | | | | Due to a typo, qemu_st64 doesn't properly byteswap the 32-bit low word of a 64 bit word before saving it. This patch fixes that. Acked-by: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg/arm: fix branch target change during code retranslationAurelien Jarno2011-01-081-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMU uses code retranslation to restore the CPU state when an exception happens. For it to work the retranslation must not modify the generated code. This is what is currently implemented in ARM TCG. However on CPU that don't have icache/dcache/memory synchronised like ARM, this requirement is stronger and code retranslation must not modify the generated code "atomically", as the cache line might be flushed at any moment (interrupt, exception, task switching), even if not triggered by QEMU. The probability for this to happen is very low, and depends on cache size and associativiy, machine load, interrupts, so the symptoms are might happen randomly. This requirement is currently not followed in tcg/arm, for the load/store code, which basically has the following structure: 1) tlb access code is written 2) conditional fast path code is written 3) branch is written with a temporary target 4) slow path code is written 5) branch target is updated The cache lines corresponding to the retranslated code is not flushed after code retranslation as the generated code is supposed to be the same. However if the cache line corresponding to the branch instruction is flushed between step 3 and 5, and is not flushed again before the code is executed again, the branch target is wrong. In the guest, the symptoms are MMU page fault at a random addresses, which leads to kernel page fault or segmentation faults. The patch fixes this issue by avoiding writing the branch target until it is known, that is by writing only the branch instruction first, and later only the offset. This fixes booting linux guests on ARM hosts (tested: arm, i386, mips, mipsel, sh4, sparc). Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Merge branch 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemuAurelien Jarno2011-01-0813-46/+238
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu: Remove dead code for ARM semihosting commandline handling Fix commandline handling for ARM semihosted executables linux-user: Fix incorrect NaN detection in ARM nwfpe emulation softfloat: Implement floatx80_is_any_nan() and float128_is_any_nan() linux-user: Implement FS_IOC_FIEMAP ioctl linux-user: Support ioctls whose parameter size is not constant linux-user: Implement sync_file_range{,2} syscalls
| * | Remove dead code for ARM semihosting commandline handlingWolfgang Schildbach2011-01-074-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are some bits in the code which were used to store the commandline for the semihosting call. These bits are now write-only and can be removed. Signed-off-by: Wolfgang Schildbach <wschi@dolby.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | Fix commandline handling for ARM semihosted executablesWolfgang Schildbach2011-01-071-30/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the copy of the command line that loader_build_argptr() sets up in guest memory as the command line to return from the ARM SYS_GET_CMDLINE semihosting call. Previously we were using a pointer to memory which had already been freed before the guest program started. This fixes https://bugs.launchpad.net/qemu/+bug/673613 . Signed-off-by: Wolfgang Schildbach <wschi@dolby.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | linux-user: Fix incorrect NaN detection in ARM nwfpe emulationPeter Maydell2011-01-071-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code in the linux-user ARM nwfpe emulation was incorrectly checking only for quiet NaNs when it should have been checking for any kind of NaN. This is probably because the code in question was taken from the Linux kernel, whose copy of the softfloat library had been modified so that float*_is_nan() returned true for all NaNs, not just quiet ones. The qemu equivalent function is float*_is_any_nan(), so use that. NB that this code is really obsolete since nobody uses FPE for actual arithmetic now; this is just cleanup following the recent renaming of the NaN related functions. Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | softfloat: Implement floatx80_is_any_nan() and float128_is_any_nan()Peter Maydell2011-01-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement versions of float*_is_any_nan() for the floatx80 and float128 types. Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | linux-user: Implement FS_IOC_FIEMAP ioctlPeter Maydell2011-01-074-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the FS_IOC_FIEMAP ioctl using the new support for custom handling of ioctls; this is needed because the struct that is passed includes a variable-length array. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | linux-user: Support ioctls whose parameter size is not constantPeter Maydell2011-01-071-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ioctls (for example FS_IOC_FIEMAP) use structures whose size is not constant. The generic argument conversion code in do_ioctl() cannot handle this, so add support for implementing a special-case handler for a particular ioctl which does the conversion itself. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | linux-user: Implement sync_file_range{,2} syscallsPeter Maydell2011-01-073-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the missing syscalls sync_file_range and sync_file_range2. The latter in particular is used by newer versions of apt on Ubuntu for ARM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
* | | cris: Allow more TB chaningEdgar E. Iglesias2011-01-071-19/+22
|/ / | | | | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* | cris: Avoid useless tmp in t_gen_cc_jmp()Edgar E. Iglesias2011-01-071-6/+1
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* | cirrus: delete GCC 4.6 warningsAurelien Jarno2011-01-061-3/+3
| | | | | | | | | | | | | | | | Commit 92d675d1c1f23f3617e24b63c825074a1d1da44b triggered uninitialized variables warning with GCC 4.6. Fix them by adding zero initializers. Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-arm: wire up the softfloat flush_input_to_zero flagPeter Maydell2011-01-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Wire up the new softfloat support for flushing input denormals to zero on ARM. The FPSCR FZ bit enables flush-to-zero for both inputs and outputs, but the reporting of when inputs are flushed to zero is via a separate IDC bit rather than the UFC (underflow) bit used when output denormals are flushed to zero. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-arm: Set softfloat cumulative exc flags from correct FPSCR bitsPeter Maydell2011-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | When handling a write to the ARM FPSCR, set the softfloat cumulative exception flags from the cumulative flags in the FPSCR, not the exception-enable bits. Also don't apply a mask: vfp_exceptbits_to_host will only look at the correct bits anyway. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | softfloat: Implement flushing input denormals to zeroPeter Maydell2011-01-062-3/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to softfloat for flushing input denormal float32 and float64 to zero. softfloat's existing 'flush_to_zero' flag only flushes denormals to zero on output. Some CPUs need input denormals to be flushed before processing as well. Implement this, using a new status flag to enable it and a new exception status bit to indicate when it has happened. Existing CPUs should be unaffected as there is no behaviour change unless the mode is enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-arm: fix SMMLA/SMMLS instructionsAurelien Jarno2011-01-061-45/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMMLA and SMMLS are broken on both in normal and thumb mode, that is both (different) implementations are wrong. They try to avoid a 64-bit add for the rounding, which is not trivial if you want to support both SMMLA and SMMLS with the same code. The code below uses the same implementation for both modes, using the code from the ARM manual. It also fixes the thumb decoding that was a mix between normal and thumb mode. This fixes the issues reported in https://bugs.launchpad.net/qemu/+bug/629298 Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | block: delete a write-only variableBlue Swirl2011-01-061-5/+0
| | | | | | | | | | | | | | | | | | Avoid a warning with GCC 4.6.0: /src/qemu/block.c: In function 'bdrv_img_create': /src/qemu/block.c:2862:25: error: variable 'fmt' set but not used [-Werror=unused-but-set-variable] CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | cirrus_vga: Declare as little endianBlue Swirl2011-01-061-100/+12
| | | | | | | | | | | | | | | | This patch replaces explicit bswaps with endianness hints to the mmio layer. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | pc: move port 92 stuff back to pc.c from pckbd.cBlue Swirl2011-01-062-20/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | 956a3e6bb7386de48b642d4fee11f7f86a2fcf9a introduced a bug concerning reset bit for port 92. Since the keyboard output port and port 92 are not compatible anyway, let's separate them. Reported-by: Peter Lieven <pl@dlh.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> -- v2: added reset handler and VMState
* | target-ppc: Implement correct NaN propagation rulesAurelien Jarno2011-01-061-2/+17
| | | | | | | | | | | | | | | | | | | | | | Implement the correct NaN propagation rules for PowerPC targets by providing an appropriate pickNaN function. Also fix the #ifdef tests for default NaN definition, the correct name is TARGET_PPC instead of TARGET_POWERPC. Reviewed-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud