summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-03-03CRIS: Avoid endless loops for unstested CRIS cpu-state load/save.edgar_igl1-4/+4
Fix several endless loops. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6679 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03Fix SDL on evdev hosts (Anthony Liguori)aliguori5-26/+183
This patch corrects SDL support on X11 hosts using evdev. It's losely based on the previous patch by Dustin Kirkland and the evdev support code in gtk-vnc written by Daniel Berrange. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6678 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03Fix CVE-2008-0928 - insufficient block device address range checking ↵aliguori2-0/+58
(Anthony Liguori) Introduce a growable flag that's set by bdrv_file_open(). Block devices should never be growable, only files that are being used by block devices. I went through Fabrice's early comments about the patch that was first applied. While I disagree with that patch, I also disagree with Fabrice's suggestion. There's no good reason to do the checks in the block drivers themselves. It just increases the possibility that this bug could show up again. Since we're calling bdrv_getlength() to determine the length, we're giving the block drivers a chance to chime in and let us know what range is valid. Basically, this patch makes the BlockDriver API guarantee that all requests are within 0..bdrv_getlength() which to me seems like a Good Thing. What do others think? Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6677 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03DB-DMA cleanupaurel323-164/+133
Signed-off-by: Laurent Vivier <Laurent@vivier.eu> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6676 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03SH4: Fixed last UTLB unused and URB/URC managementaurel321-1/+1
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6675 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03fix SIGSEGV when USE_KQEMU is definedaurel321-1/+1
Signed-off-by: Alex Ivanov <void@aleksoft.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6674 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03sh4: r2d fix no ide/net caseaurel321-5/+5
Fix invalid access/crash when there is no IDE device or NET device. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Tested-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6673 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03SH4: Fixed last UTLB unusedaurel321-1/+1
Version 2 of the patch. Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6672 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03SH4: Fixed last UTLB unusedaurel321-1/+1
With my previous patch (the one monitoring tlb), I found that the last TLB entry was never use. Here a little fix. Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6671 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03SH4: Added monitoring of TLBsaurel321-1/+32
This patch might interest some people trying (as I try to do) to fix some tlbs for kernel/user space data sharing. Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6670 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03target-ppc: improve mfcr/mtcrfaurel322-7/+7
- use ctz32 instead of ffs - 1 - small optimisation of mtcrf - add the name of both opcodes Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6669 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03clean build: Fix remaining sh4 warningsaurel324-28/+9
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6668 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02Fix mtcrf/mfcrmalc1-9/+13
Noticed by Alexander Graf git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6667 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02SH: Implement MOVCO.L and MOVLI.Laurel322-1/+36
* target-sh4/cpu.h (struct CPUSH4State): New field ldst. * target-sh4/translate.c (cpu_ldst): New. (sh4_translate_init): Initialize cpu_ldst. (_decode_opc): Support MOVCO.L and MOVLI.L. (Vladimir Prus) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6666 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02Set mime-type of pc-bios/mpc8544ds.dtb to application/octet-streamaurel320-0/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6665 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02kvm/powerpc: flat device tree files for MPC8544DSaurel322-0/+122
mpc8544ds.dts is copied from kerenl. Non-supported devices has been removed. Signed-off-by: Liu Yu <yu.liu@freescale.com> Acked-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6664 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02kvm/powerpc: Add MPC8544DS board supportaurel325-1/+309
This patch add an emulation of MPC8544DS board. It can work on All E500 platforms. Signed-off-by: Liu Yu <yu.liu@freescale.com> Acked-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6663 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02kvm/powerpc: Add irq support for E500 coreaurel324-2/+74
Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6662 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02kvm/powerpc: Add freescale pci controller's supportaurel323-0/+371
This patch add the emulation of freescale's pci controller for MPC85xx platform. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6661 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02hw/openpic: define list in mpic_init() constaurel321-1/+1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6660 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-02kvm/powerpc: Enable MPIC for E500 platform.aurel324-87/+618
MPIC and OpenPIC have very similar design. So a lot of code can be reused. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6659 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-01Update to OpenBIOS 1.0blueswir14-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6658 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-28Flush stdout after printing usage()blueswir13-6/+6
Fixes qemu-arm|grep cpu - with _exit() getting output from qemu --help is a bit random. Since no atexit() handlers are registered for user mode emulation, just use exit() instead. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6657 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-28Implement HIORblueswir11-8/+21
A real 970 CPU starts up with HIOR=0xfff00000 and triggers a reset exception, basically ending up at IP 0xfff001000. Later on this HIOR has to be set to 0 by the firmware in order to enable the OS to handle interrupts on its own. This patch maps HIOR to exec_prefix, which does the same thing internally in qemu already. It replaces the previous patch that changed the 970 initialization constants, as this is the clean solution to the same problem. Signed-off-by: Alexander Graf <alex@csgraf.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6656 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-28Change default werror semantics from "report" to "enospc"aliguori1-2/+2
Practically speaking, "report" causes a lot of issues when encountering a host ENOSPC error. Switch to "enospc" as the default werror semantics. All host errors other than ENOSPC will be reported to the guest. ENOSPC will cause the VM to stop. Asynchronous notifications are needed to inform management tools that some action should be taken but stopping the VM is at least better than undefined behavior in the guest. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6655 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-28Fix typo in gen_qemu_ld32sblueswir11-1/+1
When the CPU is in little endian mode, it should load values from RAM in byte swapped manner. This check is in all the ld and st functions, but misspelled in gen_qemu_ld32s. This patch fixes the misspelling and makes ppc64 Linux happier. Signed-off-by: Alexander Graf <alex@csgraf.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6654 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27Remove some warnings and fix windows build.aliguori2-4/+4
Initialize some variables to make GCC happy and switch from using index to strchr. index is not available on Windows. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6653 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27chroot and change user support (Nolan)aliguori2-5/+66
Resent with fixed formatting. This patch adds two new command line options: -chroot <dir> -runas <user> This is useful for running qemu as an unprivileged user in a chroot jail. To avoid having to populate the jail, chrooting happens right before the start of guest execution. Signed-off-by: Nolan Leake <nolan@sigbus.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6652 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27Unify default parallel console size (Jan Kiszka)aliguori1-1/+1
Serial and virtio consoles already use 80x24 characters as default size, apply the same to the parallel port consoles. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6651 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27Allow additions of ACPI tables from command line (Gleb Natapov)aliguori8-0/+344
This is needed to dynamically add SLIC tables with Windows activation keys. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6650 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27x86: use qemu_log_mask on triple faults (Chris Wright)aliguori1-2/+1
replace open coded qemu_log_mask with proper macro Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6649 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27Do not enable a default virtio consolealiguori1-4/+1
This upsets Windows installs and right now, virtio console isn't very useful as a default device. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6648 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27net socket verify packet size (Dustin Kirkland)aliguori1-4/+13
net socket oversized packet This is a patch being carried by Ubuntu against kvm/qemu. Verify packet size before performing memcpy(). Signed-off-by: Dustin Kirkland <kirkland@canonical.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6647 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-27Missing cirrus_invalidate_region() in cirrus_do_copy() (Brian Kress)aliguori1-4/+3
After doing a video to video copy, cirrus_do_copy() in cirrus_vga.c does a conditional call to cirrus_invalidate_region() with an "if (!notify)" test. However at this point the blt has already been done so it seems like this call should be made unconditionally. The patch below fixes some display update problems when dragging windows under both X (fedora 10 guest) and a Windows XP guest. Signed-off-by: Brian Kress <kressb@moose.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6646 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-26fix pci net hot-remove (Marcelo Tosatti)aliguori1-1/+2
Missing brackets, doh. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6645 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-26fix raw_aio_remove (Stefano Stabellini)aliguori1-1/+2
Hi all, this small patch fixes a bug in the list iteration of raw_aio_remove. Cheers, Stefano Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6644 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-24Fix ColdFire fmovem. Free the temporary we just allocated rather than somepbrook1-1/+1
other arbitrary value (e.g. A7). Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6643 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Really fix ColdFire fdmoved address decoding.pbrook1-0/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6642 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Fix ColdFire fdmoved address decoding.pbrook1-4/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6641 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Darwin: Check for x86_64 only on i386malc1-3/+3
The sysctl variable if we're 64-bit capable only exists on i386. So we should only check it if we're on i386. This suppresses a warning on PowerPC spotted by Andreas Faerber. Signed-off-by: Alexander Graf <alex@csgraf.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6640 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-23Fix unassigned region offsets.pbrook1-2/+7
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6639 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-22CRIS: Fix remaining build warnings.edgar_igl6-6/+8
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6638 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Turn MMU off on resetblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6637 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Turn MMUs and caches off on resetblueswir11-0/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6636 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Reload ptimers on resetblueswir11-3/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6635 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Properly handle pthread_cond_timedwait timing outmalc1-1/+1
pthread_cond_timedwait is allowed to both consume the signal and return with the value indicating the timeout, hence predicate should always be (re)checked before taking an action git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6634 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Cosmeticsmalc1-11/+13
Avoid repeated creation/initalization/destruction of attr and calls to getpid git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6633 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Avoid thundering herd problemmalc1-4/+4
Broadcast was used so that the I/O threads would wakeup, reset their ts values and all but one go to sleep, in other words an optimization to prevent threads from exiting in presence of continuing I/O activity. Spurious wakeups make the looping around cond_timedwait with ever reinitialized ts potentially unsafe and as such ts in no longer reinitilized inside the loop, hence switch to signal is warranted and this benefits of this particlaur optimization are lost. (It's worth noting that timed variants of pthread calls use realtime clock by default, and therefore can hang "forever" should the host time be changed. Unfortunatelly not all host systems QEMU runs on support CLOCK_MONOTONIC and/or pthread_condattr_setclock with this value) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6632 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Avoid infinite loop around timed condition variablemalc1-6/+7
This can happen due to spurious wakeups git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6631 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Error checkingmalc1-24/+72
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6630 c046a42c-6fe2-441c-8c8c-71466251a162