summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* do not pass bogus $(SRC_PATH) include paths to cc during configurePaolo Bonzini2011-01-143-12/+16
| | | | | | | | | | Non-existent -I paths are dropped silently by the compiler, but still it is not polite to pass bogus options. Configure-time tests do not need any include files from the source path, so only include -I flags at make time (when they're properly expanded). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* test cc with the complete set of chosen flagsPaolo Bonzini2011-01-141-25/+25
| | | | | | | | | | The "test the C compiler works ok" comes before a bunch of flags are added for --cpu or just depending on the host. It helps debugging if the test is done after these flags are (unconditionally) added. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* fix sparse support (?)Paolo Bonzini2011-01-141-5/+5
| | | | | | | | | I didn't test with sparse, but the old code using += before a variable was set was wrong. Sparse support should probably be ripped out or redone, but this at least keeps some sanity. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* move feature variables to the topPaolo Bonzini2011-01-141-82/+82
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* default make and install to environment variablesPaolo Bonzini2011-01-141-9/+10
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* default compilation tools to environment variablesPaolo Bonzini2011-01-141-13/+7Star
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* microblaze: Improve unconditional direct branchingEdgar E. Iglesias2011-01-141-7/+14
| | | | | | | Avoid emitting conditional tcg operations for uncoditional direct branches. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* cris: Set btaken when storing direct jumpsEdgar E. Iglesias2011-01-131-0/+3
| | | | | | | When storing a direct jmp from translation state into runtime state we should set the btaken flag. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* slirp: Use strcasecmp() to check tftp mode, tsizeSergei Gavrikov2011-01-131-2/+2
| | | | | | | | | | | | | | According to RFC 1350 (TFTP Revision 2) the mode field can contain any combination of upper and lower case; also RFC 2349 propagates that the transfer size option ("tsize") is case in-sensitive too. Current implementation of embedded TFTP server missed that what does mess some TFTP clients. Fixed by using STRCASECMP(3) in the required places. Signed-off-by: Sergei Gavrikov <sergei.gavrikov@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* ppc405_uc: fix a buffer overflowBlue Swirl2011-01-121-2/+3
| | | | | | | | | | Fix a buffer overflow, reported by cppcheck: [/src/qemu/hw/ppc405_uc.c:72]: (error) Buffer access out-of-bounds: bd.bi_s_version The use of field bi_s_version seems to be a typo, it should be bi_r_version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* lan9118: fix a buffer overflowBlue Swirl2011-01-121-2/+2
| | | | | | | | | | Fix a buffer overflow, reported by cppcheck: [/src/qemu/hw/lan9118.c:849]: (error) Buffer access out-of-bounds: s.eeprom All eeprom handling code assumes that the size of eeprom is 128, except lan9118_eeprom_cmd. Fix this by restricting the address passed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vpc: fix a file descriptor leakBlue Swirl2011-01-121-17/+30
| | | | | | | Fix a file descriptor leak, reported by cppcheck: [/src/qemu/block/vpc.c:524]: (error) Resource leak: fd Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qemu-io: fix a memory leakBlue Swirl2011-01-121-1/+3
| | | | | | | Fix a memory leak, reported by cppcheck: [/src/qemu/qemu-io.c:1135]: (error) Memory leak: ctx Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vvfat: fix a file descriptor leakBlue Swirl2011-01-121-0/+1
| | | | | | | Fix a file descriptor leak, reported by cppcheck: [/src/qemu/block/vvfat.c:759]: (error) Resource leak: dir Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* loader: fix a file descriptor leakBlue Swirl2011-01-121-2/+3
| | | | | | | Fix a file descriptor leak, reported by cppcheck: [/src/qemu/hw/loader.c:311]: (error) Resource leak: fd Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vnc-auth-sasl: fix a memory leakBlue Swirl2011-01-121-6/+8
| | | | | | | Fix a memory leak reported by cppcheck: [/src/qemu/ui/vnc-auth-sasl.c:448]: (error) Memory leak: mechname Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* audio: split sample conversion and volume mixingMichael Walle2011-01-1213-55/+52Star
| | | | | | | | | Refactor the volume mixing, so it can be reused for capturing devices. Additionally, it removes superfluous multiplications with the nominal volume within the hardware voice code path. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: malc <av1474@comtv.ru>
* disas: remove opcode printing on ARM hostsAurelien Jarno2011-01-121-5/+0Star
| | | | | | | Following commit 5d48e9174e3bfa8655e1dc8f80887acd9040b427, it's possible to remove the hack that used to display the opcodes on ARM hosts only. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* arm-dis: Include opcode hex when doing disassemblyPeter Maydell2011-01-121-0/+24
| | | | | | | | Enhance the ARM disassembler used for debugging so that it includes the hex dump of the opcode as well as the symbolic disassembly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* tcg arm/mips/ia64: add a comment about retranslation and cachesAurelien Jarno2011-01-123-1/+9
| | | | | | | | Add a comment about cache coherency and retranslation, so that people developping new targets based on existing ones are warned of the issue. Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* linux-user: Add configure check for linux/fiemap.h and IOC_FS_FIEMAPPeter Maydell2011-01-123-1/+25
| | | | | | | | | Add a configure check for the existence of linux/fiemap.h and the IOC_FS_FIEMAP ioctl. This fixes a compilation failure on Linux systems which don't have that header file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ARM: Fix decoding of VQSHL/VQSHLU immediate formsPeter Maydell2011-01-121-15/+36
| | | | | | | | | Fix errors in the decoding of ARM VQSHL/VQSHLU immediate forms, including using the new VQSHLU helper functions where appropriate. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ARM: add neon helpers for VQSHLUJuha Riihimäki2011-01-122-0/+51
| | | | | | | | | | | Add neon helper functions to implement VQSHLU, which is a signed-to-unsigned version of VQSHL available only as an immediate form. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: fix fpu disabled/illegal exceptionAurelien Jarno2011-01-111-10/+18
| | | | | | | | | | | Illegal instructions in a slot delay should generate a slot illegal instruction exception instead of an illegal instruction exception. The current PC should be saved before generating such an exception, but should not be corrected if in a delay slot, given it's already done in the exception handler do_interrupt(). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* cris: Remove unused orig_flagsEdgar E. Iglesias2011-01-101-2/+2
| | | | | | Based on a patch by Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Allow more TB chaining for crisv10Edgar E. Iglesias2011-01-102-14/+33
| | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: Support disassembly of crisv10Edgar E. Iglesias2011-01-103-4/+15
| | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* 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/+12Star
| | | | | | | | | | | | | | 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/+4Star
| | | | | | | | | | | | | | | | 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/+1Star
| | | | | | | | | | | | 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>