aurel32 [Tue, 11 Nov 2008 11:50:17 +0000 (11:50 +0000)]
target-mips: optimize gen_arith()/gen_arith_imm()
Optimize code generation in gen_arith()/gen_arith_imm():
- Don't do sign extension when the value is already guaranteed to be
sign extended (otherwise, results are marked as UNPREDICTABLE).
- When the value is sign extended, compare the value to 0 instead of
testing bit 31/63.
- Temp variables are valid up to and *including* the brcond instruction.
Use them instead of temp local variables.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5680
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:47:06 +0000 (11:47 +0000)]
target-mips: convert bit shuffle ops to TCG
Bit shuffle operations can be written with very few TCG instructions
(between 5 and 8), so it is worth converting them to TCG.
This code also move all bit shuffle generation code to a separate
function in order to have a cleaner exception code path, that is it
doesn't store back the TCG register to the target register after the
exception, as the TCG register doesn't exist anymore.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5679
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:46:58 +0000 (11:46 +0000)]
target-mips: convert bitfield ops to TCG
Bitfield operations can be written with very few TCG instructions
(between 2 and 5), so it is worth converting them to TCG.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5678
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:39:33 +0000 (11:39 +0000)]
target-mips: optimize gen_op_addr_add() (2/2)
Instead of dynamically generating different code depending on the UX
flag, add a new flag in ctx->flags to generate different code.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5677
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:36:52 +0000 (11:36 +0000)]
target-mips: optimize gen_op_addr_add() (1/2)
The user mode can be tested at translation time using ctx->hflags.
This simplifies gen_op_addr_add().
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5676
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:36:04 +0000 (11:36 +0000)]
target-mips: optimize gen_save_pc()
We obviously don't need to use a temporary variable to write PC.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5675
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:34:39 +0000 (11:34 +0000)]
target-mips: fix mft* helpers/call
This patch attempts to fix mft* helpers and the associated TCG calls.
mft* helpers do not take a register in argument, however:
- some helpers are called with an argument while they do not take one.
- some helpers are declared with an argument they don't use.
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@5674
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:34:30 +0000 (11:34 +0000)]
target-mips: fix temporary variable freeing in op_ldst_##insn()
Move tcg_temp_free() out of the conditional part to make sure
the TCG temporary variable is freed in all cases.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Thiemo Seufer <ths@networkno.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5673
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:30:48 +0000 (11:30 +0000)]
target-alpha: add proper fcntl definitions
On Alpha the target to native fcntl definitions were missing. Because of
this, programs trying to open files with the O_CREAT option were getting
O_APPEND instead, etc.
This was keeping gcc from the spec benchmarks from running, among other
things.
(Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5672
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 11 Nov 2008 11:30:04 +0000 (11:30 +0000)]
target-alpha: fix double TCG variable allocation
Noticed by Chris Krumme.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5671
c046a42c-6fe2-441c-8c8c-
71466251a162
malc [Tue, 11 Nov 2008 03:04:57 +0000 (03:04 +0000)]
Fix alignment problem with some 64bit load/store instructions
LD/STD/LWA require displacement to be multiple of 4, provide
tcg_out_ldsta which checks the supplied displacement and falls
back on indexed variant when the check fails. All uses of
LD/STD/LWA outside of tcg_out_ldst appear to be safe.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5670
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Mon, 10 Nov 2008 15:55:14 +0000 (15:55 +0000)]
KVM: simplify kvm_cpu_exec hook
We don't need to use cpu_loop_exit() because we never use the
condition codes so everything can be folded into a single case.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5669
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 10 Nov 2008 11:10:23 +0000 (11:10 +0000)]
target-ppc: convert most SPE integer instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5668
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 10 Nov 2008 11:10:14 +0000 (11:10 +0000)]
target-alpha: fix cmpbge instruction
The cmpbge instruction should compare all 8 bytes of one 64-bit value with
another. However, we were looping with a < 7 condition which was skipping
the top byte. So if we were doing a compare where the top byte was
important, we could get the wrong result (this notably breaks the strlen()
function with certain sized strings).
(Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5667
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Mon, 10 Nov 2008 02:55:33 +0000 (02:55 +0000)]
use target_mmap() to allocate idt, gdt and ldt (Kirill A. Shutemov).
env->*dt.base should fit target address space, so we should use
target_mmap to allocate them.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5666
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Mon, 10 Nov 2008 01:34:27 +0000 (01:34 +0000)]
Currently trying to turn an oversized directory into a VVFAT image will
result in a cryptic error (and an abort):
qemu: block-vvfat.c:97: array_get: Assertion `index < array->next' failed.
Aborted
Turn this into an actually useful error message:
Directory does not fit in FAT16 (capacity 504MB)
qemu: could not open disk image fat:$DIR/
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5665
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Mon, 10 Nov 2008 01:05:01 +0000 (01:05 +0000)]
x86 CPUID extended family/model (Andre Przywara).
x86 CPUs feature extended family/model bits in CPUID leaf
0000_0001|EAX. Refer to page 10 in:
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf
Those bits are necessary to model newer AMD CPUs:
-cpu qemu64,family=15,model=65,stepping=3 or
-cpu qemu64,family=16,model=4,stepping=2
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5664
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 9 Nov 2008 19:52:36 +0000 (19:52 +0000)]
Use TCG not op
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5663
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 9 Nov 2008 19:50:37 +0000 (19:50 +0000)]
Use andc, orc, nor and nand
Also fix which argument gets negated in fandnot[12] and fornot[12]
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5662
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 18:27:28 +0000 (18:27 +0000)]
target-ppc: fix TCG argument
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5661
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 17:27:36 +0000 (17:27 +0000)]
target-ppc: Remove a few TCG temp variable leaks
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5660
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 17:27:27 +0000 (17:27 +0000)]
target-ppc: fixes for gen_op_neg()
- Rename to gen_op_arith_neg for consistency with other functions.
- Correctly free TCG temp variable.
- Fix the return value in 64-bit mode in case of overflow.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5659
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 17:27:19 +0000 (17:27 +0000)]
target-ppc: gen_op_arith_divw() & gen_op_arith_divd fixes
gen_op_arith_divw():
- "deoptimize" gen_op_arith_divw to make it more readable.
- Correctly free TCG temp variable
gen_op_arith_divd():
- Call the right function.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5658
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 17:27:11 +0000 (17:27 +0000)]
target-ppc: optimize mullw and make the code more readable
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5657
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 9 Nov 2008 17:27:03 +0000 (17:27 +0000)]
target-ppc: indentation fixes
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5656
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 9 Nov 2008 09:31:37 +0000 (09:31 +0000)]
Sparc32 BSD user support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5655
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Sun, 9 Nov 2008 02:24:54 +0000 (02:24 +0000)]
Document bluetooth support in qemu-doc.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5654
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Sun, 9 Nov 2008 00:28:40 +0000 (00:28 +0000)]
Add qemu_strndup: qemu_strdup with length limit.
Also optimise qemu_strdup by using memcpy - using pstrcpy is usually
suboptimal.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Sun, 9 Nov 2008 00:04:26 +0000 (00:04 +0000)]
Add the -bt switch for setting up bluetooth stuff.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5652
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Sat, 8 Nov 2008 23:57:26 +0000 (23:57 +0000)]
Revert r5532, r5536 and a piece of r5531.
The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't.
I'll try to restore building on non-gnu OSes in a later commit.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Sat, 8 Nov 2008 16:27:07 +0000 (16:27 +0000)]
Use an option rom instead of boot sector for -kernel
Generate an option rom instead of using a hijacked boot sector for kernel
booting. This just requires adding a small option ROM header and a few more
instructions to the boot sector to take over the int19 vector and run our
boot code.
A disk is no longer needed when using -kernel on x86.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5650
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 8 Nov 2008 09:10:39 +0000 (09:10 +0000)]
target-alpha: fix the return value of stl_c/stq_c
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5649
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 8 Nov 2008 08:57:45 +0000 (08:57 +0000)]
target-ppc: fix tcg fatal error on i386 host
It looks like the i386 runs out of registers for allocation due
to too many global registers allocated by the ppc target.
Here is a quick and dirty fix that seems to solve the problem.
This should be considered as temporary.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5648
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Fri, 7 Nov 2008 23:05:14 +0000 (23:05 +0000)]
Use the right format string to printf sector num with DEBUG_IDE.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5647
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Fri, 7 Nov 2008 16:55:48 +0000 (16:55 +0000)]
Fix some build issues for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5646
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 7 Nov 2008 14:00:24 +0000 (14:00 +0000)]
target-alpha: fix locked loads/stores
Fix reading of cpu_lock in gen_qemu_stql_c, original patch from Laurent
Desnogues.
A new flag was added to gen_store_mem to allocate local temps instead
of temps; this flag should be set when the tcg_gen_qemu_store callback
uses brcond before using the temps or else liveness analysis will get
rid of the temps.
This also adds lock printing in cpu_dump_state which can help
debug.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5645
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 7 Nov 2008 13:48:25 +0000 (13:48 +0000)]
target-ppc: fix flags computation for tcg_gen_qemu_st
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5644
c046a42c-6fe2-441c-8c8c-
71466251a162
malc [Thu, 6 Nov 2008 18:54:46 +0000 (18:54 +0000)]
Fix interrupt exclusion via SSTEP_NOIRQ
Commit #5620 revealed an issue of the SSTEP_NOIRQ masking that was
applied on all interrupt sources (including internal ones) when single
stepping through the guest. Due to that commit, we now ended up in an
infinite loop when CPU_INTERRUPT_EXIT was pending on SSTEP resume. That
was due to #5620 eating all TBs while CPU_INTERRUPT_EXIT is pending, but
SSTEP_NOIRQ preventing CPU_INTERRUPT_EXIT to be processed.
What SSTEP_NOIRQ should actually do is to block the delivery of all
external, guest visible interrupts. With the fix below applied, single
stepping now works again.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5643
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 6 Nov 2008 16:15:18 +0000 (16:15 +0000)]
User qemu profiling
- Makefile.target: re-enable profiling for user qemu. It seems
profiling was (accidently?) removed by commit 3937
- syscall.c:
* add an include to get _mcleanup prototype
* add a call to _mcleanup for exit_group in a way
similar to what is done for exit
(Laurent Desnogues)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5642
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 6 Nov 2008 16:15:08 +0000 (16:15 +0000)]
Remove unused reg_T2 definition
No longer used, remove it.
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@5641
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 6 Nov 2008 15:30:22 +0000 (15:30 +0000)]
Make sure to resume the monitor only after flushing out outstanding
network traffic.
This was bug was reported by Chris Lalancette.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5640
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 6 Nov 2008 09:38:51 +0000 (09:38 +0000)]
Win32: Fix warnings
Attached patch fixes some warnings which only happen on Windows.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5639
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 6 Nov 2008 09:16:57 +0000 (09:16 +0000)]
target-alpha: Fix ret instruction
Hopefully pine doesn't corrupt this patch, I've had problems recently.
For an alpha "ret" instruction, of the type
ret $26
The return was being ignored. This is because in translate.c
register $26 (the return address) was being over-written with the current
PC before it could be jumped to. Thus the ret was ignored.
This patch just re-orders things so the return address is processed before
it is over-written with the current PC.
(Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5638
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Wed, 5 Nov 2008 21:22:34 +0000 (21:22 +0000)]
Fix windows build after init_host_timer changes.
host_alarm_timer fires in a separate thread. The windows build current
uses SetEvent() and WaitEvent() to then notify the main thread. This is
functionally equivalent to what we're doing in Unix with pipe(). So let's
just #ifdef the pipe() code on Windows since it doesn't build there anyway.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5637
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Wed, 5 Nov 2008 21:04:35 +0000 (21:04 +0000)]
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
aliguori [Wed, 5 Nov 2008 20:49:37 +0000 (20:49 +0000)]
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
aliguori [Wed, 5 Nov 2008 20:40:18 +0000 (20:40 +0000)]
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
aliguori [Wed, 5 Nov 2008 20:29:45 +0000 (20:29 +0000)]
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
blueswir1 [Wed, 5 Nov 2008 20:24:35 +0000 (20:24 +0000)]
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
aliguori [Wed, 5 Nov 2008 19:59:25 +0000 (19:59 +0000)]
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
blueswir1 [Wed, 5 Nov 2008 19:25:39 +0000 (19:25 +0000)]
Use qemu_ram_alloc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Wed, 5 Nov 2008 16:29:27 +0000 (16:29 +0000)]
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
aliguori [Wed, 5 Nov 2008 16:28:56 +0000 (16:28 +0000)]
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
aliguori [Wed, 5 Nov 2008 16:04:33 +0000 (16:04 +0000)]
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
aliguori [Wed, 5 Nov 2008 15:34:06 +0000 (15:34 +0000)]
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
aliguori [Wed, 5 Nov 2008 15:28:47 +0000 (15:28 +0000)]
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
edgar_igl [Tue, 4 Nov 2008 20:29:29 +0000 (20:29 +0000)]
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
malc [Tue, 4 Nov 2008 19:15:37 +0000 (19:15 +0000)]
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
aurel32 [Tue, 4 Nov 2008 19:13:47 +0000 (19:13 +0000)]
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
edgar_igl [Tue, 4 Nov 2008 19:02:00 +0000 (19:02 +0000)]
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
malc [Tue, 4 Nov 2008 14:18:13 +0000 (14:18 +0000)]
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
pbrook [Tue, 4 Nov 2008 13:17:17 +0000 (13:17 +0000)]
Mention output overlaps.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5619
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Tue, 4 Nov 2008 12:33:21 +0000 (12:33 +0000)]
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
balrog [Tue, 4 Nov 2008 09:04:41 +0000 (09:04 +0000)]
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
balrog [Tue, 4 Nov 2008 08:54:23 +0000 (08:54 +0000)]
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
balrog [Tue, 4 Nov 2008 08:49:17 +0000 (08:49 +0000)]
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
balrog [Tue, 4 Nov 2008 08:47:06 +0000 (08:47 +0000)]
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
balrog [Tue, 4 Nov 2008 08:45:49 +0000 (08:45 +0000)]
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
balrog [Tue, 4 Nov 2008 08:43:54 +0000 (08:43 +0000)]
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
balrog [Tue, 4 Nov 2008 08:42:00 +0000 (08:42 +0000)]
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
pbrook [Mon, 3 Nov 2008 19:09:29 +0000 (19:09 +0000)]
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
pbrook [Mon, 3 Nov 2008 13:30:50 +0000 (13:30 +0000)]
Fix rotri_i64 typo.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5609
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 3 Nov 2008 07:08:44 +0000 (07:08 +0000)]
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
aurel32 [Mon, 3 Nov 2008 07:08:36 +0000 (07:08 +0000)]
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
aurel32 [Mon, 3 Nov 2008 07:08:26 +0000 (07:08 +0000)]
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
balrog [Mon, 3 Nov 2008 01:08:14 +0000 (01:08 +0000)]
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
blueswir1 [Sun, 2 Nov 2008 16:51:02 +0000 (16:51 +0000)]
More realistic max_cpus
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5604
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 2 Nov 2008 14:44:35 +0000 (14:44 +0000)]
Fix loading of unstripped ELF PROM image
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5603
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Sun, 2 Nov 2008 13:26:16 +0000 (13:26 +0000)]
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
blueswir1 [Sun, 2 Nov 2008 10:51:05 +0000 (10:51 +0000)]
Halt the CPU using a qemu_irq
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5601
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 2 Nov 2008 08:23:14 +0000 (08:23 +0000)]
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
aurel32 [Sun, 2 Nov 2008 08:23:04 +0000 (08:23 +0000)]
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
aurel32 [Sun, 2 Nov 2008 08:22:54 +0000 (08:22 +0000)]
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
aurel32 [Sun, 2 Nov 2008 08:22:45 +0000 (08:22 +0000)]
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
aurel32 [Sun, 2 Nov 2008 08:22:34 +0000 (08:22 +0000)]
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
aurel32 [Sun, 2 Nov 2008 08:22:16 +0000 (08:22 +0000)]
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
blueswir1 [Sat, 1 Nov 2008 14:50:20 +0000 (14:50 +0000)]
Avoid ld flag --warn-common on Solaris
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5594
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 1 Nov 2008 13:44:52 +0000 (13:44 +0000)]
Fix TCGv size mismatches
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5593
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 1 Nov 2008 00:54:33 +0000 (00:54 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:54:23 +0000 (00:54 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:54:12 +0000 (00:54 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:53:59 +0000 (00:53 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:53:48 +0000 (00:53 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:53:39 +0000 (00:53 +0000)]
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
aurel32 [Sat, 1 Nov 2008 00:53:30 +0000 (00:53 +0000)]
target-cris: access to TCG variables through GET_TCGV()
Fix build with DEBUG_TCGV enabled.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5586
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 1 Nov 2008 00:53:19 +0000 (00:53 +0000)]
Malta & OMAP: add a name to char devices
(fixes regression introduced by r5575)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5585
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 1 Nov 2008 00:53:09 +0000 (00:53 +0000)]
qemu-char: include hw/baum.h
Fix a warning introduced in r5580 when brlapi is enabled.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5584
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 20:34:40 +0000 (20:34 +0000)]
Remove dumb_refresh
It is safe not to set dpy_refresh and that's used to indicate that the display
doesn't need updates. This saves us two wakeups per second.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5583
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 20:00:18 +0000 (20:00 +0000)]
Remove extraneous inline keyword.
Spotted by Blue Swirl.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5582
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 19:10:00 +0000 (19:10 +0000)]
Move network redirection code out of vl.c and into net.c
Mostly code motion.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5581
c046a42c-6fe2-441c-8c8c-
71466251a162