Commit Graph

5725 Commits

Author SHA1 Message Date
aliguori 5bec1d1dea Run timers from host alarm timer callback
This further cleans up the main loop getting it a lot closer to what a main
loop should be.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5636 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 21:04:35 +00:00
aliguori 6abfbd79b2 Use qemu_set_fd_handler2() to determine when alarm timer fires.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5635 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 20:49:37 +00:00
aliguori 7183b4b47a Improve error reporting in init_timer_alarm
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5634 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 20:40:18 +00:00
aliguori c96f1a48d2 Fix alarm_timer race with select - v3 (Jan Kiszka)
Changing the default IO timeout to 5 s (#5578) made a race visible
between the alarm_timer and select() in main_loop_wait(): If the timer
fired before select was able to block, the full select() timeout could
have been applied instead of returning immediately. Since #5578, this
causes heavy problems to the Musicpal board emulation with stalls up to
5 s, but also with some older Linux guest kernels.

The following patch introduces a pipe that is written to by
host_alarm_handler and select()'ed in main_loop_wait(). This avoids
prevents that select() blocks though a timer has fired and waits for
processing.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5633 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 20:29:45 +00:00
blueswir1 ffd3925701 SM501 emulation for R2D-SH4
This patch adds minimum emulation of SM501 multifunction device,
whose main feature is 2D graphics.  It is one of the peripheral
of R2D, the SH4 evaluation board.  We can see TUX printed on the
QEMU console.

Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5632 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 20:24:35 +00:00
aliguori 5985eceeaa Allow KVM to be used on either 32-bit or 64-bit x86
Inspired by a patch from Glauber Costa.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5631 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 19:59:25 +00:00
blueswir1 5c6602c546 Use qemu_ram_alloc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 19:25:39 +00:00
aliguori 053304480a Add missing files to KVM commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5629 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 16:29:27 +00:00
aliguori eac3026225 Add --kerneldir configure argument
This allows a user to override the default search path and also makes cross
compilation work a bit nicer wrt KVM detection.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5628 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 16:28:56 +00:00
aliguori 7ba1e61953 Add KVM support to QEMU
This patch adds very basic KVM support.  KVM is a kernel module for Linux that
allows userspace programs to make use of hardware virtualization support.  It
current supports x86 hardware virtualization using Intel VT-x or AMD-V.  It
also supports IA64 VT-i, PPC 440, and S390.

This patch only implements the bare minimum support to get a guest booting.  It
has very little impact the rest of QEMU and attempts to integrate nicely with
the rest of QEMU.

Even though this implementation is basic, it is significantly faster than TCG.
Booting and shutting down a Linux guest:

w/TCG:  1:32.36 elapsed  84% CPU

w/KVM:  0:31.14 elapsed  59% CPU

Right now, KVM is disabled by default and must be explicitly enabled with
 -enable-kvm.  We can enable it by default later when we have had better
testing.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 16:04:33 +00:00
aliguori 6fd805e1d4 Split CPUID from op_helper
KVM needs to call CPUID from outside of the TCG code.  This patch
splits out the CPUID logic into a separate helper that both the op
helper and KVM can call.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5626 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 15:34:06 +00:00
aliguori 0650f1ab30 Add additional CPU flag definitions
Some x86 CPU definitions that KVM needs

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5625 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05 15:28:47 +00:00
edgar_igl 2c99f7252e ETRAX-FS: Make etraxfs_dmac_run local.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5624 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 20:29:29 +00:00
malc d64394f7c1 Set default audio timer period to a sane value (otherwise qemu becomes unusable if -icount N is specified)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5623 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 19:15:37 +00:00
aurel32 e00fcff710 target-mips: use the new rotr/rotri instructions
Acked-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5622 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 19:13:47 +00:00
edgar_igl ea0f49a74d ETRAX-FS: Fix DMA warnings.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5621 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 19:02:00 +00:00
malc 55e8b85e48 Add safety net against potential infinite loop
cpu_interrupt might be called while translating the TB, but before it
is linked into a potentially infinite loop and becomes env->current_tb.

Currently this can (and does) cause huge problems only when using
dyntick clock, with other (periodic) clocks host_alarm_handler will
eventually be executed resulting in a call to cpu_interrupt which will
reset the recursion of running TB and the damage is "only" latency.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5620 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 14:18:13 +00:00
pbrook 0c5f3c8d7d Mention output overlaps.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5619 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 13:17:17 +00:00
pbrook 9027db892a Fix ARM default NaN.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5618 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 12:33:21 +00:00
balrog 64b40bc54a tc6393xb: non-accelerated FB support (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5617 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 09:04:41 +00:00
balrog 4ea29f749d Tosa: dummy lcd support (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5616 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:54:23 +00:00
balrog 1f163b1493 scoop: GPRR reports the state of GPIO lines (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5615 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:49:17 +00:00
balrog 86660795be Tosa: disable pxafb as it's not used on tosa (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5614 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:47:06 +00:00
balrog 5d98751b09 Tosa: provide correct IRQ to tc6393xb init (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5613 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:45:49 +00:00
balrog 6bc1d858d1 Tosa: emulate LEDs (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5612 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:43:54 +00:00
balrog a6569fc532 tc6393xb: initial support for nand control (Dmitry Baryshkov).
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5611 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04 08:42:00 +00:00
pbrook c9fb531ab2 VFP fnmsc negative zero fix.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5610 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 19:09:29 +00:00
pbrook de3526b2b3 Fix rotri_i64 typo.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5609 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 13:30:50 +00:00
aurel32 54843a5861 target-ppc: use the new rotr/rotri instructions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5608 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 07:08:44 +00:00
aurel32 158245714e tcg-ops.h: add rotl/rotli and rotr/rotri TCG instructions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5607 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 07:08:36 +00:00
aurel32 f02bb954a5 tcg-op.h: reorder _i64 instructions common to 32- and 64-bit targets
Use the same order as the _i32 version (pure code move). Suggested by
Laurent Laurent Desnogues.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5606 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 07:08:26 +00:00
balrog abbaab5c6d Fix RGBT 5:5:5 drawing on pxa2xx lcd (Lars Munch)
This patch fixes the misinterpretaion of the transparency bit for
RGBT 5:5:5 mode on pxa2xx LCDC.

Signed-off-by: Lars Munch <lars@segv.dk>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5605 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03 01:08:14 +00:00
blueswir1 1bcee01487 More realistic max_cpus
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5604 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 16:51:02 +00:00
blueswir1 a722772711 Fix loading of unstripped ELF PROM image
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5603 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 14:44:35 +00:00
pbrook 10460c8ac4 64-bit target subfi fix.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5602 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 13:26:16 +00:00
blueswir1 6d0c293dc3 Halt the CPU using a qemu_irq
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5601 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 10:51:05 +00:00
aurel32 fdce4963ea target-ppc: use the new subfi wrapper
(...and fix rldnm)

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5600 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:23:14 +00:00
aurel32 0045734ab7 tcg-ops.h: add a subfi wrapper
Add a subfi (subtract from immediate) wrapper, useful for the PPC target.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5599 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:23:04 +00:00
aurel32 6359706f93 tcg-ops.h: _i64 TCG immediate instructions cleanup
Move addi_i64, muli_i64 and subi_i64 out of #if TCG_TARGET_REG_BITS
as both implementations are strictly identical. Use the same
optimisation (ie when imm == 0) for addi_i64 and subi_64 than the
32-bit version.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5598 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:22:54 +00:00
aurel32 0cfe58cd44 target-ppc: simplify slw, srw, sld, srd
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5597 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:22:45 +00:00
aurel32 fea0c503a0 target-ppc: be more consistent with temp variables naming
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5596 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:22:34 +00:00
aurel32 4da0033e6e target-ppc: fix srw on 64-bit targets
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5595 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02 08:22:16 +00:00
blueswir1 d2c7c9b871 Avoid ld flag --warn-common on Solaris
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5594 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 14:50:20 +00:00
blueswir1 527067d892 Fix TCGv size mismatches
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5593 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 13:44:52 +00:00
aurel32 6176a26d1d target-ppc: optimize popcntb
Suggested by Andrzej Zaborowski.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5592 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:54:33 +00:00
aurel32 182608d44c target-ppc: convert 405 MAC instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5591 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:54:23 +00:00
aurel32 7463740644 target-ppc: convert arithmetic functions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5590 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:54:12 +00:00
aurel32 8d71247eaa target-ppc: xer access prototypes no more used & implemented
Revision 5500 of the qemu repository removed all code using
ppc_load_xer & ppc_store_xer as well as their implementation.

Another patch fixes it's usage in kvm-userspace for powerpc, but I think
that header can now be cleaned up, therefore this patch to qemu-devel.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5589 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:53:59 +00:00
aurel32 269f3e95e8 target-ppc: fix XER accesses on 64-bit targets
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5588 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:53:48 +00:00
aurel32 65d35a0997 CVE-2008-4539: fix a heap overflow in Cirrus emulation
The code in hw/cirrus_vga.c has changed a lot between CVE-2007-1320 has
been announced and the patch has been applied. As a consequence it has
wrongly applied and QEMU is still vulnerable to this bug if using VNC.

(noticed by Jan Niehusmann)

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5587 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01 00:53:39 +00:00